TL;DR
This paper introduces SecuBat, an open-source web vulnerability scanner that automatically discovers and exploits SQL injection and Cross-Site Scripting (XSS) vulnerabilities using a black-box approach. It aims to make web security auditing accessible and highlights the prevalence of these vulnerabilities in real-world applications.
What Problem Does This Paper Address?
The increasing reliance on web applications for everyday tasks has made web security a critical concern. Despite the relative simplicity of common vulnerabilities like SQL injection and XSS, many web developers lack security awareness, leading to a large number of vulnerable websites. Existing security tools often rely on databases of known vulnerabilities, failing to detect novel or zero-day exploits. This paper addresses the need for an automated, generic, and modular scanner that can discover and even demonstrate exploitable vulnerabilities without prior knowledge of specific bugs.
Methods
SecuBat employs a black-box testing approach, meaning it interacts with web applications without access to their source code. Its architecture consists of three main components:
- Crawling Component: This component efficiently discovers web pages and forms by using a multi-threaded, queued workflow system. It starts from a seed URL and explores the link tree, collecting all pages and forms.
- Attack Component: Once pages are crawled, this component identifies web forms and injects specially crafted input values into their fields. It then sends these modified requests to the web server and analyzes the responses.
- Analysis Modules: These modules interpret the server's responses to determine if an attack was successful. For SQL injection, this involves searching for specific error messages and keywords indicative of database errors. For XSS, it checks if injected scripts are reflected back in a way that would allow execution by a user's browser.
SecuBat also features a mechanism to automatically generate proof-of-concept exploits for detected vulnerabilities, increasing confidence in the findings. The system is designed to be modular, allowing for the addition of new attack and analysis plug-ins.
Datasets
Not discussed in the paper. The evaluation was performed on a set of 25,064 web pages collected by crawling a Google search results page for the term "login."
Key Insights and Ideas
- Ease of Automated Discovery: The paper demonstrates that attackers can automatically discover and exploit common web vulnerabilities with relative ease, posing a significant threat.
- Prevalence of Vulnerabilities: Even well-known global companies and governmental institutions have exploitable vulnerabilities, highlighting a widespread security awareness gap.
- Proof-of-Concept Exploits: The ability to automatically generate working proof-of-concept exploits for XSS vulnerabilities is a significant contribution, making the findings more concrete and actionable.
- Modular Architecture: SecuBat's plug-in architecture is a key design choice, allowing for extensibility and the addition of new attack types.
- XSS Evasion Techniques: The paper explores various techniques to bypass input sanitization, including HTML encoding and clever script placement, showcasing the sophistication of modern XSS attacks.
Key Results
During an evaluation run, SecuBat analyzed 21,627 distinct web forms and found that:
- SQL Injection: 6.63% of forms were potentially vulnerable (with a more realistic rate of 1.45% when a higher confidence threshold was applied).
- Simple XSS: 4.30% of forms were found to be vulnerable.
- Encoded XSS: 5.60% of forms were found to be vulnerable.
- Form-Redirecting XSS: 5.52% of forms were found to be vulnerable.
The paper also details a case study of www.geizhals.at, a popular Austrian price comparison portal, which was found to be vulnerable to form-redirecting XSS. The authors successfully demonstrated an exploit that could redirect user credentials to an attacker-controlled server.
Limitations and Future Work
- False Positives: The authors acknowledge that false positives are possible, particularly with the SQL injection detection, due to the reliance on keyword matching.
- Limited XSS Types: The initial prototype focused on reflected XSS and did not cover stored XSS attacks.
- Ethical Concerns with SQLi: The authors avoided manual verification of SQL injection vulnerabilities due to the risk of damaging data or breaking database integrity, a concern a real attacker would not share.
Future work includes:
- Implementing more attack plug-ins, such as those for directory traversal vulnerabilities.
- Improving the performance and throughput of the tool.
- Making the proof-of-concept implementation of SecuBat publicly available for developers to audit their applications.
Summary updated