Skip to content

Commit 44f8cf4

Browse files
committed
Add more size to stagers, adjust psexec payloads
This psexec payload size should be evaluated to make sure I'm not doing anything stupid. i can't see a reason why increasing these sizes would be bad. They seem to work fine.
1 parent 6859b24 commit 44f8cf4

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

lib/msf/core/payload/windows/reverse_winhttp.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,11 @@ def required_space
7676
# Add 100 bytes for the encoder to have some room
7777
space += 100
7878

79-
# Make room for the maximum possible URL length
80-
space += 256
79+
# Make room for the maximum possible URL length (wchars)
80+
space += 512 * 2
81+
82+
# proxy (wchars)
83+
space += 128 * 2
8184

8285
# EXITFUNK processing adds 31 bytes at most (for ExitThread, only ~16 for others)
8386
space += 31

lib/msf/core/payload/windows/x64/reverse_winhttp.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ def required_space
7373
# Add 100 bytes for the encoder to have some room
7474
space += 100
7575

76-
# Make room for the maximum possible URL length
77-
space += 256
76+
# Make room for the maximum possible URL length (wchars)
77+
space += 512 * 2
78+
79+
# proxy (wchars)
80+
space += 128 * 2
7881

7982
# EXITFUNK processing adds 31 bytes at most (for ExitThread, only ~16 for others)
8083
space += 31

modules/exploits/windows/smb/psexec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def initialize(info = {})
5252
],
5353
'Payload' =>
5454
{
55-
'Space' => 2048,
55+
'Space' => 3072,
5656
'DisableNops' => true,
5757
'StackAdjustment' => -3500
5858
},

modules/exploits/windows/smb/psexec_psh.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def initialize(info = {})
4444
},
4545
'Payload' =>
4646
{
47-
'Space' => 2048,
47+
'Space' => 3072,
4848
'DisableNops' => true
4949
},
5050
'Platform' => 'win',

0 commit comments

Comments
 (0)