SHARE
TWEET

Untitled

a guest Aug 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %define SYS_exit        1
  2. %define SYS_write       4
  3. %define stdout          1
  4.  
  5. bits 32
  6. org 0x08048000
  7.  
  8. ; the ELF header
  9. dd 0x464C457F, 0x00010101, 0x00000000, 0x00000000
  10. dd 0x00030002, 0x00000001
  11.  
  12. ; entry point
  13. dd 0x08048060
  14.  
  15. ; rest of header
  16. dd 0x00000034, 0x000000A0, 0x00000000, 0x00200034
  17. dd 0x00280001, 0x00020003, 0x00000001, 0x00000000
  18. dd 0x08048000, 0x08048000, 0x0000008D, 0x0000008D
  19. dd 0x00000005, 0x00001000, 0x00000000, 0x00000000
  20. dd 0x00000000
  21.  
  22. ; 0x08048060
  23. start:
  24.         mov edx, hello_len
  25.         mov ecx, hello
  26.         mov eax, SYS_write
  27.         mov ebx, stdout
  28.         int 80h
  29.  
  30.         mov eax, SYS_exit
  31.         xor ebx, ebx
  32.         int 80h
  33.  
  34. hello:
  35.         db "Hello, World!", 10
  36. hello_len equ $-hello
RAW Paste Data
Top