File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
modules/exploits/multi/misc Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -193,10 +193,22 @@ def is_rmi?
193
193
end
194
194
195
195
def discover_endpoint
196
+ rmi_classes_and_interfaces = [
197
+ 'javax.management.remote.rmi.RMIConnectionImpl' ,
198
+ 'javax.management.remote.rmi.RMIConnectionImpl_Stub' ,
199
+ 'javax.management.remote.rmi.RMIConnector' ,
200
+ 'javax.management.remote.rmi.RMIConnectorServer' ,
201
+ 'javax.management.remote.rmi.RMIIIOPServerImpl' ,
202
+ 'javax.management.remote.rmi.RMIJRMPServerImpl' ,
203
+ 'javax.management.remote.rmi.RMIServerImpl' ,
204
+ 'javax.management.remote.rmi.RMIServerImpl_Stub' ,
205
+ 'javax.management.remote.rmi.RMIConnection' ,
206
+ 'javax.management.remote.rmi.RMIServer'
207
+ ]
196
208
ref = send_registry_lookup ( name : datastore [ 'JMXRMI' ] )
197
209
return nil if ref . nil?
198
210
199
- unless ref [ :object ] == 'javax.management.remote.rmi.RMIServerImpl_Stub'
211
+ unless rmi_classes_and_interfaces . include? ref [ :object ]
200
212
vprint_error ( "JMXRMI discovery returned unexpected object #{ ref [ :object ] } " )
201
213
return nil
202
214
end
You can’t perform that action at this time.
0 commit comments