Skip to content
Open
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
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ PATH
rex-mime
rex-nop
rex-ole
rex-powershell
rex-powershell (>= 0.1.105)
rex-random_identifier
rex-registry
rex-rop_builder
Expand Down 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
2 changes: 1 addition & 1 deletion metasploit-framework.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Gem::Specification.new do |spec|
# Library for Generating Randomized strings valid as Identifiers such as variable names
spec.add_runtime_dependency 'rex-random_identifier'
# library for creating Powershell scripts for exploitation purposes
spec.add_runtime_dependency 'rex-powershell'
spec.add_runtime_dependency 'rex-powershell', '>= 0.1.105'
# Library for processing and creating Zip compatbile archives
spec.add_runtime_dependency 'rex-zip'
# Library for parsing offline Windows Registry files
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