반응형


|
그렇다면 20바이트의 길이의 첫번째 인자가 check_password() 함수로의 리턴값이 hashcode와 같아야 한다.
int 형 포인터로 형 변환을 했기에 4 바이트씩 읽어들인다.
첫번째 인자인 20바이트의 문자열을 int 형 포인터로 접근한 뒤 4바이트씩 5번 접근한다.
0x21DD09EC / 5 = 0x06C5CEC8
검산을 해보면 0x06C5CEC8 * 5 = 0x21DD09E8
0x21DD09EC - 0x21DD09E8 = 4
그럼 0x06C5CEC8 을 하나 보내주고, 0x06C5CEC9(0x06C5CEC8 + 1) 을 네개 보내준다.

반응형
'공부 > 보안' 카테고리의 다른 글
[dreamhack] System Exploitation 3강 (0) | 2021.03.07 |
---|---|
나 보려고 정리해두는 gdb 명령어 (0) | 2021.03.07 |
[dreamhack] System Exploitation 2강 (0) | 2021.03.06 |
[dreamhack] System Exploitation 1강 (0) | 2021.03.04 |
[pwnable.kr] fd (0) | 2021.02.26 |