Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ GEM
rex-arch
rex-ole (0.1.9)
rex-text
rex-powershell (0.1.103)
rex-powershell (0.1.105)
bigdecimal
rex-random_identifier
rex-text
Expand Down
12 changes: 2 additions & 10 deletions modules/exploits/windows/smb/psexec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ def initialize(info = {})
},
'Platform' => 'win',
'Targets' => [
# PowerShell isn't offered for AArch64: the PowerShell shellcode-injection
# wrapper (rex-powershell) only knows how to spawn x86/x64 powershell.exe,
# so it can't be used to run AArch64 shellcode.
[ 'Automatic', { 'Arch' => [ARCH_X86, ARCH_X64, ARCH_AARCH64] } ],
[ 'PowerShell', { 'Arch' => [ARCH_X86, ARCH_X64] } ],
[ 'PowerShell', { 'Arch' => [ARCH_X86, ARCH_X64, ARCH_AARCH64] } ],
[ 'Native upload', { # upload a service executable
'Arch' => [ARCH_X86, ARCH_X64, ARCH_AARCH64],
# service executables place the payload within a segment, 1GiB is a practical max in many cases.
Expand Down Expand Up @@ -159,12 +156,7 @@ def exploit

case target.name
when 'Automatic'
# The PowerShell delivery path can only launch x86/x64 powershell.exe, so
# an AArch64 payload has to go straight to the native upload technique.
if payload_instance.arch.include?(ARCH_AARCH64)
print_status('Selecting native target')
native_upload_with_workaround(smbshare)
elsif powershell_installed?(smbshare, datastore['PSH_PATH'])
if powershell_installed?(smbshare, datastore['PSH_PATH'])
print_status('Selecting PowerShell target')
execute_powershell_payload
else
Expand Down
Loading