init(); buf = (void *)(int)mmap((void *)0x9961000, 0x1000uLL, 7, 34, -1, 0LL); puts("Last night i played touhou fuujinroku ~ Mountain of Faith\n"); puts("F**k! I failed and 9961 in the end!\n"); puts("In that case, you can only enter a very short shellcode!\n"); read(0, buf, 0x16uLL); puts("I hope you can NMNB it!"); mprotect(buf, 0x1000uLL, 4); JUMPOUT(0x9961000LL); }
这题我是直接跟着其他师傅的文章做的,需要构造一个短小的shellcode
exp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from pwn import * context(os='linux',arch='amd64',log_level='debug') p = process("./pwn")