A modular and automation-friendly framework for directory traversal vulnerability testing. It combines recon, GPT-powered payload generation, login-aware fuzzing, and detailed reporting—all in one tool with both CLI and GUI support.
- 🔍 Contextual Reconnaissance — Crawls the target for environment context (OS, server type, inputs)
- 🤖 LLM-Based Payload Generation — Uses fine-tuned GPT models to generate traversal payloads
- 🧼 Post-Processing — Cleans and adapts payloads to the target structure
- 🔐 Login-Aware Fuzzing — Supports session-based fuzzing using credentials
- 📊 Report Generation — Generates structured reports in JSON
- 💡 Recommendations — Provides remediation suggestions
- 🖥️ Interactive CLI and Argument-Based CLI
- ✅ Pytest-Ready with CI Integration
traversal_tester/
├── cli_args.py # CLI that accepts command-line arguments
├── main.py # Interactive CLI (no args)
├── recon.py # Crawler + Context builder
├── payload_gen.py # GPT-based payload generator
├── payload_postprocess.py # Payload cleaner/enhancer
├── fuzzer.py # Login + Fuzzing logic
├── reporter.py # Generates JSON reports
├── recommender.py # Suggests fixes based on findings
tests/
└── test_smoke_scan.py # End-to-end test with monkeypatched modules
.github/
└── workflows/
└── ci.yml # GitHub Actions CI workflow
git clone https://github.com/yourusername/autopentesting-recon.git
cd autopentesting-recon
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
pip install -e .Launch and fill in each field interactively:
python -m traversal_tester.mainRun a full scan with one command:
python -m traversal_tester.cli_args \
http://localhost:8000 \
--model-dir finetuned_gpt_v2 \
--num-payloads 5 \
--max-pages 3 \
--threads 2 \
--timeout 5 \
--username admin \
--password adminRun unit and smoke tests:
pytestMonkeypatched tests simulate recon, payload generation, login, fuzzing, and reporting.
This project includes a CI pipeline under:
.github/workflows/ci.yml
- Checkout Repo
- Set up Python 3.10
- Install Dependencies
- Run Tests using Pytest
Static analysis (e.g. Ruff, Bandit, Black) not yet implemented
- Python 3.10+
- Dependencies:
clicktransformerstorchrequestsdashpytest
Install them with:
pip install -r requirements.txt- ✅ Report: Saved as JSON in the root folder
- 💡 Recommendations: Printed in console after report generation
Muhammad Wasif
BSc Computer Science, ITU
This tool is intended for educational and authorized penetration testing only. Do not use on systems you do not own or have explicit permission to test.
Feel free to open issues or contribute pull requests to improve the framework.