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
Fixes cloudhunter and axiom remote fails
six2dez306cf4ea1b48
diff --git a/README.md b/README.mdindex 12f3870..9220978 100644--- a/README.md+++ b/README.md@@ -700,6 +700,7 @@ AXIOM_FLEET_NAME="reconFTW" # Fleet's prefix nameAXIOM_FLEET_COUNT=10 # Fleet's numberAXIOM_FLEET_REGIONS="eu-central" # Fleet's regionAXIOM_FLEET_SHUTDOWN=true # # Enable or disable delete the fleet after the execution+AXIOM_AUTO_FIX_HOSTKEY=true # Auto-repair known_hosts entries on SSH host-key mismatch before fallback to local mode# This is a script on your reconftw host that might prep things your way...#AXIOM_POST_START="~/Tools/axiom_config.sh" # Useful to send your config files to the fleetAXIOM_EXTRA_ARGS="" # Leave empty if you don't want to add extra argumentsdiff --git a/modules/axiom.sh b/modules/axiom.shindex 9f6bf79..a8436b4 100644--- a/modules/axiom.sh+++ b/modules/axiom.sh@@ -151,4 +151,48 @@ function axiom_selected() {notification "No axiom instances selected ${reset}\n\n" errorexitfi++ # Probe Axiom connectivity and optionally auto-repair host-key mismatches.+ local axiom_probe_out+ axiom_probe_out="$(axiom-exec "echo reconftw-axiom-probe" 2>&1 || true)"+ if echo "$axiom_probe_out" | grep -q "REMOTE HOST IDENTIFICATION HAS CHANGED"; then+ echo "$axiom_probe_out" >>"${LOGFILE:-/dev/null}"++ if [[ "${AXIOM_AUTO_FIX_HOSTKEY:-true}" == "true" ]]; then+ notification "Axiom host-key mismatch detected; attempting automatic known_hosts repair" warn++ local known_hosts_file+ known_hosts_file="${HOME}/.ssh/known_hosts"+ mkdir -p "${HOME}/.ssh" 2>>"${LOGFILE:-/dev/null}" || true+ touch "$known_hosts_file" 2>>"${LOGFILE:-/dev/null}" || true++ local -a hostports+ mapfile -t hostports < <(printf "%s\n" "$axiom_probe_out" | grep -oE '\[[^]]+\]:[0-9]+' | sort -u)++ local hp host port+ for hp in "${hostports[@]}"; do+ [[ -z "$hp" ]] && continue+ ssh-keygen -f "$known_hosts_file" -R "$hp" >/dev/null 2>>"${LOGFILE:-/dev/null}" || true++ host="${hp%\]:*}"+ host="${host#[}"+ port="${hp##*:}"+ if [[ -n "$host" && -n "$port" ]]; then+ ssh-keyscan -T 10 -p "$port" "$host" >>"$known_hosts_file" 2>>"${LOGFILE:-/dev/null}" || true+ fi+ done++ axiom_probe_out="$(axiom-exec "echo reconftw-axiom-probe" 2>&1 || true)"+ if echo "$axiom_probe_out" | grep -q "REMOTE HOST IDENTIFICATION HAS CHANGED"; then+ notification "Axiom host-key mismatch persists after auto-repair; disabling AXIOM for this run and continuing locally" warn+ echo "$axiom_probe_out" >>"${LOGFILE:-/dev/null}"+ AXIOM=false+ else+ notification "Axiom known_hosts auto-repair completed successfully" good+ fi+ else+ notification "Axiom host-key mismatch detected; disabling AXIOM for this run and continuing locally" warn+ AXIOM=false+ fi+ fi}diff --git a/modules/subdomains.sh b/modules/subdomains.shindex a430ce6..ec7037e 100644--- a/modules/subdomains.sh+++ b/modules/subdomains.sh@@ -2126,15 +2126,16 @@ function s3buckets() {# Determine the CloudHunter permutations flag based on the configPERMUTATION_FLAG=""+ permutation_file=""case "$CLOUDHUNTER_PERMUTATION" inDEEP)- PERMUTATION_FLAG="-p $tools/CloudHunter/permutations-big.txt"+ permutation_file="$tools/CloudHunter/permutations-big.txt";;NORMAL)- PERMUTATION_FLAG="-p $tools/CloudHunter/permutations.txt"+ permutation_file="$tools/CloudHunter/permutations.txt";;NONE)- PERMUTATION_FLAG=""+ permutation_file="";;*)printf "%b[!] Invalid value for CLOUDHUNTER_PERMUTATION: %s.%b\n" "$bred" "$CLOUDHUNTER_PERMUTATION" "$reset"@@ -2142,6 +2143,17 @@ function s3buckets() {;;esac+ if [[ -n "$permutation_file" ]]; then+ if [[ -f "$permutation_file" ]]; then+ PERMUTATION_FLAG="-p"+ else+ printf "%b[%s] CloudHunter permutations file not found (%s); continuing without permutations.%b\n" \+ "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$permutation_file" "$reset" | tee -a "$LOGFILE"+ permutation_file=""+ PERMUTATION_FLAG=""+ fi+ fi+# Debug: Print the full CloudHunter command#printf "CloudHunter command: %s/venv/bin/python3 %s/cloudhunter.py %s -r %s/resolvers.txt -t 50 [URL]\n" "$tools/CloudHunter" "$tools/CloudHunter" "$PERMUTATION_FLAG" "$tools/CloudHunter" >>"$LOGFILE"@@ -2152,8 +2164,7 @@ function s3buckets() {printf "cloudhunter.py not found\n" >>"$LOGFILE"fi- if [[ -n $PERMUTATION_FLAG ]]; then- permutation_file="${PERMUTATION_FLAG}"+ if [[ -n $permutation_file ]]; thenif [[ -f $permutation_file ]]; thenprintf "Permutations file exists\n" >>"$LOGFILE"else@@ -2173,7 +2184,11 @@ function s3buckets() {printf "%b[!] Failed to cd to %s.%b\n" "$bred" "$tools/CloudHunter" "$reset"return 1fi- if ! "${tools}/CloudHunter/venv/bin/python3" ./cloudhunter.py ${PERMUTATION_FLAG} -r ./resolvers.txt -t 50 "$domain"; then+ if [[ -n "$permutation_file" ]]; then+ if ! "${tools}/CloudHunter/venv/bin/python3" ./cloudhunter.py "$PERMUTATION_FLAG" "$permutation_file" -r ./resolvers.txt -t 50 "$domain"; then+ printf "%b[!] CloudHunter command failed for domain %s.%b\n" "$bred" "$domain" "$reset"+ fi+ elif ! "${tools}/CloudHunter/venv/bin/python3" ./cloudhunter.py -r ./resolvers.txt -t 50 "$domain"; thenprintf "%b[!] CloudHunter command failed for domain %s.%b\n" "$bred" "$domain" "$reset"fi) >>"$dir/subdomains/cloudhunter_open_buckets.txt" 2>>"$LOGFILE"diff --git a/modules/web.sh b/modules/web.shindex 8408759..25a5899 100644--- a/modules/web.sh+++ b/modules/web.sh@@ -1161,14 +1161,14 @@ function urlchecks() {if [[ -s $GITHUB_TOKENS ]]; thengithub-endpoints -q -k -d "$domain" -t "$GITHUB_TOKENS" -o .tmp/github-endpoints.txt 2>>"$LOGFILE" >/dev/nullif [[ -s ".tmp/github-endpoints.txt" ]]; then- cat .tmp/github-endpoints.txt | anew -q .tmp/url_extract_tmp.txt+ cat .tmp/github-endpoints.txt | anew -q .tmp/url_extract_tmp.txt || truefififiif [[ $AXIOM != true ]]; thenif [[ -s ".tmp/probed_tmp.txt" && -s "webs/webs_all.txt" ]]; then- diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt 2>>"$LOGFILE") <(sort -u webs/webs_all.txt 2>>"$LOGFILE") | wc -l)+ diff_webs=$(comm -3 <(sort -u .tmp/probed_tmp.txt 2>>"$LOGFILE") <(sort -u webs/webs_all.txt 2>>"$LOGFILE") | wc -l)elselog_note "urlchecks: missing .tmp/probed_tmp.txt or webs/webs_all.txt; skipping diff" "${FUNCNAME[0]}" "${LINENO}"diff_webs=1@@ -1229,7 +1229,7 @@ function urlchecks() {fielseif [[ -s ".tmp/probed_tmp.txt" && -s "webs/webs_all.txt" ]]; then- diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs_all.txt) | wc -l)+ diff_webs=$(comm -3 <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs_all.txt) | wc -l)elselog_note "urlchecks: missing .tmp/probed_tmp.txt or webs/webs_all.txt; skipping diff" "${FUNCNAME[0]}" "${LINENO}"diff_webs=1@@ -1247,20 +1247,20 @@ function urlchecks() {if [[ -s ".tmp/katana.txt" ]]; thensed_i '/^.\{2048\}./d' .tmp/katana.txt- cat .tmp/katana.txt | anew -q .tmp/url_extract_tmp.txt+ cat .tmp/katana.txt | anew -q .tmp/url_extract_tmp.txt || truefiif [[ -s ".tmp/url_extract_tmp.txt" ]]; then- grep -a "$domain" .tmp/url_extract_tmp.txt | grep -aEo 'https?://[^ ]+' | grep -iE '\.js([?#].*)?$|\.js([/?&].*)' | anew -q .tmp/url_extract_js.txt- grep -a "$domain" .tmp/url_extract_tmp.txt | grep -aEo 'https?://[^ ]+' | grep -iE '\.map([/?#].*)?$' | anew -q .tmp/url_extract_jsmap.txt+ grep -a "$domain" .tmp/url_extract_tmp.txt | grep -aEo 'https?://[^ ]+' | grep -iE '\.js([?#].*)?$|\.js([/?&].*)' | anew -q .tmp/url_extract_js.txt || true+ grep -a "$domain" .tmp/url_extract_tmp.txt | grep -aEo 'https?://[^ ]+' | grep -iE '\.map([/?#].*)?$' | anew -q .tmp/url_extract_jsmap.txt || trueif [[ $DEEP == true ]] && [[ -s ".tmp/url_extract_js.txt" ]]; theninterlace -tL .tmp/url_extract_js.txt -threads 10 -c "${tools}/JSA/venv/bin/python3 ${tools}/JSA/jsa.py -f _target_ | anew -q .tmp/url_extract_tmp.txt" &>/dev/nullfi- grep -a "$domain" .tmp/url_extract_tmp.txt | grep -aEo 'https?://[^ ]+' | grep "=" | qsreplace -a 2>>"$LOGFILE" | grep -aEiv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg)$" | anew -q .tmp/url_extract_tmp2.txt+ grep -a "$domain" .tmp/url_extract_tmp.txt | grep -aEo 'https?://[^ ]+' | grep "=" | qsreplace -a 2>>"$LOGFILE" | grep -aEiv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg)$" | anew -q .tmp/url_extract_tmp2.txt || trueif [[ -s ".tmp/url_extract_tmp2.txt" ]]; then- urless <.tmp/url_extract_tmp2.txt | anew -q .tmp/url_extract_uddup.txt 2>>"$LOGFILE" >/dev/null+ urless <.tmp/url_extract_tmp2.txt | anew -q .tmp/url_extract_uddup.txt 2>>"$LOGFILE" >/dev/null || truefiif [[ -s ".tmp/url_extract_uddup.txt" ]]; then@@ -1277,11 +1277,16 @@ function urlchecks() {end_func "Results are saved in $domain/webs/url_extract.txt" "${FUNCNAME[0]}"- p1radup -i webs/url_extract.txt -o webs/url_extract_nodupes.txt -s 2>>"$LOGFILE" >/dev/null+ if [[ -s "webs/url_extract.txt" ]]; then+ p1radup -i webs/url_extract.txt -o webs/url_extract_nodupes.txt -s 2>>"$LOGFILE" >/dev/null || true- if [[ $PROXY == true ]] && [[ -n $proxy_url ]] && [[ $(wc -l <webs/url_extract.txt) -le $DEEP_LIMIT2 ]]; then- notification "Sending URLs to proxy" "info"- ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy "$proxy_url" 2>>"$LOGFILE" >/dev/null+ if [[ $PROXY == true ]] && [[ -n $proxy_url ]] && [[ $(wc -l <webs/url_extract.txt) -le $DEEP_LIMIT2 ]]; then+ notification "Sending URLs to proxy" "info"+ ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy "$proxy_url" 2>>"$LOGFILE" >/dev/null+ fi+ else+ printf "%b[%s] No URL extraction output generated; skipping p1radup/proxy replay.%b\n" \+ "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"fififidiff --git a/reconftw.cfg b/reconftw.cfgindex 79ea434..7a2af51 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -284,6 +284,7 @@ AXIOM_FLEET_NAME="reconFTW" # Fleet's prefix nameAXIOM_FLEET_COUNT=10 # Fleet's numberAXIOM_FLEET_REGIONS="eu-central" # Fleet's regionAXIOM_FLEET_SHUTDOWN=true # # Enable or disable delete the fleet after the execution+AXIOM_AUTO_FIX_HOSTKEY=true # Auto-repair known_hosts entries on SSH host-key mismatch before fallback to local mode# This is a script on your reconftw host that might prep things your way...#AXIOM_POST_START="~/Tools/axiom_config.sh" # Useful to send your config files to the fleetAXIOM_EXTRA_ARGS="" # Leave empty if you don't want to add extra arguments