Skip to content

Commit 4cb523a

Browse files
authored
Add exit(0) syscall
1 parent 2c16779 commit 4cb523a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/payloads/singles/linux/x64/set_hostname.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ def generate(_opts = {})
4949
pop rdi ; rdi points to the hostname string.
5050
xor byte [rdi+rsi], 0x41
5151
syscall
52-
ret ; break the loop by causing segfault.
52+
53+
push 60 ; exit() syscall number.
54+
pop rax
55+
xor rdi,rdi
56+
syscall
5357
5458
str:
5559
call end

0 commit comments

Comments
 (0)