scan4all supports storing scan results in Elasticsearch for centralized logging, analysis, and long-term retention. This enables powerful querying and visualization of security findings across multiple scans.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.
Why Use Elasticsearch?
Centralized Storage
Store all scan results in a single location for easy access
Powerful Queries
Search and filter results using Elasticsearch query DSL
Historical Data
Track vulnerabilities over time and monitor remediation
Team Collaboration
Share findings across security teams with centralized access
Quick Start with Docker
The fastest way to get started is using the provided Docker setup:Step 1: Create Required Directories
Step 2: Start Elasticsearch Container
Step 3: Initialize Indices
nmap_index- Port scan resultsnuclei_index- Nuclei vulnerability findingshttpx_index- HTTP probe resultsvscan_index- Vulnerability scan results
Each tool stores results in a separate index for better organization and querying.
Step 4: Configure scan4all
Editconfig/config.json:
| Field | Description | Default |
|---|---|---|
enableEsSv | Enable Elasticsearch storage | true |
esUrl | Elasticsearch endpoint URL template | https://127.0.0.1:8081/%s_index/_doc/%s |
esthread | Number of worker threads for ES operations | 8 |
Elasticsearch Configuration
The main configuration file isconfig/elasticsearch.yml:
Key Configuration Options
Network Settings
Network Settings
- network.host: Bind address (0.0.0.0 = all interfaces)
- network.publish_host: IP address to advertise to other nodes
- http.port: REST API port (default: 9200)
- transport.tcp.port: Node communication port (default: 9300)
CORS Configuration
CORS Configuration
Required for web-based Elasticsearch clients:
Performance Tuning
Performance Tuning
- http.max_content_length: Maximum request size (400mb for large scan results)
- indices.query.bool.max_clause_count: Max boolean clauses (20000 for complex queries)
- cluster.routing.allocation.disk.threshold_enabled: Disable disk threshold checks
Nuclei-Specific Configuration
For Nuclei integration, useconfig/nuclei_esConfig.yaml:
Querying Results
Search by Target
Query results for a specific target:192.168.0.111 with your target IP or hostname.
Search by Field
Advanced Queries
Find All Critical Vulnerabilities
Find All Critical Vulnerabilities
Group Results by Host
Group Results by Host
Index Management
List All Indices
View Index Mapping
Delete Old Results
Create Index Alias
Cluster Configuration
For production deployments with multiple nodes:Ensure all nodes can communicate on port 9300 for cluster transport.
Performance Tuning
Adjust Worker Threads
Increase threads for faster result ingestion:JVM Heap Size
Editconfig/jvm.options:
Index Settings
Optimize for write performance:Troubleshooting
Connection Refused
Connection Refused
Check if Elasticsearch is running:Verify firewall rules allow port 9200.
Out of Memory Errors
Out of Memory Errors
Increase JVM heap size in Restart Elasticsearch after changes.
config/jvm.options:Disk Space Issues
Disk Space Issues
Enable automatic index cleanup:
Slow Queries
Slow Queries
- Reduce
indices.query.bool.max_clause_count - Add more nodes to cluster
- Increase shard count for large indices
- Use index aliases and time-based indices
Visualization with Kibana
While not included in scan4all, you can use Kibana for visualization:http://localhost:5601 and create dashboards for your scan results.
Security Best Practices
Change Default Password
Update the Elasticsearch password in nuclei_esConfig.yaml
Enable SSL/TLS
Configure SSL for encrypted communication
Network Isolation
Run Elasticsearch on a private network
Access Control
Use firewall rules to restrict access to port 9200
Next Steps
- Review configuration file options
- Learn about environment variables
- Explore custom dictionaries