要点:使用shellcraft.i386()来编写shellcode
和level0相比,本题没有system函数可以直接调用。
所以我们要发送shellcode来getshell
首先看一下开了哪些保护。(好吧,不出意料是全裸)
然后IDA里面看函数调用,main()函数先调用了vulnerable_function函数。
vulnerable_function:
text:0804847B ; __unwind {
.text:0804847B push ebp
.text:0804847C mov ebp, esp
.text:0804847E sub esp, 88h
.text:08048484 sub esp, 8
.text:08048487 lea eax, [ebp+buf]
.text:0804848D push eax
.text:0804848E push offset format