Skip to content

Commit dfb9941

Browse files
author
Philippe Tranca
committed
Fix java_jmx_server exploit
Add test case when discovering RMI endpoint as the previous one was not complete
1 parent eb8429c commit dfb9941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/multi/misc/java_jmx_server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def discover_endpoint
196196
ref = send_registry_lookup(name: datastore['JMXRMI'])
197197
return nil if ref.nil?
198198

199-
unless ref[:object] == 'javax.management.remote.rmi.RMIServerImpl_Stub'
199+
unless ref[:object] == 'javax.management.remote.rmi.RMIServer' || ref[:object] == 'javax.management.remote.rmi.RMIServerImpl_Stub'
200200
vprint_error("JMXRMI discovery returned unexpected object #{ref[:object]}")
201201
return nil
202202
end

0 commit comments

Comments
 (0)