본문 바로가기
hacking/pwnable

[Dream hack] Quiz: Out of Bounds-1

by ilp 2024. 9. 20.
반응형


문제에서 buf의 크기가 0x10이고 buf[index]를 출력하기 때문에

index의 크기는 0x10보다 작아야 한다.

그렇기 떄문에 0x10보다 크거나 같으면 모드 exit(-1)로 예외처리를 해야 한다.

(index가 0x10이랑 같으면 안된다. 배열인덱스 첫 시작은 0이기 떄문이다.)


반응형

'hacking > pwnable' 카테고리의 다른 글

[Dream hack] welcome  (0) 2024.10.06
[Dream hack] bof  (0) 2024.10.06
[Dream hack] Memory Corruption: Out of Bounds  (6) 2024.09.19
[Dream hack] Return Address Overwrite  (0) 2024.09.18
[Dream hack] Logical Bug: Command Injection  (2) 2024.09.06