
Directory traversal exploit finder
Why Choose This Project
Directory Traversal (Path Traversal) is a critical web vulnerability where attackers manipulate file paths to access restricted files on a server, such as /etc/passwd
or C:\Windows\System32
. This tool detects whether a web application is vulnerable by fuzzing URL parameters and file inputs with traversal payloads. It’s a vital skill for ethical hackers, bug bounty hunters, and web security testers.
What You Get in This Project
A scanner that detects directory traversal vulnerabilities in URLs or file paths by automatically injecting payloads and checking for unintended file access. It shows severity, test vectors, and mitigation steps.
Technology Stack
Layer | Technologies Used |
---|---|
Frontend | HTML, CSS, JavaScript, Bootstrap |
Backend | Python (Flask), or Node.js (Express) |
Scanner | Python: requests , urllib OR Node: axios , path |
Database | SQLite / MongoDB (optional for scan logs) |
Report Tool | PDF generation: reportlab , or JS jsPDF |
How It Works
-
User Inputs Target URL
Users submit a target URL with possible file input (e.g.,file=path/to/file.txt
). -
Scanner Loads Payload List
Common traversal payloads like../
,..%2F
,%2e%2e/
,..\\
, and double-encoded versions are loaded. -
Request Injection
Each payload is injected into the target parameters to replace the file path. -
Response Analysis
The scanner analyzes responses for signs of sensitive files:-
Linux:
/etc/passwd
,/var/log/auth.log
-
Windows:
boot.ini
,windows/win.ini
-
-
Detection & Logging
If successful (status 200 and file signature detected), it's flagged as vulnerable. -
Result Display
A detailed report shows:-
URL tested
-
Payload used
-
Vulnerable or not
-
Suggested mitigation
-
-
Report Export
Users can download the scan report.
Key Features
Feature | Description |
---|---|
Automated Payload Injection | Tests multiple traversal payloads into parameters automatically |
Cross-platform Checks | Looks for both Linux and Windows system files |
Response Fingerprinting | Detects specific file content like /etc/passwd headers |
Exploit Report | Highlights vulnerable parameters and recommended fix |
PDF/CSV Export | Downloadable vulnerability report |
REST API Support (Optional) | Allow integration with CI/CD tools or external dashboards |
Custom Payload Upload | Option to add your own traversal payloads |