Integer Overflow

System Hacking Advanced

[dreamhack] sint

문제풀이#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 > ..

keyme
'Integer Overflow' 태그의 글 목록