How ghosttroops/scan4all works
scan4all is an automated multi-target security scanner. The main workflow accepts targets and scan options, performs port discovery, follows with HTTP probing and fingerprinting, then runs web checks and vulnerability tests before reporting findings. Other documented capabilities include subdomain enumeration, credential auditing, sensitive-file fuzzing, request-smuggling checks, crawler support, and configurable result storage. Source excerpts establish the startup, port-scan, event-dispatch, and selected PoC relationships; several additional branches are documented in the README but their wiring was not sampled.
Main entry points: go_poc_check.go Go vulnerability checks · main.go Scan API · runner.go HTTP probing · filefuzz.go Sensitive-file fuzz
Components 23
Scan entry
- CLI startup
main.go - Scan API
lib/api/main.go - Event engine
engine/engineImp.go
Target discovery
- Subdomain enum
pkg/domain.go - Subfinder adapter
projectdiscovery/subfinder/subfinder.go - Port discovery
pkg/naabu/v2/pkg/runner/runner.go - Nmap integration
pkg/portScan/nmapScan.go
Web assessment
- HTTP probing
pkg/httpx/runner/runner.go - Web fingerprinting
pkg/fingerprint/fingerScan.go - Web crawler
lib/crawlergo/crawlergo.go - Sensitive-file fuzz
brute/filefuzz.go - Web checks
webScan/webScanUrls.go
Security checks
- Service auditing
pkg/hydra/runner.go - Go vulnerability checks
pocs_go/go_poc_check.go - YAML PoC checks
pocs_yml/check/check.go - HTTP smuggling
lib/Smuggling/CheckSmuggling.go - Log4j checks
pocs_go/log4j/check.go - JNDI listener
pkg/jndi/server.go
Results and state
- Scan storage
lib/util/db.go - Scan output
lib/util/sv2es.go
Other components
- Operator
- Target services
- Elasticsearch
Connections 26
- Operator → CLI startup: starts
main.go - CLI startup → Scan API: starts scan
main.go - Scan API → Port discovery: runs enumeration
lib/api/main.go - Scan API → Service auditing: imports Nmap results
lib/api/main.go - Scan API → HTTP probing: runs HTTP probing
lib/api/main.go - Port discovery → Target services: scans ports
README.md - Scan API → Nmap integration: supports Nmap input
README.md - Subdomain enum → Subfinder adapter: uses enumeration
pkg/domain.go - Subdomain enum → Target services: resolves targets
README.md - HTTP probing → Target services: probes HTTP
README.md - HTTP probing → Web fingerprinting: fingerprints services
README.md - HTTP probing → Web crawler: crawls sites
README.md - Event engine → Go vulnerability checks: dispatches checks
engine/engineImp.go - Go vulnerability checks → Sensitive-file fuzz: calls fuzzing
pocs_go/go_poc_check.go - Event engine → YAML PoC checks: dispatches checks
- Web checks → Target services: checks pages
README.md - Sensitive-file fuzz → Target services: requests paths
brute/filefuzz.go - Service auditing → Target services: audits credentials
README.md - Go vulnerability checks → Target services: tests vulnerabilities
pocs_go/go_poc_check.go - Go vulnerability checks → Log4j checks: runs Log4j checks
README.md - Log4j checks → JNDI listener: uses callback listener
README.md - Go vulnerability checks → HTTP smuggling: supports smuggling checks
README.md - Go vulnerability checks → Scan output: emits findings
pocs_go/go_poc_check.go - Scan output → Elasticsearch: stores results
README.md - Sensitive-file fuzz → Scan output: reports findings
brute/filefuzz.go - Web checks → Scan storage: uses shared state