one_gadget (2) 썸네일형 리스트형 [Practice] Use After Free 1. Use After Free (UAF) 해제된 메모리에 접근할 수 있는 취약점으로, 메모리에 남아있던 데이터를 유출하거나 사용할 수 있다. 참고 : 2022.08.20 - [Dreamhack/Lecture & Practice] - [Lecture] Use After Free 2. 실습 코드 // Name: uaf_overwrite.c // Compile: gcc -o uaf_overwrite uaf_overwrite.c #include #include #include #include struct Human { char name[16]; int weight; long age; }; struct Robot { char name[16]; int weight; void (*fptr)(); }; struct .. [Wargame] oneshot 1. 실습 코드 // gcc -o oneshot1 oneshot1.c -fno-stack-protector -fPIC -pie #include #include #include #include void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); signal(SIGALRM, alarm_handler); alarm(60); } int main(int argc, char *argv[]) { char msg[16]; size_t check = 0; initialize(); printf("stdout: %p\n", st.. 이전 1 다음