Security Study/System
Use After Free
use after free 라는 취약점은 프로그램 메모리는 크게 Code/Data/Heap/Stack으로 나눌 수 있는데 Code+Data=Binary영역 Heap=프로그래머가 동적 할당/회수/제어 할 수 있는 영역 Stack=함수 개별공간(스택프레임),인자전달등으로 사용하는 영역 이렇게 구분할 수 있다 이 중에서 UAF는 프로그래머가 힙 영역을 잘못 다뤘을 때 발생하는 취약점이다. 아래의 소스를 보자 #include #include typedef struct UAF{int number;}uaf; int main(void){uaf *one;uaf *two; one = malloc(100);printf("one->number:%d\n",one->number); one->number=12345;printf(..