iofile_vtable_check
·
Wargame/Dreamhack
보호되어 있는 글입니다.
FSOP - _IO_flush_all_lockp ()
·
Tips & theory
원리 기본적인 내용은 앞선 FSOP 들과 동일하며, _IO_FILE 구조체가 아닌 vtable 구조체의 값을 사용하는 함수이다. 더보기 https://wyv3rn.tistory.com/110?category=949837 _IO_FILE Arbitrary Address Read 원리 여러개의 파일을 열지만 읽기 권한이 없는 경우, 예를 들어 관리자가 작성한 암호 파일과 유저가 작성한 파일을 열어 그 내용을 비교한다고 가정할 때 관리자 파일에 읽기 권한이 없는 경 wyv3rn.tistory.com https://wyv3rn.tistory.com/112?category=949837 _IO_FILE Arbitrary Address Write 원리 큰 틀은 _IO_FILE Arbitrary Address Read..
iofile_aw
·
Wargame/Dreamhack
1. intro 2. code 및 분석 2.1 code // gcc -o iofile_aw iofile_aw.c -fno-stack-protector -Wl,-z,relro,-z,now #include #include #include #include #include char buf[80]; int size = 512; 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); } void read_str() { fgets(buf, sizeo..