Skip to content
Permalink
Browse files

Land #11968, only enable UDP stagers for compatible payloads

  • Loading branch information...
busterb committed Jun 29, 2019
2 parents 83e2c71 + f11a205 commit 4e544fe7334a4c8220b10e258a142b5224d9aedd
@@ -1,5 +1,5 @@
##
# This module requires Metasploit: http://metasploit.com/download
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

@@ -27,7 +27,7 @@ def initialize(info = {})
'Platform' => 'win',
'Arch' => ARCH_X86,
'Handler' => Msf::Handler::ReverseUdp,
'Convention' => 'sockedi',
'Convention' => 'udpsockedi',
'Stager' => { 'RequiresMidstager' => false }
))
end
@@ -22,7 +22,7 @@ def initialize(info = {})
'Session' => Msf::Sessions::CommandShellWindows,
'PayloadCompat' =>
{
'Convention' => 'sockedi -http -https'
'Convention' => 'sockedi udpsockedi -http -https'
},
'Stage' =>
{
@@ -22,7 +22,7 @@ def initialize(info = {})
'Session' => Msf::Sessions::CommandShellWindows,
'PayloadCompat' =>
{
'Convention' => 'sockedi -http -https'
'Convention' => 'sockedi udpsockedi -http -https'
},
'Stage' =>
{
@@ -2919,17 +2919,6 @@
reference_name: 'windows/dllinject/reverse_tcp_rc4_dns'
end

context 'windows/dllinject/reverse_udp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
'stagers/windows/reverse_udp',
'stages/windows/dllinject'
],
dynamic_size: false,
modules_pathname: modules_pathname,
reference_name: 'windows/dllinject/reverse_udp'
end

context 'windows/dns_txt_query_exec' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
@@ -3303,17 +3292,6 @@
reference_name: 'windows/meterpreter/reverse_tcp_uuid'
end

context 'windows/meterpreter/reverse_udp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
'stagers/windows/reverse_udp',
'stages/windows/meterpreter'
],
dynamic_size: false,
modules_pathname: modules_pathname,
reference_name: 'windows/meterpreter/reverse_udp'
end

context 'windows/metsvc_bind_tcp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
@@ -3488,17 +3466,6 @@
reference_name: 'windows/patchupdllinject/reverse_tcp_rc4_dns'
end

context 'windows/patchupdllinject/reverse_udp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
'stagers/windows/reverse_udp',
'stages/windows/patchupdllinject'
],
dynamic_size: false,
modules_pathname: modules_pathname,
reference_name: 'windows/patchupdllinject/reverse_udp'
end

context 'windows/patchupmeterpreter/bind_ipv6_tcp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
@@ -3653,17 +3620,6 @@
reference_name: 'windows/patchupmeterpreter/reverse_tcp_rc4_dns'
end

context 'windows/patchupmeterpreter/reverse_udp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
'stagers/windows/reverse_udp',
'stages/windows/patchupmeterpreter'
],
dynamic_size: false,
modules_pathname: modules_pathname,
reference_name: 'windows/patchupmeterpreter/reverse_udp'
end

context 'windows/shell/bind_ipv6_tcp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
@@ -4198,17 +4154,6 @@
reference_name: 'windows/vncinject/reverse_tcp_rc4_dns'
end

context 'windows/vncinject/reverse_udp' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [
'stagers/windows/reverse_udp',
'stages/windows/vncinject'
],
dynamic_size: false,
modules_pathname: modules_pathname,
reference_name: 'windows/vncinject/reverse_udp'
end

context 'windows/x64/exec' do
it_should_behave_like 'payload cached size is consistent',
ancestor_reference_names: [

0 comments on commit 4e544fe

Please sign in to comment.
You can’t perform that action at this time.