리눅스
● ASLR(Address Space Layout Randomization)
Brute Force
Memory Leak
● NX(Non-Executable) - > 스택공간 실행권한 해제
ROP(Return Oriented Programming)
[참고] triggered
[참고] libc -> systemcall
● ASCII-Armor
library 내에 있는 것을
RTL 공격기법
● Stack Canary -> Stack Guard
버퍼랑 SFP 사이에 버퍼 오버플로를 탐지하는 데이터 삽입하는 기법
Info Leak
윈도우
● ASLR(Address Space Layout Randomization) == ASLR
● SEH(Structured Exception Handling)
[참고] exeption 처리 루틴에서 중간 일부를 바꾸는 것
● DEP(Data Execution Prevention) == NX
● GS(GS cookie, Stack Cookies) == Stack Guard
◆ About the memory protection
메모리 보호기법이란 악성코드나 BoF, FSB같은 취약점을 이용한 공격에 대하여 대응하기 위한 기법이다. 인터넷 사전에서는 다음과 같이 정의하고 있다. 해당 기법들을 이해하기 위해서는 메모리와 CPU의 레지스터에 대한 기본 이해가 필요하다.
[NOTE] 메모리 보호기법은 운영체제 및 운영체제의 버전에 따라 달라질 수 있다.
Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it. This prevents a bug or malware within a process from affecting other processes, or the operating system itself. Protection may encompass all accesses to a specified area of memory, write accesses, or attempts to execute the contents of the area. An attempt to access unauthorized memory results in a hardware fault, e.g., a segmentation fault, storage violation exception, generally causing abnormal termination of the offending process. Memory protection for computer security includes additional techniques such as address space layout randomization and executable space protection.
[출처] Wikipedia
리눅스
윈도우
◆ In details
ASLR: 메모리상의 공격을 어렵게 하기 위해 스택이나 힙, 라이브러리 등의 주소를 랜덤으로 프로세스 주소 공간에 배치함으로써 실행할 때 마다 데이터의 주소가 바뀌게 하는 기법.
DEP == NX: 스택 영역에서 코드가 실행 권한을 제어하는 기법
ASCII-Armor: 공유라이브러리 영역의 상위 주소에 0x00을 포함시키는 방법
Stack Canary: 함수 진입 시 스택에 SFP(Saved Frame Pointer)와 return address 정보를 저장할 때, 이 정보들이 공격자에 의해 덮어씌워지는 것으로부터 보호하기 위해 스택 상의 변수들의 공간과 SFP 사이에 특정한 값을 추가하는데 이 값을 Canary라고 한다.