Behemoth1

Posted by rk700 on July 4, 2014

这道题我开始试了半天想要invoke一个shell,都没成功。最后用的shellcode是读直接文件

首先,我们把shellcode存在环境变量里。

通过输出ebp地址,我们知道了其在xor esp, 0xfffffff0之前esp的值,进而知道输入的字符串距离返回地址的距离为79bytes

然后打印环境变量的地址,也就是shellcode的地址

我们把要读取的文件软链接到文件solution.txt,然后运行
perl -e 'print "A"x79 . "\xbc\xd8\xff\xff"' | /behemoth/behemoth1