- Introduction
- Installation
- Command Line Interface
- Core Functionality
- Output Format
- Practical Examples
- Advanced Usage
- Troubleshooting
- API Reference
- Development
WebForensicAnalyzer is a comprehensive tool for website reconnaissance and forensic analysis. It's designed to help security professionals, researchers, and digital investigators gather detailed information about websites and web applications.
The tool addresses the need for a unified approach to web reconnaissance by combining multiple techniques:
- Domain information gathering
- Server technology detection
- Content discovery
- Contact information extraction
- Security assessment
- Data leak identification
WebForensicAnalyzer is built on a modular architecture, with key components including:
- Core analysis engine
- Multi-threaded crawler
- Data extraction modules
- Security analyzer
- Integration modules (Shodan, Nmap)
- Python 3.8 or higher
- 4GB RAM (recommended for deep crawls)
- Internet connection
- Optional: Nmap installation
# Clone the repository
git clone https://github.com/yourusername/WebForensicAnalyzer.git
cd WebForensicAnalyzer
# Install required packages
pip install -r requirements.txt
# Make the script executable
chmod +x WebForensicAnalyzer.py# Build the Docker image
docker build -t webforensicanalyzer .
# Run with Docker
docker run --rm webforensicanalyzer example.com- Modify the
docker-compose.ymlfile to set your target URL and options - Run:
docker-compose up
WebForensicAnalyzer.py [URL] [OPTIONS]
| Option | Long Option | Description | Default |
|---|---|---|---|
-d |
--depth |
Crawling depth (1-3) | 1 |
-o |
--output |
Output file path (JSON format) | None |
-t |
--timeout |
Request timeout in seconds | 10 |
-v |
--verbose |
Enable verbose output | False |
--delay |
Delay between requests in seconds | 0.5 | |
--user-agent |
Custom User-Agent string | Mozilla/5.0... | |
--shodan-api-key |
Shodan API key | None | |
--proxy |
Proxy URL | None |
Basic scan:
./WebForensicAnalyzer.py example.comDeep scan with output file:
./WebForensicAnalyzer.py example.com -d 3 -o results.jsonScan with custom settings:
./WebForensicAnalyzer.py example.com -v --delay 1.0 --proxy http://127.0.0.1:8080This module collects fundamental domain information:
- IP address resolution
- WHOIS data (registrar, creation date, expiration)
- DNS records (A, AAAA, MX, NS, TXT, SOA, CNAME)
Identifies server characteristics:
- Server type and version from HTTP headers
- Technology stack detection
- SSL/TLS certificate analysis
- Shodan intelligence (if configured)
- Port scanning (if Nmap is available)
The crawler module navigates through website pages:
- Respects crawl depth settings
- Multi-threaded processing
- Intelligent URL normalization
- Rate limiting to prevent overloading servers
Analyzes website content:
- Links (internal, external, resources)
- Forms and input fields
- Title and meta information
- Content type identification
Identifies contact details:
- Email addresses
- Phone numbers
- Social media profiles
Evaluates security aspects:
- Security headers analysis
- HTTPS configuration
- Mixed content detection
- Open redirect vulnerability checking
- CSRF protection assessment
Searches for potentially sensitive information:
- API keys
- Authentication tokens
- Internal paths
- Database connection strings
- Private keys
{
"metadata": {
"target": "https://example.com",
"timestamp": "2023-04-01 12:34:56",
"scan_duration": "45.32 seconds"
},
"domain_info": {
"ip_address": "93.184.216.34",
"whois": {
"registrar": "Example Registrar, Inc.",
"creation_date": "1995-08-14T00:00:00Z",
"expiration_date": "2023-08-13T00:00:00Z",
"name_servers": ["ns1.example.com", "ns2.example.com"]
},
"dns_records": {
"A": ["93.184.216.34"],
"MX": ["10 mail.example.com"],
"NS": ["ns1.example.com", "ns2.example.com"]
}
},
"server_info": {
"Server": "Apache/2.4.41",
"X-Powered-By": "PHP/7.4.3",
"ssl_certificate": {
"issuer": {"organizationName": "Let's Encrypt"},
"notAfter": "2023-06-01T12:00:00Z"
},
"ports": {
"80": {"state": "open", "service": "http"},
"443": {"state": "open", "service": "https"}
}
},
"technologies": {
"web_server": "Apache/2.4.41",
"framework": "PHP/7.4.3",
"javascript_frameworks": ["jQuery", "Bootstrap"],
"cms": ["WordPress"]
},
"contacts": {
"emails": ["contact@example.com", "support@example.com"],
"phones": ["+1-555-123-4567"],
"social_media": {
"Twitter": ["exampleofficial"],
"LinkedIn": ["company/example"]
}
},
"security_info": {
"https": true,
"missing_security_headers": ["Content-Security-Policy", "X-Frame-Options"],
"mixed_content": false,
"potential_open_redirects": [],
"forms_without_csrf": ["https://example.com/contact"]
},
"content": {
"pages": {
"https://example.com/": {
"title": "Example Domain",
"status_code": 200,
"content_type": "text/html; charset=UTF-8",
"length": 1256
}
},
"forms": [
{
"page_url": "https://example.com/contact",
"action": "/submit",
"method": "POST",
"inputs": [
{"type": "text", "name": "name", "required": true},
{"type": "email", "name": "email", "required": true}
]
}
],
"links": {
"internal": ["https://example.com/about", "https://example.com/contact"],
"external": ["https://twitter.com/exampleofficial"],
"resources": ["https://example.com/style.css", "https://example.com/logo.png"]
},
"data_leaks": [
{
"type": "API Key",
"url": "https://example.com/js/main.js",
"context": "apiKey = '[API_KEY_VALUE]';"
}
]
}
}For a quick overview of a domain:
./WebForensicAnalyzer.py example.comThis provides essential information about the domain, server, and basic content structure.
For security evaluation:
./WebForensicAnalyzer.py example.com -d 2 -o security_report.jsonThis performs a more thorough analysis, with focus on security aspects and potential vulnerabilities.
For comprehensive content mapping:
./WebForensicAnalyzer.py example.com -d 3 --delay 1.0 -o content_map.jsonThis conducts a deep crawl, discovering as much content as possible while respecting server load with a 1-second delay.
For privacy-focused reconnaissance:
./WebForensicAnalyzer.py example.com --proxy socks5://127.0.0.1:9050This routes all requests through a proxy (in this example, a local Tor proxy).
To leverage Shodan's extensive internet device database:
export SHODAN_API_KEY="your-api-key-here"
./WebForensicAnalyzer.py example.comOr:
./WebForensicAnalyzer.py example.com --shodan-api-key "your-api-key-here"For specialized scanning needs:
./WebForensicAnalyzer.py example.com --user-agent "Mozilla/5.0 (compatible; CustomBot/1.0)"The JSON output can be further processed with tools like jq:
./WebForensicAnalyzer.py example.com -o - | jq '.security_info'For scanning multiple targets:
cat targets.txt | while read target; do
./WebForensicAnalyzer.py "$target" -o "reports/${target//\//_}.json"
doneProblem: Unable to connect to target website. Solution: Check internet connection, verify the URL, or try increasing the timeout:
./WebForensicAnalyzer.py example.com -t 30Problem: Target website is blocking requests due to rate limiting. Solution: Increase the delay between requests:
./WebForensicAnalyzer.py example.com --delay 2.0Problem: Import errors when running the tool. Solution: Verify all dependencies are installed:
pip install -r requirements.txtFor detailed execution information:
./WebForensicAnalyzer.py example.com -vThe main class that orchestrates the analysis process.
analyzer = WebForensicAnalyzer(
url="example.com",
depth=2,
timeout=10,
output="results.json",
verbose=True,
delay=0.5,
user_agent="Custom User Agent",
shodan_api_key="API_KEY",
proxy="http://proxy:port"
)
results = analyzer.analyze()Runs the complete analysis process.
Collects domain registration and DNS information.
Gathers server information from HTTP headers.
Crawls the website to the specified depth.
Evaluates security aspects of the website.
WebForensicAnalyzer/
├── WebForensicAnalyzer.py # Main script
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── README.md # Project overview
├── DOCUMENTATION.md # Detailed documentation
├── LICENSE # License information
└── docs/ # Additional documentation
To extend the tool with new capabilities:
- Fork the repository
- Create a feature branch
- Implement your changes
- Add appropriate tests
- Submit a pull request
- Follow PEP 8 style guidelines
- Add docstrings for all classes and methods
- Include type hints for function parameters and return values
- Write unit tests for new functionality
This documentation is maintained by the WebForensicAnalyzer team. For questions or suggestions, please open an issue on the project repository.