wig
Overview
섹션 제목: “Overview”wig is a Web Information Gatherer designed to identify web application technologies and fingerprint CMSs (WordPress, Joomla, Drupal, etc.), web frameworks, programming languages, JavaScript libraries, and server software. It’s particularly useful for reconnaissance and vulnerability assessment during authorized penetration tests.
The tool combines multiple detection techniques including:
- HTTP header analysis
- HTML source code inspection
- File and directory detection
- Cookie analysis
- JavaScript library detection
Installation
섹션 제목: “Installation”From Source (GitHub)
섹션 제목: “From Source (GitHub)”git clone https://github.com/jekyller/wig.git
cd wig
pip install -r requirements.txt
python wig.py --help
Using pip
섹션 제목: “Using pip”pip install wig
wig --help
Docker
섹션 제목: “Docker”docker pull jekyller/wig
docker run -it jekyller/wig -h <target>
Kali Linux
섹션 제목: “Kali Linux”apt update && apt install wig -y
Basic Usage
섹션 제목: “Basic Usage”| Command | Description |
|---|---|
wig -h <target> | Scan a single target (domain or IP) |
wig -h <target> -v | Verbose output (more detailed detection) |
wig -h <target> -r | Return all detected plugins/themes/versions |
wig -h <target> -f <file> | Scan targets from file (one per line) |
wig -h <target> -o <file> | Output results to JSON file |
wig -h <target> -x <proxy> | Use HTTP proxy for scanning |
wig -h <target> --ssl | Force HTTPS connection |
Common Examples
섹션 제목: “Common Examples”Basic Fingerprinting
섹션 제목: “Basic Fingerprinting”wig -h example.com
Identifies the CMS, version, plugins, and themes running on the target. Output shows detected technologies with confidence levels.
Verbose Scanning with File Output
섹션 제목: “Verbose Scanning with File Output”wig -h example.com -v -o results.json
Performs detailed scanning and saves JSON-formatted results including all detected components, versions, and confidence scores.
Batch Scanning Multiple Targets
섹션 제목: “Batch Scanning Multiple Targets”cat targets.txt
# example1.com
# example2.com
# 192.168.1.100
wig -f targets.txt -o batch_results.json
Scans multiple targets from a file and consolidates results into a single JSON output.
Scanning Behind a Proxy
섹션 제목: “Scanning Behind a Proxy”wig -h example.com -x http://127.0.0.1:8080 -v
Routes traffic through a proxy (useful for intercepting with Burp Suite for further analysis).
Force HTTPS Scanning
섹션 제목: “Force HTTPS Scanning”wig -h secure.example.com --ssl -v
Ensures HTTPS is used for the connection, bypassing HTTP redirects.
Advanced Usage
섹션 제목: “Advanced Usage”Output Options
섹션 제목: “Output Options”# JSON output for parsing with jq
wig -h example.com -o data.json
cat data.json | jq '.cms[]'
# Combine with grep for quick filtering
wig -h example.com -v | grep -i "wordpress"
# Save full verbose output to file
wig -h example.com -v 2>&1 | tee scan.txt
Proxy Integration
섹션 제목: “Proxy Integration”# Scan through Burp Suite for further testing
wig -h example.com -x http://127.0.0.1:8080
# Use SOCKS5 proxy (requires additional setup)
wig -h example.com -x socks5://127.0.0.1:9050
Rate Limiting and Timing
섹션 제목: “Rate Limiting and Timing”# Standard scan (default timeout)
wig -h example.com
# The tool automatically handles rate limiting
# Useful for larger scans to avoid detection
Detection Methods
섹션 제목: “Detection Methods”HTTP Headers
섹션 제목: “HTTP Headers”wig analyzes response headers for server information, X-Powered-By, X-AspNet-Version, and other telltale indicators:
# View headers manually
curl -I https://example.com
# wig processes these automatically
wig -h example.com
HTML Source Analysis
섹션 제목: “HTML Source Analysis”The tool scans HTML for:
- Meta tags and generators
- CSS/JS file paths and versions
- Comments containing version info
- Framework-specific code patterns
File and Directory Detection
섹션 제목: “File and Directory Detection”# wig checks for known CMS files/directories
# wp-admin/ (WordPress)
# joomla.php (Joomla)
# drupal (Drupal)
# README files with version info
Cookie Analysis
섹션 제목: “Cookie Analysis”Examines cookies for CMS-specific values like:
- PHPSESSID variations
- WordPress-specific cookies
- Joomla tokens
Interpreting Results
섹션 제목: “Interpreting Results”Understanding the Output
섹션 제목: “Understanding the Output”[+] CMS: WordPress (3 plugins detected)
[+] Version: 5.9.2 (confidence: 95%)
[+] Plugins:
- WooCommerce (v6.1.0)
- Yoast SEO (v18.0)
- Contact Form 7
Confidence Levels:
- High (90%+): Version determined by file hashes or exact version strings
- Medium (60-89%): Based on multiple indicators
- Low (<60%): Single indicator or generic detection
JSON Output Structure
섹션 제목: “JSON Output Structure”{
"target": "example.com",
"scan_date": "2024-01-15T10:30:00",
"cms": {
"name": "WordPress",
"version": "5.9.2",
"confidence": "95%"
},
"plugins": [...],
"themes": [...],
"headers": {...}
}
Advanced Techniques
섹션 제목: “Advanced Techniques”Custom User Agent
섹션 제목: “Custom User Agent”# wig uses rotating user agents by default
# Modify requests manually if needed via proxy
wig -h example.com -x http://127.0.0.1:8080
# Then modify User-Agent in Burp
Chaining with Other Tools
섹션 제목: “Chaining with Other Tools”# Find WordPress sites, then scan with wig
wig -h example.com -v | grep -i wordpress
# Export results for further analysis
wig -h example.com -o scan.json
python3 -c "import json; data=json.load(open('scan.json')); print(data['cms'])"
# Use results with WPScan for WordPress-specific scanning
wig -h example.com | grep WordPress && wpscan --url example.com
Database Updates
섹션 제목: “Database Updates”Updating Fingerprints
섹션 제목: “Updating Fingerprints”# wig maintains a database of known signatures
# Update the tool regularly for latest signatures
git clone https://github.com/jekyller/wig.git
cd wig && git pull
# Or reinstall via pip
pip install --upgrade wig
Custom Signatures
섹션 제목: “Custom Signatures”wig loads signature files from its database. The default signatures include:
- CMS fingerprints (WordPress, Joomla, Drupal, Magento, etc.)
- Web frameworks (Django, Rails, ASP.NET, etc.)
- JavaScript libraries (jQuery, Bootstrap, Angular, etc.)
- Server software (Apache, Nginx, IIS, etc.)
Performance and Optimization
섹션 제목: “Performance and Optimization”Fast Scanning
섹션 제목: “Fast Scanning”# Basic scan (quick, minimal verbosity)
wig -h example.com
# Verbose scan (more thorough, slower)
wig -h example.com -v
# Return all data
wig -h example.com -r
Batch Operations with Control
섹션 제목: “Batch Operations with Control”#!/bin/bash
# Scan multiple targets with delay
for target in $(cat targets.txt); do
echo "Scanning $target..."
wig -h $target -o ${target}_results.json
sleep 2 # Delay between scans
done
Limitations and Considerations
섹션 제목: “Limitations and Considerations”What wig Cannot Do
섹션 제목: “What wig Cannot Do”- Exploit vulnerabilities (it’s a passive reconnaissance tool)
- Bypass authentication
- Test authenticated areas
- Detect custom CMS installations
- Identify all plugins (especially lesser-known ones)
Avoiding Detection
섹션 제목: “Avoiding Detection”# wig attempts to be relatively stealthy
# Use proxy/Tor for additional anonymity
wig -h example.com -x socks5://127.0.0.1:9050
# Slower scanning with delays
for target in targets.txt; do
wig -h $target
sleep 5
done
Troubleshooting
섹션 제목: “Troubleshooting”Connection Issues
섹션 제목: “Connection Issues”# Test connectivity first
curl -v https://example.com
# If behind firewall, use proxy
wig -h example.com -x http://proxy.company.com:8080
No Results Detected
섹션 제목: “No Results Detected”# Enable verbose mode for diagnostics
wig -h example.com -v
# Check for redirects
curl -L -I https://example.com
# Verify target is reachable
ping example.com
Timeout Issues
섹션 제목: “Timeout Issues”# If slow connection causes issues, wig has built-in timeouts
# Try from different network or use proxy with better latency
wig -h example.com
Best Practices
섹션 제목: “Best Practices”- Authorization: Obtain written permission before scanning any target
- Documentation: Record all detected technologies for the vulnerability assessment report
- Verification: Manually verify critical findings before acting on them
- Updates: Keep wig and its signature database current
- Chaining: Use results with specialized tools (WPScan for WordPress, DrupalScan for Drupal)
- Proxying: Route through Burp Suite or similar for deeper analysis
- Rate Limiting: Scan responsibly to avoid triggering WAF/IDS alerts
Integration with Other Tools
섹션 제목: “Integration with Other Tools”WordPress-Specific Analysis
섹션 제목: “WordPress-Specific Analysis”# Identify WordPress installation
wig -h example.com | grep -i wordpress
# Use WPScan for deeper enumeration
wpscan --url example.com -e vp
Web Server Fingerprinting
섹션 제목: “Web Server Fingerprinting”# wig detects web servers automatically
# Chain with Shodan or Censys for mass scanning
wig -h example.com
Nmap Integration
섹션 제목: “Nmap Integration”# Identify web servers with Nmap
nmap -p 80,443 --script http-title example.com
# Follow up with wig for application fingerprinting
wig -h example.com
Conclusion
섹션 제목: “Conclusion”wig is a powerful tool for passive web application reconnaissance during authorized security assessments. Its ability to identify CMS installations, versions, and plugins makes it invaluable for targeting vulnerability research and attack planning in controlled, authorized scenarios.