[dreamhack.io] 「_IO_FILE Arbitrary Address Read」 풀이


[dreamhack.io] 「_IO_FILE Arbitrary Address Read」 풀이

Dreamhack 난이도 이름 _IO_FILE Arbitrary Address Read 미리 알아둘 것 _IO_FILE 구조 glibc 소스코드 분석을 통한 fwrite() 함수의 동작 이해 이번에는 fwrite() 함수의 구조적 문제를 이용해, 원래라면 출력할 수 없는 파일의 내용을 출력하여 읽어보는 예제를 풀어 봅시다. stdout(standard output; 표준 출력)을 통해, 화면에 데이터를 쓰는 형태입니다. 임의 주소 읽기(Arbitrary Address Read; AAR)이라고 할 수 있겠네요! Ubuntu 18.04. 환경에서 진행합니다. (낮은 glibc 버전을 사용하여 이해를 보다 쉽게 하기 위함) 우선 소스코드를 확인해 볼까요? // Name: iofile_aar // gcc -o iofile_aar iofile_aar.c -no-pie #include <stdio.h> #include <unistd.h> #include <string.h> char flag_b...


#_IO_FILE #파일읽기 #파일구조 #커널 #취약점 #구조체 #writeup #system #struct #pwnable #pwn #kernel #glibc #exploitation #C언어 #C #AAR #_IO_FILE_aar #해설

원문링크 : [dreamhack.io] 「_IO_FILE Arbitrary Address Read」 풀이