reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
Shell bug-bountybugbountybugbounty-tooldnshackingnucleiosintpenetration-testingpentestpentest-toolpentestingreconreconnaissancescannersecuritysecurity-toolssubdomainsubdomain-enumerationvulnerabilities
Nerva replaces fingerprintx
six2dezf6b67094faf3
diff --git a/README.md b/README.mdindex a2aeca0..019dd4b 100644--- a/README.md+++ b/README.md@@ -143,7 +143,7 @@ reconFTW is packed with features to make reconnaissance thorough and efficient.- **CDN Detection**: Identifies IPs behind CDNs ([cdncheck](https://github.com/projectdiscovery/cdncheck)).- **WAF Detection**: Detects Web Application Firewalls ([wafw00f](https://github.com/EnableSecurity/wafw00f)).- **Port Scanning**: Active scanning with [nmap](https://github.com/nmap/nmap) (optionally preceded by [naabu](https://github.com/projectdiscovery/naabu)) and passive scanning with [smap](https://github.com/s0md3v/Smap).-- **Service Fingerprinting**: Fingerprints exposed services on discovered host:port pairs with [fingerprintx](https://github.com/praetorian-inc/fingerprintx).+- **Service Fingerprinting**: Fingerprints exposed services on discovered host:port pairs with [nerva](https://github.com/praetorian-inc/nerva).- **Service Vulnerabilities (Optional)**: Deep portscan profile can enrich results with CVE matching via [vulners](https://github.com/vulnersCom/nmap-vulners).- **Password Spraying**: Attempts password spraying on identified services with engine selection ([brutespray](https://github.com/x90skysn3k/brutespray) or [brutus](https://github.com/praetorian-inc/brutus)).- **Geolocation**: Maps IP addresses to geographic locations ([ipinfo](https://www.ipinfo.io/)).@@ -617,9 +617,9 @@ PORTSCAN_STRATEGY=legacy # legacy|naabu_nmapNAABU_ENABLE=trueNAABU_RATE=1000NAABU_PORTS="--top-ports 1000"-SERVICE_FINGERPRINT=true # Fingerprint exposed services with fingerprintx-SERVICE_FINGERPRINT_ENGINE="fingerprintx" # fingerprintx-SERVICE_FINGERPRINT_TIMEOUT_MS=2000 # fingerprintx timeout per target (ms)+SERVICE_FINGERPRINT=true # Fingerprint exposed services with nerva+SERVICE_FINGERPRINT_ENGINE="nerva" # nerva+SERVICE_FINGERPRINT_TIMEOUT_MS=2000 # nerva timeout per target (ms)PORTSCAN_UDP=falsePORTSCAN_UDP_OPTIONS="--top-ports 20 -sU -sV -n -Pn --open"CDN_IP=true # Check which IPs belongs to CDNdiff --git a/install.sh b/install.shindex dd85440..6dfd285 100755--- a/install.sh+++ b/install.sh@@ -247,7 +247,7 @@ declare -A gotools=(["favirecon"]="go install -v github.com/edoardottt/favirecon/cmd/favirecon@latest"["second-order"]="go install -v github.com/mhmdiaa/second-order@latest"["TInjA"]="go install -v github.com/Hackmanit/TInjA@latest"- ["fingerprintx"]="go install -v github.com/praetorian-inc/fingerprintx/cmd/fingerprintx@latest"+ ["nerva"]="go install -v github.com/praetorian-inc/nerva/cmd/nerva@latest"["brutus"]="go install -v github.com/praetorian-inc/brutus/cmd/brutus@latest"["julius"]="go install -v github.com/praetorian-inc/julius/cmd/julius@latest"["titus"]="go install -v github.com/praetorian-inc/titus/cmd/titus@latest"diff --git a/modules/vulns.sh b/modules/vulns.shindex 763a7c2..c1ed985 100644--- a/modules/vulns.sh+++ b/modules/vulns.sh@@ -484,15 +484,15 @@ function spraying() {filocal brutus_input=""- if [[ -s "$dir/hosts/fingerprintx.jsonl" ]]; then- brutus_input="$dir/hosts/fingerprintx.jsonl"- elif [[ -s "$dir/hosts/naabu_open.txt" ]] && command -v fingerprintx >/dev/null 2>&1; then- run_command fingerprintx --json -l "$dir/hosts/naabu_open.txt" -o "$dir/.tmp/fingerprintx_for_brutus.jsonl" 2>>"$LOGFILE" >/dev/null || true- [[ -s "$dir/.tmp/fingerprintx_for_brutus.jsonl" ]] && brutus_input="$dir/.tmp/fingerprintx_for_brutus.jsonl"+ if [[ -s "$dir/hosts/service_fingerprints.jsonl" ]]; then+ brutus_input="$dir/hosts/service_fingerprints.jsonl"+ elif [[ -s "$dir/hosts/naabu_open.txt" ]] && command -v nerva >/dev/null 2>&1; then+ run_command nerva --json -l "$dir/hosts/naabu_open.txt" -o "$dir/.tmp/service_fp_for_brutus.jsonl" 2>>"$LOGFILE" >/dev/null || true+ [[ -s "$dir/.tmp/service_fp_for_brutus.jsonl" ]] && brutus_input="$dir/.tmp/service_fp_for_brutus.jsonl"fiif [[ -z "$brutus_input" ]]; then- end_func "No fingerprintx JSON input for brutus (run portscan with SERVICE_FINGERPRINT=true)" "${FUNCNAME[0]}" SKIP+ end_func "No service fingerprint JSON input for brutus (run portscan with SERVICE_FINGERPRINT=true)" "${FUNCNAME[0]}" SKIPreturn 0fidiff --git a/modules/web.sh b/modules/web.shindex 3bacd1c..0dfa4c5 100644--- a/modules/web.sh+++ b/modules/web.sh@@ -697,7 +697,7 @@ function portscan() {}-_build_fingerprintx_targets_from_nmap() {+_build_service_fp_targets_from_nmap() {local nmap_gnmap="$1"local out_file="$2"[[ ! -s "$nmap_gnmap" ]] && return 0@@ -725,7 +725,7 @@ function service_fingerprint() {if [[ "${SERVICE_FINGERPRINT:-true}" != "true" ]]; thenreturn 0fi- if [[ "${SERVICE_FINGERPRINT_ENGINE:-fingerprintx}" != "fingerprintx" ]]; then+ if [[ "${SERVICE_FINGERPRINT_ENGINE:-nerva}" != "nerva" ]]; then_print_msg WARN "${FUNCNAME[0]}: unsupported SERVICE_FINGERPRINT_ENGINE=${SERVICE_FINGERPRINT_ENGINE}"return 0fi@@ -733,37 +733,37 @@ function service_fingerprint() {log_note "service_fingerprint: local-only for now, skipped in AXIOM mode" "${FUNCNAME[0]}" "${LINENO}"return 0fi- if ! command -v fingerprintx >/dev/null 2>&1; then- _print_msg WARN "${FUNCNAME[0]}: fingerprintx not found in PATH"+ if ! command -v nerva >/dev/null 2>&1; then+ _print_msg WARN "${FUNCNAME[0]}: nerva not found in PATH"return 0fi- start_subfunc "${FUNCNAME[0]}" "Service fingerprinting (fingerprintx)"+ start_subfunc "${FUNCNAME[0]}" "Service fingerprinting (nerva)"- local targets_file=".tmp/fingerprintx_targets.txt"+ local targets_file=".tmp/service_fp_targets.txt": >"$targets_file"if [[ -s "hosts/naabu_open.txt" ]]; thenawk -F: 'NF==2 && $2 ~ /^[0-9]+$/ {print $1 ":" $2}' "hosts/naabu_open.txt" | sort -u | anew -q "$targets_file"fiif [[ ! -s "$targets_file" ]]; then- _build_fingerprintx_targets_from_nmap "hosts/portscan_active.gnmap" "$targets_file"+ _build_service_fp_targets_from_nmap "hosts/portscan_active.gnmap" "$targets_file"fiif [[ ! -s "$targets_file" ]]; then- _build_fingerprintx_targets_from_nmap "hosts/portscan_active_targeted.gnmap" "$targets_file"+ _build_service_fp_targets_from_nmap "hosts/portscan_active_targeted.gnmap" "$targets_file"fiif [[ -s "$targets_file" ]]; thenlocal timeout_ms="${SERVICE_FINGERPRINT_TIMEOUT_MS:-2000}"- run_command fingerprintx --json -l "$targets_file" -w "$timeout_ms" -o "hosts/fingerprintx.jsonl" 2>>"$LOGFILE" >/dev/null || true- if [[ -s "hosts/fingerprintx.jsonl" ]]; then- jq -r '[(.host // .ip // .target // "unknown"), (.port // "unknown"), (.protocol // .service // "unknown")] | @tsv' "hosts/fingerprintx.jsonl" 2>/dev/null \+ run_command nerva --json -l "$targets_file" -w "$timeout_ms" -o "hosts/service_fingerprints.jsonl" 2>>"$LOGFILE" >/dev/null || true+ if [[ -s "hosts/service_fingerprints.jsonl" ]]; then+ jq -r '[(.host // .ip // .target // "unknown"), (.port // "unknown"), (.protocol // .service // "unknown")] | @tsv' "hosts/service_fingerprints.jsonl" 2>/dev/null \| awk -F'\t' '{printf "%s:%s [%s]\n", $1, $2, $3}' \- | anew -q "hosts/fingerprintx.txt"+ | anew -q "hosts/service_fingerprints.txt"fifi- end_subfunc "Results are saved in hosts/fingerprintx.[jsonl|txt]" "${FUNCNAME[0]}"+ end_subfunc "Results are saved in hosts/service_fingerprints.[jsonl|txt]" "${FUNCNAME[0]}"}function cdnprovider() {diff --git a/reconftw.cfg b/reconftw.cfgindex b52906c..3748740 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -187,9 +187,9 @@ PORTSCAN_STRATEGY=legacy # legacy|naabu_nmapNAABU_ENABLE=true # Use naabu pre-discovery when PORTSCAN_STRATEGY=naabu_nmapNAABU_RATE=1000 # naabu requests per secondNAABU_PORTS="--top-ports 1000" # e.g. "--top-ports 1000" or "-p -"-SERVICE_FINGERPRINT=true # Fingerprint exposed services with fingerprintx after active scan-SERVICE_FINGERPRINT_ENGINE="fingerprintx" # fingerprintx-SERVICE_FINGERPRINT_TIMEOUT_MS=2000 # fingerprintx per-target timeout (ms)+SERVICE_FINGERPRINT=true # Fingerprint exposed services with nerva after active scan+SERVICE_FINGERPRINT_ENGINE="nerva" # nerva+SERVICE_FINGERPRINT_TIMEOUT_MS=2000 # nerva per-target timeout (ms)PORTSCAN_UDP=false # Optional UDP scan (requires privileges)PORTSCAN_UDP_OPTIONS="--top-ports 20 -sU -sV -n -Pn --open"CDN_IP=true # Check which IPs belongs to CDNdiff --git a/tests/unit/test_new_tool_integrations.bats b/tests/unit/test_new_tool_integrations.batsindex 33a46b5..3161020 100644--- a/tests/unit/test_new_tool_integrations.bats+++ b/tests/unit/test_new_tool_integrations.bats@@ -988,11 +988,11 @@ SHrm -f /tmp/ghleaks_args.txt}-@test "service_fingerprint writes fingerprintx artifacts from naabu input" {+@test "service_fingerprint writes nerva artifacts from naabu input" {mkdir -p hosts .tmpprintf '%s\n' '10.10.10.10:22' > hosts/naabu_open.txt- cat > "$MOCK_BIN/fingerprintx" <<'SH'+ cat > "$MOCK_BIN/nerva" <<'SH'#!/usr/bin/env bashoutfile=""while [[ $# -gt 0 ]]; do@@ -1008,24 +1008,24 @@ while [[ $# -gt 0 ]]; dodoneprintf '%s\n' '{"host":"10.10.10.10","port":22,"protocol":"ssh"}' > "$outfile"SH- chmod +x "$MOCK_BIN/fingerprintx"+ chmod +x "$MOCK_BIN/nerva"export SERVICE_FINGERPRINT=true- export SERVICE_FINGERPRINT_ENGINE="fingerprintx"+ export SERVICE_FINGERPRINT_ENGINE="nerva"export SERVICE_FINGERPRINT_TIMEOUT_MS=500export AXIOM=falserun service_fingerprint[ "$status" -eq 0 ]- [ -s "hosts/fingerprintx.jsonl" ]- [ -s "hosts/fingerprintx.txt" ]- grep -q "10.10.10.10:22" "hosts/fingerprintx.txt"+ [ -s "hosts/service_fingerprints.jsonl" ]+ [ -s "hosts/service_fingerprints.txt" ]+ grep -q "10.10.10.10:22" "hosts/service_fingerprints.txt"}-@test "spraying supports brutus engine with fingerprintx json input" {+@test "spraying supports brutus engine with service fingerprint json input" {mkdir -p hosts vulns .tmpprintf '%s\n' 'Host: 10.10.10.10 () Ports: 22/open/tcp//ssh///' > hosts/portscan_active.gnmap- printf '%s\n' '{"host":"10.10.10.10","port":22,"protocol":"ssh"}' > hosts/fingerprintx.jsonl+ printf '%s\n' '{"host":"10.10.10.10","port":22,"protocol":"ssh"}' > hosts/service_fingerprints.jsonlcat > "$MOCK_BIN/brutus" <<'SH'#!/usr/bin/env bash