Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GhostTroops/scan4all/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Optimizing scan4all performance is crucial for large-scale security assessments. This guide covers configuration options, hardware considerations, and best practices for maximum efficiency.Port Scanning Optimization
nmap Configuration
scan4all uses optimized nmap parameters by default:--min-hostgroup 64: Scans 64 hosts in parallel--min-rate 10000: Minimum packet rate of 10,000 per second--max-retries 0: No retries for faster completion-T4: Aggressive timing template
You can customize nmap parameters in
config/config.json under the "nmap" key.naabu Configuration
Configure naabu settings inconfig/config.json:
TopPorts: Number of most common ports to scan (default: 1000)ScanAllIPS: Scan all IPs when a domain resolves to multiple addresses
Choosing the Right Scanner
| Scanner | Best For | Speed | Accuracy |
|---|---|---|---|
| nmap | Good networks, detailed fingerprinting | Fast | High |
| naabu | Poor networks, basic port detection | Very Fast | Medium |
DNS Configuration
Optimize DNS resolution for faster scanning:Thread Configuration
nuclei Threads
Configure POC scanning parallelism:httpx Configuration
Optimize HTTP probing:Elasticsearch Threads
For result storage performance:Cache Management
Enable Caching
Caching dramatically improves performance on repeated scans:- Avoids rescanning known targets
- Speeds up incremental assessments
- Reduces network traffic
autoRmCache: true- Automatically deletes cache after scanautoRmCache: false- Preserves cache for next scan
System Optimization
File Descriptor Limits
For large-scale scanning, increase system limits: Check current limits:/etc/security/limits.conf:
Docker Elasticsearch Optimization
When using Elasticsearch for results:config/jvm.options):
Network Optimization
Bandwidth Considerations
Optimal scanning rates by connection:| Connection | Recommended Rate | Max Threads |
|---|---|---|
| 1 Gbps LAN | 10,000 pps | 100 |
| 100 Mbps | 5,000 pps | 50 |
| Poor/Remote | 1,000 pps | 25 |
Network Quality Detection
If experiencing packet loss or incomplete results:-
Reduce scan rate:
-
Switch to naabu:
-
Enable retries:
Modify nmap command to include
--max-retries 1
Input Optimization
Target List Preparation
Deduplicate and sort:Precision Scanning
For URL lists with specific paths:Feature Toggles for Performance
Disable Expensive Features
When speed is critical:Skip Specific Scan Types
Port scanning only:Password Brute Force Optimization
Custom Dictionaries
Use targeted dictionaries instead of default wordlists:Disable Password Brute Force
If not needed:config/config.json by setting empty dictionary paths.
Monitoring Performance
Enable Statistics
Track scanning progress:Verbose Logging
For debugging performance issues:Elasticsearch Performance
Index Optimization
Initialize indices before large scans:Bulk Insert Configuration
Query Optimization
Use specific queries instead of scanning all results:Parallel Execution
For very large assessments, split targets and run multiple instances:Performance Checklist
- Set appropriate file descriptor limits (
ulimit -n 819200) - Choose optimal port scanner for your network (nmap vs. naabu)
- Configure thread counts based on target count and resources
- Enable caching for repeated scans (
autoRmCache: false) - Use targeted dictionaries for password brute forcing
- Disable unnecessary features (subdomain enum, SSL parsing)
- Deduplicate and clean target lists before scanning
- Monitor with
-stats=truefor large scans - Configure Elasticsearch with adequate heap size
- Consider parallel execution for massive target sets