本来、ファジングして、インジェクションの脆弱性があった場合、そのレポートにおいて、インジェクションだった場合とエラーを吐いた場合をLLMモデルで学習し、さらに良いテストコードを作成させるツールにするつもりでしたが、SecHack365の選考で落選したため、OSSとして上げておきます。どうぞ煮るなり何なりしてください。 問題は、ファジングしたとしても、正常なレスポンスと異常なレスポンスとの差異がどちらも存在するため、インジェクションを検出できているのかが、不明になっていることです。構文エラーはございません。
This tool is a Python-based script designed for testing various injection vulnerabilities in web applications. It includes modules for testing XSS, SQL injection, NoSQL injection, OS command injection, CRLF injection, LDAP injection, XPath injection, XSLT injection, XXE vulnerabilities, and more. This tool is based on all injection vulnerabilities in hacktricks.
- Cross-Site Scripting (XSS)
- SQL Injection
- NoSQL Injection
- OS Command Injection
- HTTP Header Injection
- LDAP Injection
- CRLF Injection
- Unicode Injection
- XPath Injection
- XSLT Injection
- XML External Entity (XXE) Injection
- Python 3.x
- Libraries:
- requests
- json
- ldap3
- lxml
Install the required dependencies using:
pip install -r requirements.txtRun the script with the target URL as an argument:
python fuzzing.py <URL> or python fuzzing.py <URL> [username_field] [password_field] [query_field]
python fuzzing.py https://example.comThis tool uses predefined payloads for various injection types. Below are some examples:
<script>alert('XSS');</script>
<img src=x onerror=alert('XSS')>' OR '1'='1
1' UNION SELECT NULL, NULL--{ "username": { "$ne": "" } }
{ "username": "admin", "password": { "$ne": "" } }%0d%0aSet-Cookie: admin=true
%0d%0aContent-Length: 0%0d%0aInjected-Header: test
*)(&(objectClass=*))
*)|(&(objectCategory=person)(objectClass=user))
%u0027
%u003Cscript%u003Ealert(1)%u003C/script%u003E
<!DOCTYPE foo [
<!ELEMENT foo ANY >
<!ENTITY xxe SYSTEM "file:///etc/passwd" >
]>
<foo>&xxe;</foo>Tests a given URL with payloads to detect general vulnerabilities.
Tests for NoSQL injection vulnerabilities using JSON payloads.
Tests for Server-Side Template Injection (CSTI).
Tests HTTP header injection by modifying headers with payloads.
Tests LDAP injection vulnerabilities.
Tests JSON injection vulnerabilities by modifying JSON request bodies.
Tests CRLF injection vulnerabilities by appending payloads to query parameters.
Tests Unicode-based injection vulnerabilities.
Fetches and parses XML data from the target URL.
Tests XPath injection vulnerabilities using XPath payloads.
Tests XSLT injection vulnerabilities using crafted XSLT payloads.
Tests XXE vulnerabilities by processing XML with external entity references.
- Ensure you have proper authorization before testing a target system.
- Use responsibly and only for ethical penetration testing.
This tool is open-source and available under the MIT License. Feel free to use and modify it for your testing needs.