Added all the classes that implement RMI server

MS-2855/keylogger-mettle-extension
Philippe Tranca 2018-01-17 17:03:32 +01:00
parent dfb9941e95
commit d345008b20
1 changed files with 11 additions and 1 deletions

View File

@ -193,10 +193,20 @@ class MetasploitModule < Msf::Exploit::Remote
end
def discover_endpoint
rmi_classes = [
'RMIConnectionImpl',
'RMIConnectionImpl_Stub',
'RMIConnector',
'RMIConnectorServer',
'RMIIIOPServerImpl',
'RMIJRMPServerImpl',
'RMIServerImpl',
'RMIServerImpl_Stub'
]
ref = send_registry_lookup(name: datastore['JMXRMI'])
return nil if ref.nil?
unless ref[:object] == 'javax.management.remote.rmi.RMIServer' || ref[:object] == 'javax.management.remote.rmi.RMIServerImpl_Stub'
unless rmi_classes.include? ref[:object]
vprint_error("JMXRMI discovery returned unexpected object #{ref[:object]}")
return nil
end