Overview
scan4all is a powerful security scanning tool that can be adapted to various environments. Choosing the right scanning strategy is crucial for effective vulnerability detection while minimizing disruption and detection.External Network Scanning
Asset Collection
Before scanning external targets, collect comprehensive asset information:- Domain names
- IP ranges (C-class segments)
- Related IP addresses
- Subdomains
The input file supports multiple formats: URLs, domain names, C-class segments, and IP addresses. Note that URL addresses skip port scanning.
Subdomain Discovery
For internet bug bounty targets, enable subdomain enumeration:SSL Certificate Analysis
Enable deep SSL analysis to discover additional domains:- Extracts domain names from SSL certificates
- Scans discovered subdomains (e.g., *.example.com)
- Adds targets to the scanning queue automatically
Internal Network Scanning
Efficient Network Sweeps
Direct B-class segment scanning with scan4all is slow due to extensive port scanning. Use a two-phase approach:- Quick host discovery with fscan
- Detailed vulnerability scanning with scan4all on live hosts:
Smart Processing Features
scan4all automatically optimizes internal network scans:- IP consolidation: Merges port scans when multiple domains resolve to the same IP
- Multi-IP handling: Scans all IPs associated with a domain name automatically
WAF and Rate Limiting
Two-Phase Approach
When facing WAF protection or IP blocking: Phase 1 - Fingerprinting only:-np flag skips port scanning, allowing you to gather fingerprints before triggering WAF alerts.
Phase 2 - POC detection:
URL Precision Scanning
For targeted scanning of specific URLs with context:Port Scanning Strategies
Using nmap (Default)
By default, scan4all detects and uses nmap for faster scanning:- Faster than masscan with optimized parameters
- Better service detection
- May produce incomplete results on poor networks due to large traffic packets
Using naabu
Disable nmap to use naabu (built-in port scanner):Skip Port Scanning
When working with existing port scan results:Cookie-Based Authentication
For authenticated scanning of web applications:- nuclei POC checks
- httpx fingerprinting
- go-poc execution
- X-ray POC scanning
- File fuzzing
- HTTP Request Smuggling detection
Honeypot Detection
Enable honeypot detection to avoid wasting time on decoys:Smart Scanning Features
Automatic Supply Chain Analysis
scan4all automatically:- Identifies supply chain components
- Analyzes dependencies
- Scans related infrastructure
HTTP Anomaly Detection
The tool intelligently handles:- Abnormal HTTP response pages
- Fingerprint calculation and learning
- 404 page similarity detection
Result Deduplication
Automatic caching prevents redundant scanning:- Stores results in
.DbCachedirectory - Speeds up subsequent scans of the same targets
- Configure in
config/config.json
Best Practices Summary
- Start broad, then narrow: Begin with fingerprinting, then focus on vulnerable services
- Adapt to environment: Use appropriate strategies for external vs. internal networks
- Respect rate limits: Use two-phase scanning when WAF is detected
- Leverage intelligence: Enable SSL parsing and subdomain enumeration for comprehensive coverage
- Optimize scanning: Choose the right port scanner for your network conditions
- Use authentication: Provide cookies for authenticated application scanning
- Cache wisely: Preserve cache for repeat scans of similar targets