Skip to content

Commit 9c1a43a

Browse files
committed
Check payload arch
1 parent a76ee6c commit 9c1a43a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/exploits/windows/smb/psexec_psh.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def initialize(info = {})
5252
'DisableNops' => true,
5353
'StackAdjustment' => -3500
5454
},
55-
'Arch' => [ ARCH_X86, ARCH_X86_64 ],
5655
'Platform' => 'win',
5756
'Targets' =>
5857
[
59-
[ 'Automatic', { } ],
58+
[ 'Windows x86', { 'Arch' => ARCH_X86 } ],
59+
[ 'Windows x64', { 'Arch' => ARCH_X86_64 } ]
6060
],
6161
'DefaultTarget' => 0,
6262
'References' => [
@@ -77,6 +77,10 @@ def exploit
7777
print_warning("You probably want to DisablePayloadHandler and use exploit/multi/handler with the PERSIST option.")
7878
end
7979

80+
if datastore['RUN_WOW64'] and target_arch.first == "x86_64"
81+
fail_with(Exploit::Failure::BadConfig, "Select an x86 target and payload with RUN_WOW64 enabled")
82+
end
83+
8084
#Try and authenticate with given credentials
8185
if connect
8286
begin

0 commit comments

Comments
 (0)