Skip to content

Commit 02c7461

Browse files
author
HD Moore
committed
Lands rapid7#4906 and fixes rapid7#4905 by updating Conventions for HTTP incompatible payloads
2 parents 7be665d + ad39adf commit 02c7461

File tree

5 files changed

+5
-125
lines changed

5 files changed

+5
-125
lines changed

modules/payloads/stages/windows/shell.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(info = {})
2323
'Session' => Msf::Sessions::CommandShellWindows,
2424
'PayloadCompat' =>
2525
{
26-
'Convention' => 'sockedi -https'
26+
'Convention' => 'sockedi -http -https'
2727
},
2828
'Stage' =>
2929
{

modules/payloads/stages/windows/upexec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(info = {})
2323
'Session' => Msf::Sessions::CommandShellWindows,
2424
'PayloadCompat' =>
2525
{
26-
'Convention' => 'sockedi -https'
26+
'Convention' => 'sockedi -http -https'
2727
},
2828
'Stage' =>
2929
{

modules/payloads/stages/windows/vncinject.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def initialize(info = {})
2525
'Name' => 'VNC Server (Reflective Injection)',
2626
'Description' => 'Inject a VNC Dll via a reflective loader (staged)',
2727
'Author' => [ 'sf' ],
28-
'Session' => Msf::Sessions::VncInject ))
28+
'Session' => Msf::Sessions::VncInject,
29+
'Convention' => 'sockedi -http -https'))
2930

3031
end
3132

modules/payloads/stages/windows/x64/shell.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(info = {})
2323
'Session' => Msf::Sessions::CommandShellWindows,
2424
'PayloadCompat' =>
2525
{
26-
'Convention' => 'sockrdi'
26+
'Convention' => 'sockrdi -http -https'
2727
},
2828
'Stage' =>
2929
{

spec/modules/payloads_spec.rb

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,39 +2991,6 @@
29912991
reference_name: 'windows/shell/find_tag'
29922992
end
29932993

2994-
context 'windows/shell/reverse_hop_http' do
2995-
it_should_behave_like 'payload cached size is consistent',
2996-
ancestor_reference_names: [
2997-
'stagers/windows/reverse_hop_http',
2998-
'stages/windows/shell'
2999-
],
3000-
dynamic_size: false,
3001-
modules_pathname: modules_pathname,
3002-
reference_name: 'windows/shell/reverse_hop_http'
3003-
end
3004-
3005-
context 'windows/shell/reverse_http' do
3006-
it_should_behave_like 'payload cached size is consistent',
3007-
ancestor_reference_names: [
3008-
'stagers/windows/reverse_http',
3009-
'stages/windows/shell'
3010-
],
3011-
dynamic_size: false,
3012-
modules_pathname: modules_pathname,
3013-
reference_name: 'windows/shell/reverse_http'
3014-
end
3015-
3016-
context 'windows/shell/reverse_http_proxy_pstore' do
3017-
it_should_behave_like 'payload cached size is consistent',
3018-
ancestor_reference_names: [
3019-
'stagers/windows/reverse_http_proxy_pstore',
3020-
'stages/windows/shell'
3021-
],
3022-
dynamic_size: false,
3023-
modules_pathname: modules_pathname,
3024-
reference_name: 'windows/shell/reverse_http_proxy_pstore'
3025-
end
3026-
30272994
context 'windows/shell/reverse_ipv6_tcp' do
30282995
it_should_behave_like 'payload cached size is consistent',
30292996
ancestor_reference_names: [
@@ -3217,39 +3184,6 @@
32173184
reference_name: 'windows/upexec/find_tag'
32183185
end
32193186

3220-
context 'windows/upexec/reverse_hop_http' do
3221-
it_should_behave_like 'payload cached size is consistent',
3222-
ancestor_reference_names: [
3223-
'stagers/windows/reverse_hop_http',
3224-
'stages/windows/upexec'
3225-
],
3226-
dynamic_size: false,
3227-
modules_pathname: modules_pathname,
3228-
reference_name: 'windows/upexec/reverse_hop_http'
3229-
end
3230-
3231-
context 'windows/upexec/reverse_http' do
3232-
it_should_behave_like 'payload cached size is consistent',
3233-
ancestor_reference_names: [
3234-
'stagers/windows/reverse_http',
3235-
'stages/windows/upexec'
3236-
],
3237-
dynamic_size: false,
3238-
modules_pathname: modules_pathname,
3239-
reference_name: 'windows/upexec/reverse_http'
3240-
end
3241-
3242-
context 'windows/upexec/reverse_http_proxy_pstore' do
3243-
it_should_behave_like 'payload cached size is consistent',
3244-
ancestor_reference_names: [
3245-
'stagers/windows/reverse_http_proxy_pstore',
3246-
'stages/windows/upexec'
3247-
],
3248-
dynamic_size: false,
3249-
modules_pathname: modules_pathname,
3250-
reference_name: 'windows/upexec/reverse_http_proxy_pstore'
3251-
end
3252-
32533187
context 'windows/upexec/reverse_ipv6_tcp' do
32543188
it_should_behave_like 'payload cached size is consistent',
32553189
ancestor_reference_names: [
@@ -3393,39 +3327,6 @@
33933327
reference_name: 'windows/vncinject/find_tag'
33943328
end
33953329

3396-
context 'windows/vncinject/reverse_hop_http' do
3397-
it_should_behave_like 'payload cached size is consistent',
3398-
ancestor_reference_names: [
3399-
'stagers/windows/reverse_hop_http',
3400-
'stages/windows/vncinject'
3401-
],
3402-
dynamic_size: false,
3403-
modules_pathname: modules_pathname,
3404-
reference_name: 'windows/vncinject/reverse_hop_http'
3405-
end
3406-
3407-
context 'windows/vncinject/reverse_http' do
3408-
it_should_behave_like 'payload cached size is consistent',
3409-
ancestor_reference_names: [
3410-
'stagers/windows/reverse_http',
3411-
'stages/windows/vncinject'
3412-
],
3413-
dynamic_size: false,
3414-
modules_pathname: modules_pathname,
3415-
reference_name: 'windows/vncinject/reverse_http'
3416-
end
3417-
3418-
context 'windows/vncinject/reverse_http_proxy_pstore' do
3419-
it_should_behave_like 'payload cached size is consistent',
3420-
ancestor_reference_names: [
3421-
'stagers/windows/reverse_http_proxy_pstore',
3422-
'stages/windows/vncinject'
3423-
],
3424-
dynamic_size: false,
3425-
modules_pathname: modules_pathname,
3426-
reference_name: 'windows/vncinject/reverse_http_proxy_pstore'
3427-
end
3428-
34293330
context 'windows/vncinject/reverse_ipv6_tcp' do
34303331
it_should_behave_like 'payload cached size is consistent',
34313332
ancestor_reference_names: [
@@ -3578,17 +3479,6 @@
35783479
reference_name: 'windows/x64/shell/bind_tcp'
35793480
end
35803481

3581-
context 'windows/x64/shell/reverse_https' do
3582-
it_should_behave_like 'payload cached size is consistent',
3583-
ancestor_reference_names: [
3584-
'stagers/windows/x64/reverse_https',
3585-
'stages/windows/x64/shell'
3586-
],
3587-
dynamic_size: false,
3588-
modules_pathname: modules_pathname,
3589-
reference_name: 'windows/x64/shell/reverse_https'
3590-
end
3591-
35923482
context 'windows/x64/shell/reverse_tcp' do
35933483
it_should_behave_like 'payload cached size is consistent',
35943484
ancestor_reference_names: [
@@ -3631,17 +3521,6 @@
36313521
reference_name: 'windows/x64/vncinject/bind_tcp'
36323522
end
36333523

3634-
context 'windows/x64/vncinject/reverse_https' do
3635-
it_should_behave_like 'payload cached size is consistent',
3636-
ancestor_reference_names: [
3637-
'stagers/windows/x64/reverse_https',
3638-
'stages/windows/x64/vncinject'
3639-
],
3640-
dynamic_size: false,
3641-
modules_pathname: modules_pathname,
3642-
reference_name: 'windows/x64/vncinject/reverse_https'
3643-
end
3644-
36453524
context 'windows/x64/vncinject/reverse_tcp' do
36463525
it_should_behave_like 'payload cached size is consistent',
36473526
ancestor_reference_names: [

0 commit comments

Comments
 (0)