개념정리○ SROP란?Sigreturn-oriented-programming의 약자로 SROP라고 부른다. Sigreturn system call을 사용하는 ROP 기법: Sigreturn system call은 시그널을 받은 프로세스가 kernel mode에서 user mode로 복귀할 때 사용하는 system call을 의미한다. sigreturn syscall 을 이용해 모든 레지스터값을 컨트롤해서 exploit한다. 기본적으로 ROP와 똑같은 개념이지만, ROP를 수행하기위한 가젯이 부족한 경우에 사용할 수 있는 방법이다. 운영체제는 보안, 자원 관리 등의 이유로 user mode와 kernel mode를 컨텍스트 스위칭하면서 프로세스를 실행한다. 만약, 시그널이 발생한다면 kernel mode로..
Tcache Poisoning Tcache PoisoningTcache PoisoningDouble Free Bug를 이용하여 tcache_entry를 조작하고 이미 할당된 메모리에 다시 힙 청크를 할당하는 공격 기법이다. tcache에서 사용하는 tcache_put과 tcache_get 함수에서는 old와 p를 검증하지keyme2003.tistory.com [*] '/root/dream/tcache_poison/tcache_poison' Arch: amd64-64-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x400000)보호기법을 확인하면 Ful..
문제풀이#include #include #include #include void get_shell(){ system("/bin/sh");}int main(){ char buf[256]; int size; initialize(); signal(SIGSEGV, get_shell); printf("Size: "); scanf("%d", &size); if (size > 256 || size buf[256], size 선언size를 입력 받고 buf 범위를 벗어나는 size인 경우에는 exit(0) 실행범위를 벗어나지 않는 경우는 size-1 크기의 입력을 받고 buf에 저장size에 대한 검증이 존재하므로 BOF가 불가능해보인다. 진짜 불가능할까?if (size > ..