Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exploit for Cisco Data Center Network Manager file upload #12058

Merged
merged 12 commits into from
Aug 30, 2019

Conversation

pedrib
Copy link
Contributor

@pedrib pedrib commented Jul 6, 2019

  DCNM exposes a file upload servlet (FileUploadServlet) at /fm/fileUpload.
  An authenticated user can abuse this servlet to upload a WAR to the Apache Tomcat webapps
  directory and achieve remote code execution as root.
  This module exploits two other vulnerabilities, CVE-2019-1619 for authentication bypass on
  versions 10.4(2) and below, and CVE-2019-1622 (information disclosure) to obtain the correct
  directory for the WAR file upload.
  This module was tested on the DCNM Linux virtual appliance 10.4(2), 11.0(1) and 11.1(1), and should
  work on a few versions below 10.4(2). Only version 11.0(1) requires authentication to exploit
  (see References to understand why).

Tested and working on 10.4(2) up to 11.1(1).
See
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-bypass
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-codex
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-infodiscl

I will also have a full disclosure post soon with more details about the vulns, and will add the link here.

cisco_dcnm_upload_2019.rb Outdated Show resolved Hide resolved
cisco_dcnm_upload_2019.rb Outdated Show resolved Hide resolved
@acammack-r7
Copy link
Contributor

Looks cool @pedrib! I think this module would be more at home in modules/exploits/multi/http/ than in the root Metasploit directory.

Pedro Ribeiro and others added 2 commits July 11, 2019 12:11
Co-Authored-By: @shellfail <jrobles@rapid7.com>
Co-Authored-By: @shellfail <jrobles@rapid7.com>
@pedrib
Copy link
Contributor Author

pedrib commented Jul 11, 2019

@acammack-r7 sorry mate, I must have been half asleep when I submitted the module, it deifnitely should be in modules/exploits/multi/http

Pedro Ribeiro added 2 commits July 12, 2019 22:01
@pedrib
Copy link
Contributor Author

pedrib commented Jul 13, 2019

@acammack-r7 @wvu-r7 give me some time to address your points, I'm currently busy with other work! I don't like to make changes without testing locally with all the versions I have here (10.4.2, 11.0.1, 11.1.1), so need to downtime to address them. Please be patient!

@pedrib
Copy link
Contributor Author

pedrib commented Aug 2, 2019

@acammack-r7 @wvu-r7 all done, good to go!

@pedrib
Copy link
Contributor Author

pedrib commented Aug 14, 2019

ping!

@pedrib
Copy link
Contributor Author

pedrib commented Aug 22, 2019

yo guys!

@wvu
Copy link
Contributor

wvu commented Aug 22, 2019

Hey, why don't I handle this!

@wvu wvu self-assigned this Aug 22, 2019
@wvu
Copy link
Contributor

wvu commented Aug 29, 2019

Note to committers: please handle #12059 as well.

@pedrib
Copy link
Contributor Author

pedrib commented Aug 29, 2019

dcnm_uploadp.pcap.zip

Pcap attached

Copy link
Contributor

@wvu wvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would appreciate it if you applied the review from #12059, too.

modules/exploits/multi/http/cisco_dcnm_upload_2019.rb Outdated Show resolved Hide resolved
modules/exploits/multi/http/cisco_dcnm_upload_2019.rb Outdated Show resolved Hide resolved
modules/exploits/multi/http/cisco_dcnm_upload_2019.rb Outdated Show resolved Hide resolved
@pedrib
Copy link
Contributor Author

pedrib commented Aug 29, 2019

done! should be good to go!

@pedrib
Copy link
Contributor Author

pedrib commented Aug 29, 2019

all good!

@pedrib
Copy link
Contributor Author

pedrib commented Aug 29, 2019

all good?

@wvu
Copy link
Contributor

wvu commented Aug 29, 2019

I'm fine with the code, but we do require a module doc per module now. If you are unable to provide, I can handle it.

You can at least copy the module description, setup notes, and example output into a Markdown file. Usually takes me five minutes.

@wvu
Copy link
Contributor

wvu commented Aug 29, 2019

@wvu
Copy link
Contributor

wvu commented Aug 29, 2019

I'm going to sleep, but I'll check in on this and the other PR tomorrow.

@wvu
Copy link
Contributor

wvu commented Aug 30, 2019

@pedrib: This one has an f-d reference. Okay to land?

@wvu wvu added docs and removed needs-docs labels Aug 30, 2019
wvu added a commit that referenced this pull request Aug 30, 2019
@wvu wvu merged commit 23d7a0e into rapid7:master Aug 30, 2019
@wvu
Copy link
Contributor

wvu commented Aug 30, 2019

Release Notes

The Cisco Data Center Network Manager File Upload module has been added to the framework. It targets a vulnerability in DCNM that exposes a file upload servlet (FileUploadServlet) at /fm/fileUpload. An authenticated user can abuse this servlet to upload a WAR to the Apache Tomcat webapps directory and achieve remote code execution as root.

@pedrib pedrib deleted the dcnm_upload-1 branch August 30, 2019 18:45
jmartin-tech pushed a commit that referenced this pull request Aug 30, 2019
@tdoan-r7 tdoan-r7 added the rn-modules release notes for new or majorly enhanced modules label Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs module rn-modules release notes for new or majorly enhanced modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants