Skip to content

Commit 35bec8d

Browse files
author
Philippe Tranca
committed
Fixed classes names and added RMI interfaces
1 parent d345008 commit 35bec8d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

modules/exploits/multi/misc/java_jmx_server.rb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,22 @@ 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'
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'
205207
]
206208
ref = send_registry_lookup(name: datastore['JMXRMI'])
207209
return nil if ref.nil?
208210

209-
unless rmi_classes.include? ref[:object]
211+
unless rmi_classes_and_interfaces.include? ref[:object]
210212
vprint_error("JMXRMI discovery returned unexpected object #{ref[:object]}")
211213
return nil
212214
end

0 commit comments

Comments
 (0)