U.S. Dept Of Defense · Report #2599826
Boolen Based Blind Sql Injection Via User Agent in ███.mil
How it was found
Bug Bounty Report: Boolean-Based Blind SQL Injection
Summary
I have discovered a boolean-based blind SQL injection vulnerability in the User-Agent header of the https://███████.mil/ application. This vulnerability can be exploited to extract sensitive data from the backend database by leveraging boolean-based blind SQL injection techniques.
█████████
Impact
-
Information Disclosure: Attackers may infer database schema details and potentially sensitive information. Database and Web Server Details
-
Database Management System: MySQL 8 (MariaDB fork)
-
Web Server Operating System: Windows
-
Web Application Technology: Microsoft SharePoint 16.0.0.5452
System Host(s)
████████.mil
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Steps to Reproduce
-
Set Up SQLMap: Run the following
sqlmapcommand to initiate a boolean-based blind SQL injection test:sqlmap --url https://█████████.mil/ --random-agent -risk 3 --level 5 --batch -
Identify Vulnerable Parameter: The
User-Agentheader is used to inject payloads. In this case, I used the following payload to test the boolean-based blind injection:Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/523.10.3 (KHTML, like Gecko) Version/3.0.4 Safari/523.10' AND 8074=8074-- KwOG -
Confirm Vulnerability: By injecting the payload, you can observe that the application responds differently based on the boolean condition provided (
8074=8074). -
Test Using SQLMap or Burp Suite:
- SQLMap: You can use
sqlmapto further exploit the vulnerability and extract data. - Burp Suite: Manually craft and test boolean-based blind SQL injection payloads to infer database information.
- SQLMap: You can use
Suggested Mitigation/Remediation Actions
- Sanitize User Inputs: Ensure that all user inputs, including headers like
User-Agent, are properly sanitized and validated to prevent SQL injection attacks. - Use Prepared Statements: Implement parameterized queries using prepared statements to safeguard against SQL injection vulnerabilities.
- Regular Security Audits: Conduct regular security assessments and penetration testing to identify and mitigate potential vulnerabilities.
- Update and Patch Systems: Regularly update and patch all components of the web application and database management system to protect against known vulnerabilities