PIE Base Leak

#코딩노예#·2022년 7월 16일
0

기타

목록 보기
8/16

PIE Base Leak

# pwntools

pie_base = p.libs()["절대주소"]

PIE 방어 기법은 코드 영역을 ASLR 처럼 랜덤화 시키는 방어기법이기 때문에, 이와 관련된 요소들에 모두 pie_base 값을 더해줘야 합니다.

Ex) plt, got, 코드 주소, 가젯 주소

write_got = e.got['write'] + pie_base
read_got = e.got['read'] + pie_base

csu_init1 = 0x1212 + pie_base
csu_init2 = 0x11f8 + pie_base
main = 0x1159 + pie_base

pop_rdi = r.find_gadget(['pop rdi', 'ret'])[0] + pie_base

0개의 댓글