Files
2025-09-02 21:39:37 +02:00

34 lines
733 B
C

#include <windows.h>
#include <stdio.h>
int main(void)
{
unsigned int xorkey = 23;
unsigned char shellcode[42] = {232, 233, 99, 23, 114, 23, 100, 23, 99, 23, 114, 23, 126, 23, 121, 23, 100, 23, 109, 23, 96, 23, 120, 23, 114, 23, 126, 23, 121, 23, 100, 23, 109, 23, 96, 23, 120, 23, 37, 23, 37, 23};
// XOR each byte of our shellcode with the key to decode it
for (int idx = 0; idx < sizeof(shellcode); idx++) {
shellcode[idx] = shellcode[idx] ^ xorkey;
}
int idx = 0;
while ( idx < sizeof(shellcode))
{
if (idx == (sizeof(shellcode) - 1) )
{
printf("0x%02x ", (unsigned char)shellcode[idx]);
}
else
{
printf("0x%02x, ", (unsigned char)shellcode[idx]);
}
idx++;
}
return 0;
}