Skip to content

Commit d345008

Browse files
author
Philippe Tranca
committed
Added all the classes that implement RMI server
1 parent dfb9941 commit d345008

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

modules/exploits/multi/misc/java_jmx_server.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,20 @@ def is_rmi?
193193
end
194194

195195
def discover_endpoint
196+
rmi_classes = [
197+
'RMIConnectionImpl',
198+
'RMIConnectionImpl_Stub',
199+
'RMIConnector',
200+
'RMIConnectorServer',
201+
'RMIIIOPServerImpl',
202+
'RMIJRMPServerImpl',
203+
'RMIServerImpl',
204+
'RMIServerImpl_Stub'
205+
]
196206
ref = send_registry_lookup(name: datastore['JMXRMI'])
197207
return nil if ref.nil?
198208

199-
unless ref[:object] == 'javax.management.remote.rmi.RMIServer' || ref[:object] == 'javax.management.remote.rmi.RMIServerImpl_Stub'
209+
unless rmi_classes.include? ref[:object]
200210
vprint_error("JMXRMI discovery returned unexpected object #{ref[:object]}")
201211
return nil
202212
end

0 commit comments

Comments
 (0)