Professional Web Security Assessment Tool
Project description
๐ก๏ธ ShieldScan - Professional Web Security Assessment Tool
ShieldScan is a professional, ethical web security assessment tool designed for authorized penetration testing. It provides comprehensive OWASP Top 10 vulnerability detection with a focus on safety, legal compliance, and responsible disclosure.
โ ๏ธ Legal Notice
USE THIS TOOL RESPONSIBLY AND LEGALLY
- โ Only use on systems you own or have explicit written authorization to test
- โ Obtain proper consent before running in active mode
- โ Respect rate limits and avoid causing service disruption
- โ Unauthorized access to computer systems is illegal under applicable laws
- โ The authors assume no liability for misuse of this tool
๐ Features
Safe-by-Default Design
- Passive Mode (Default): Non-intrusive reconnaissance and header analysis
- Active Mode: Requires explicit consent file for intrusive testing
- Rate Limiting: Configurable request throttling (default: 1 req/sec)
- Dry Run: Preview checks without sending requests
Comprehensive Security Checks
โ
HTTP Security Headers: CSP, HSTS, X-Frame-Options, etc.
โ
Cookie Security: Secure, HttpOnly, SameSite attributes
โ
XSS Detection: Reflected XSS using benign markers
โ
SQL Injection: Error-based detection (non-destructive)
โ
CORS Misconfiguration: Wildcard and origin reflection
โ
Directory Listing: Common directory exposure
โ
Open Redirect: Parameter-based redirect testing
โ
Clickjacking: Frame protection analysis
Professional Reporting
- JSON: Structured data for automation
- Markdown: Stakeholder-friendly reports
- HTML: Styled web reports with severity visualization
- Console: Real-time terminal output
Reconnaissance
- ๐ robots.txt and sitemap.xml parsing
- ๐ Intelligent link discovery and crawling
- ๐ Form and input parameter extraction
- ๐ง Technology fingerprinting
๐ฆ Installation
From Source
# Clone the repository
git clone https://github.com/yourusername/shieldscan.git
cd shieldscan
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
Using pip (once published)
pip install shieldscan
๐ฏ Quick Start
1. Basic Passive Scan (Safe)
shieldscan scan --target https://example.com --output report.json
This performs non-intrusive checks:
- Security header analysis
- Cookie configuration
- CORS policy review
- Basic reconnaissance
2. Active Scan with Consent
First, create a consent file (see examples/consent_template.txt):
# Edit consent file with authorization details
cp examples/consent_template.txt my_consent.txt
nano my_consent.txt
Then run active scan:
shieldscan scan \
--target https://authorized-site.com \
--mode active \
--consent-file my_consent.txt \
--output report.md \
--format markdown
3. Scan Multiple Targets
# Create file with URLs (one per line)
cat > targets.txt << EOF
https://example.com
https://test.example.com
EOF
shieldscan scan --target-file targets.txt --format all --output results
4. Dry Run (Preview)
shieldscan scan --target https://example.com --dry-run
๐ง Usage
Command-Line Options
shieldscan scan [OPTIONS]
Target Options:
--target URL Single target URL
--target-file FILE File with URLs (one per line)
Scan Options:
--mode MODE Scanning mode: passive (default) or active
--consent-file FILE Consent file (required for active mode)
--throttle FLOAT Requests per second (default: 1.0)
--max-depth INT Maximum crawl depth (default: 2)
Output Options:
--output FILE Output file path
--format FORMAT Output format: json, markdown, html, all
Other Options:
--dry-run Show planned checks without executing
--no-logo Suppress logo display
-v, --verbosity LEVEL Logging verbosity: 0 (warn), 1 (info), 2 (debug)
Examples
Comprehensive scan with all report formats:
shieldscan scan \
--target https://example.com \
--format all \
--output comprehensive_report \
--throttle 2.0 \
--max-depth 3
Quiet passive scan:
shieldscan scan --target https://example.com --verbosity 0 --no-logo
Active scan with custom rate limit:
shieldscan scan \
--target https://authorized.com \
--mode active \
--consent-file consent.txt \
--throttle 0.5 \
--output detailed_scan.html \
--format html
๐ Consent File Format
Active mode requires a consent file with the following information:
TARGET: https://example.com
SIGNATURE: John Doe
DATE: 2025-10-29
See examples/consent_template.txt for a complete template.
๐๏ธ Architecture
ShieldScan follows a modular design:
โโโโโโโโโโโโโโโ
โ CLI โ โ Entry point, argument parsing
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Scanner โ โ Orchestrates scan workflow
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ โ โ โ
โโโโโโโโผโโโโโโโ โโโโโโผโโโโโโ โโโโโโผโโโโโโ โโโโโโโผโโโโโโโ
โ HTTP Client โ โ Gatherer โ โ VulnCheckโ โ Reporter โ
โ (Rate Ltd.) โ โ (Recon) โ โ (Detect) โ โ (Output) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ
Modules
- cli.py: Command-line interface with argparse
- scanner.py: Core orchestration engine
- http_client.py: HTTP wrapper with rate limiting and retries
- gather.py: Reconnaissance (robots.txt, sitemap, crawling)
- vuln_checks.py: Vulnerability detection checks
- reporter.py: Multi-format report generation
- utils.py: Common utilities and helpers
- logo.py: ASCII branding
๐งช Testing
Run the test suite:
# Run all tests
pytest
# With coverage
pytest --cov=web_pentest_cli --cov-report=html
# Run specific test file
pytest tests/test_utils.py -v
๐ Adding Custom Checks
ShieldScan supports plugin-style vulnerability checks:
from web_pentest_cli.vuln_checks import VulnerabilityCheck, VulnerabilityResult
class CustomCheck(VulnerabilityCheck):
@property
def check_id(self) -> str:
return "CUSTOM-001"
@property
def check_name(self) -> str:
return "My Custom Check"
def check(self, target_url: str, context: dict) -> List[VulnerabilityResult]:
# Implement your check logic
results = []
response = self.client.get(target_url)
if response and "vulnerable_pattern" in response.text:
results.append(VulnerabilityResult(
vuln_id=self.check_id,
name="Custom Vulnerability",
severity="medium",
confidence="high",
description="Description of the issue",
evidence="Evidence from response",
remediation="How to fix it"
))
return results
๐ Sample Output
Console Summary
================================================================================
SCAN SUMMARY
================================================================================
Target: https://example.com
Scan ID: scan_1730193600
Duration: 12.45 seconds
Requests: 23
Total Vulnerabilities: 5
Severity Breakdown:
HIGH: 2
MEDIUM: 2
LOW: 1
================================================================================
JSON Report Structure
{
"scan_id": "scan_1730193600",
"target_url": "https://example.com",
"mode": "passive",
"vulnerabilities": [
{
"vuln_id": "SEC-HEADERS-001-csp",
"name": "Missing Content-Security-Policy Header",
"severity": "medium",
"confidence": "high",
"description": "CSP header is missing",
"evidence": "Header 'content-security-policy' not found",
"remediation": "Implement CSP to prevent XSS",
"references": ["https://owasp.org/..."]
}
],
"statistics": {
"total_vulnerabilities": 5,
"severity_breakdown": {"high": 2, "medium": 2, "low": 1}
}
}
๐ ๏ธ Development
Setup Development Environment
# Install with dev dependencies
pip install -e ".[dev]"
# Format code
black web_pentest_cli/
# Lint
flake8 web_pentest_cli/
# Type checking
mypy web_pentest_cli/
Project Structure
shieldscan/
โโโ web_pentest_cli/
โ โโโ __init__.py
โ โโโ cli.py
โ โโโ scanner.py
โ โโโ http_client.py
โ โโโ gather.py
โ โโโ vuln_checks.py
โ โโโ reporter.py
โ โโโ utils.py
โ โโโ logo.py
โโโ tests/
โ โโโ test_utils.py
โ โโโ test_http_client.py
โ โโโ test_vuln_checks.py
โโโ examples/
โ โโโ consent_template.txt
โ โโโ example_urls.txt
โโโ README.md
โโโ requirements.txt
โโโ setup.py
โโโ pyproject.toml
๐ References
๐ License
MIT License - see LICENSE file for details.
๐จโ๐ป Author
Dr. Ing. [Marzouk Mohamed Amine]
๐ง Email: med.amine.mzk@gmail.com or mohamedamin.marzouk@sousse.r-iset.tn
๐๏ธ Institution: University of Sousse
๐ฌ Research: Internet of Vehicles, Security Testing, Traffic Optimization
๐ค Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
๐ Support
For issues, questions, or contributions:
- ๐ Report bugs: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ง Email: med.amine.mzk@gmail.com or mohamedamin.marzouk@sousse.r-iset.tn
โก Disclaimer
This tool is provided for educational and authorized testing purposes only. The authors and contributors:
- Are not responsible for any misuse or damage caused by this tool
- Do not endorse illegal activities
- Recommend obtaining proper authorization before testing
- Advise consulting legal counsel regarding testing activities
Always test responsibly and ethically.
Made with โค๏ธ for the security community
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shieldscan-1.0.21.tar.gz.
File metadata
- Download URL: shieldscan-1.0.21.tar.gz
- Upload date:
- Size: 31.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92bb688a96e8c0f06f4bc2bbe4cf3c4dc1e7f7fae61f706d0af0deb90c707af9
|
|
| MD5 |
3ac5d156e2207f58e42db4ffc55c4e1e
|
|
| BLAKE2b-256 |
caacdda71c687094e6c585908bfbc570e666baa88bf02337710e1990431380bd
|
File details
Details for the file shieldscan-1.0.21-py3-none-any.whl.
File metadata
- Download URL: shieldscan-1.0.21-py3-none-any.whl
- Upload date:
- Size: 35.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
930eb3bbece69b0ab5a231b0e687f8156f3d925cc6e3d69052aebb0f555bc0ac
|
|
| MD5 |
3ec53b7bd46714b7f2d73a723ba1dd9a
|
|
| BLAKE2b-256 |
153387df5ac4484d4b3676c5007b21d906df8f7a89c09ff31681c6c7021a1347
|