-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on report generation #605
Comments
Quick way to reproduce: wapiti -v2 -u http://testphp.vulnweb.com/userinfo.php --flush-session --color --scope page -s http://testphp.vulnweb.com/login.php -m sql The crash occurs in the HTML report generation, never saw that case before so it is a recent bug. Mako generation is called in mytemplate.render_unicode(
wapiti_version=self._infos["version"],
target=self._infos["target"],
scan_date=self._infos["date"],
scan_scope=self._infos["scope"],
auth_dict=self._infos["auth"],
auth_form_dict=self._infos["auth"]["form"] if self._infos.get("auth") is not None else None,
crawled_pages_nbr=self._infos["crawled_pages_nbr"],
vulnerabilities=self._vulns,
anomalies=self._anomalies,
additionals=self._additionals,
flaws=self._flaw_types,
level_to_emoji=level_to_emoji,
detailed_report_level=self._infos["detailed_report_level"]
) The most obvious cause concerns the flaw definitions, especially the flaw type should be Using the debugger, it is easy to check it out. Dump of {
'Backup file': [],
'Weak credentials': [],
'CRLF Injection': [],
'Content Security Policy Configuration': [],
'Cross Site Request Forgery': [],
'Potentially dangerous file': [],
'Command execution': [],
'Path Traversal': [],
'Fingerprint web application framework': [],
'Fingerprint web server': [],
'Htaccess Bypass': [],
'HTML Injection': [],
'HTTP Secure Headers': [],
'HttpOnly Flag cookie': [],
'Unencrypted Channels': [],
'LDAP Injection': [],
'Log4Shell': [],
'Open Redirect': [],
'Reflected Cross Site Scripting': [],
'Secure Flag cookie': [],
'Spring4Shell': [],
'SQL Injection': [],
'TLS/SSL misconfigurations': [],
'Server Side Request Forgery': [],
'Stored HTML Injection': [],
'Stored Cross Site Scripting': [],
'Subdomain takeover': [],
'Blind SQL Injection': [],
'Unrestricted File Upload': [],
'XPATH Injection': [],
'XML External Entity': [],
'SQL Injection (DBMS: MySQL)': [
{'method': 'POST', 'path': '/userinfo.php', 'info': 'SQL Injection (DBMS: MySQL) via injection in the parameter uname', 'level': 4, 'parameter': 'uname', 'referer': 'http://testphp.vulnweb.com/login.php', 'module': 'sql', 'http_request': 'POST /userinfo.php HTTP/1.1\nhost: testphp.vulnweb.com\nconnection: keep-alive\nuser-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0\naccept-language: en-US\naccept-encoding: gzip, deflate, br\naccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\ncontent-type: application/x-www-form-urlencoded\nreferer: http://testphp.vulnweb.com/login.php\ncontent-length: 42\nContent-Type: application/x-www-form-urlencoded\n\nuname=default%C2%BF%27%22%28&pass=Letm3in_', 'curl_command': 'curl "http://testphp.vulnweb.com/userinfo.php" -e "http://testphp.vulnweb.com/login.php" -d "uname=default%C2%BF%27%22%28&pass=Letm3in_"', 'wstg': ['WSTG-INPV-05']},
{'method': 'POST', 'path': '/userinfo.php', 'info': 'SQL Injection (DBMS: MySQL) via injection in the parameter pass', 'level': 4, 'parameter': 'pass', 'referer': 'http://testphp.vulnweb.com/login.php', 'module': 'sql', 'http_request': 'POST /userinfo.php HTTP/1.1\nhost: testphp.vulnweb.com\nconnection: keep-alive\nuser-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0\naccept-language: en-US\naccept-encoding: gzip, deflate, br\naccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\ncontent-type: application/x-www-form-urlencoded\nreferer: http://testphp.vulnweb.com/login.php\ncontent-length: 41\nContent-Type: application/x-www-form-urlencoded\n\nuname=default&pass=default%C2%BF%27%22%28', 'curl_command': 'curl "http://testphp.vulnweb.com/userinfo.php" -e "http://testphp.vulnweb.com/login.php" -d "uname=default&pass=default%C2%BF%27%22%28"', 'wstg': ['WSTG-INPV-05']}
]
} Dump of dict_keys(['Backup file', 'Weak credentials', 'CRLF Injection', 'Content Security Policy Configuration', 'Cross Site Request Forgery', 'Potentially dangerous file', 'Command execution', 'Path Traversal', 'Fingerprint web application framework', 'Fingerprint web server', 'Htaccess Bypass', 'HTML Injection', 'HTTP Secure Headers', 'HttpOnly Flag cookie', 'Unencrypted Channels', 'LDAP Injection', 'Log4Shell', 'Open Redirect', 'Reflected Cross Site Scripting', 'Secure Flag cookie', 'Spring4Shell', 'SQL Injection', 'TLS/SSL misconfigurations', 'Server Side Request Forgery', 'Stored HTML Injection', 'Stored Cross Site Scripting', 'Subdomain takeover', 'Blind SQL Injection', 'Unrestricted File Upload', 'XPATH Injection', 'XML External Entity', 'Internal Server Error', 'Resource consumption', 'Review Webserver Metafiles for Information Leakage', 'Fingerprint web technology', 'HTTP Methods']) This is related to the latest change made to mod_sql: 28f786d?diff=unified&w=0#diff-db48ed409620db2a8ba75ce5ebcd56cb5063506ea1cfd504f338eecc76f75872L388 We need to put back NAME as parameter for As LDAP injection is also covered by that module we should either:
As there is now an ini file for ldap payloads and functions specific to LDAP it should be better to create a specific module and tackle the bug. |
Hi @devl00p
Yes indeed
Why not, if it does not add to much duplicate code |
PR #607 |
fixed |
Bumped into that one, requires more investigation. Python 3.12.
The text was updated successfully, but these errors were encountered: