Skip to content

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

better arjun and ui

six2dez565807950d8c
diff --git a/lib/common.sh b/lib/common.sh
index c60556f..9b0e422 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -240,7 +240,7 @@ print_artifacts() {
[[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0
local items="$*"
[[ -z "$items" ]] && return 0
- printf "Artifacts: %s\n" "$items"
+ printf "[INFO] Artifacts: %s\n" "$items"
}
# Print a notice line without affecting counters
diff --git a/modules/modes.sh b/modules/modes.sh
index c7aa255..44456c6 100644
--- a/modules/modes.sh
+++ b/modules/modes.sh
@@ -672,7 +672,7 @@ function recon() {
zonetransfer
fi
- ui_module_end "OSINT" "osint/"
+ ui_module_end "OSINT" "osint/" "subdomains/"
progress_module "OSINT"
if [[ $AXIOM == true ]]; then
@@ -715,7 +715,7 @@ function recon() {
geo_info
fi
- ui_module_end "Web Detection" "hosts/"
+ ui_module_end "Web Detection" "webs/" "hosts/" "screenshots/"
progress_module "Web Detection"
# Quick-rescan gating
@@ -742,7 +742,7 @@ function recon() {
grpc_reflection
llm_probe
- ui_module_end "Web Analysis" "vulns/" "nuclei_output/"
+ ui_module_end "Web Analysis" "webs/" "hosts/" "vulns/" "nuclei_output/" "js/" "fuzzing/"
progress_module "Web Analysis"
fi
@@ -759,7 +759,7 @@ function recon() {
password_dict
url_ext
- ui_module_end "Finalization" "fuzzing/" "js/"
+ ui_module_end "Finalization" "webs/" "gf/" "cms/"
progress_module "Finalization"
}
diff --git a/modules/subdomains.sh b/modules/subdomains.sh
index ed6ffc0..53739b7 100644
--- a/modules/subdomains.sh
+++ b/modules/subdomains.sh
@@ -2045,19 +2045,33 @@ function s3buckets() {
printf "Processing domain: %s\n" "$domain" >>"$LOGFILE"
print_notice RUN "cloudhunter" "enumerating cloud buckets (CloudHunter)"
- (
- if ! cd "$tools/CloudHunter"; then
- print_warnf "Failed to cd to %s." "$tools/CloudHunter"
- return 1
- fi
+ start_subfunc "cloudhunter" "enumerating cloud buckets (CloudHunter)"
+ local cloudhunter_status="OK"
+ local cloudhunter_rc=0
+ local cloudhunter_prev_dir
+ cloudhunter_prev_dir="$(pwd)"
+ if cd "$tools/CloudHunter"; then
if [[ -n "$permutation_file" ]]; then
- if ! run_command env PYTHONWARNINGS=ignore "${tools}/CloudHunter/venv/bin/python3" -W ignore ./cloudhunter.py "$PERMUTATION_FLAG" "$permutation_file" -r ./resolvers.txt -t 50 "$domain"; then
- print_warnf "CloudHunter command failed for domain %s." "$domain"
- fi
- elif ! run_command env PYTHONWARNINGS=ignore "${tools}/CloudHunter/venv/bin/python3" -W ignore ./cloudhunter.py -r ./resolvers.txt -t 50 "$domain"; then
- print_warnf "CloudHunter command failed for domain %s." "$domain"
+ run_command env PYTHONWARNINGS=ignore "${tools}/CloudHunter/venv/bin/python3" -W ignore ./cloudhunter.py \
+ "$PERMUTATION_FLAG" "$permutation_file" -r ./resolvers.txt -t 50 "$domain" \
+ >>"$dir/subdomains/cloudhunter_open_buckets.txt" 2>>"$LOGFILE" || cloudhunter_rc=$?
+ else
+ run_command env PYTHONWARNINGS=ignore "${tools}/CloudHunter/venv/bin/python3" -W ignore ./cloudhunter.py \
+ -r ./resolvers.txt -t 50 "$domain" \
+ >>"$dir/subdomains/cloudhunter_open_buckets.txt" 2>>"$LOGFILE" || cloudhunter_rc=$?
fi
- ) >>"$dir/subdomains/cloudhunter_open_buckets.txt" 2>>"$LOGFILE"
+ else
+ print_warnf "Failed to cd to %s." "$tools/CloudHunter"
+ cloudhunter_rc=1
+ fi
+ cd "$cloudhunter_prev_dir" 2>/dev/null || true
+
+ if [[ $cloudhunter_rc -ne 0 ]]; then
+ cloudhunter_status="WARN"
+ print_warnf "CloudHunter command failed for domain %s (exit %s)." "$domain" "$cloudhunter_rc"
+ log_note "CloudHunter command failed for domain ${domain} (exit ${cloudhunter_rc})." "${FUNCNAME[0]}" "${LINENO}"
+ fi
+ end_subfunc "cloudhunter done" "cloudhunter" "$cloudhunter_status"
# Process CloudHunter results
if [[ -s "subdomains/cloudhunter_open_buckets.txt" ]]; then
diff --git a/modules/web.sh b/modules/web.sh
index ae04a31..daa2886 100644
--- a/modules/web.sh
+++ b/modules/web.sh
@@ -1095,19 +1095,51 @@ function graphql_scan() {
function param_discovery() {
ensure_dirs webs .tmp
+ _parse_arjun_text_output() {
+ local arjun_out_file="$1"
+ [[ ! -s "$arjun_out_file" ]] && return 0
+
+ grep -aEo 'https?://[^ ]+' "$arjun_out_file" | sed 's/^/URL: /' | anew -q webs/params_discovered.txt || true
+ grep -aE 'Scanning [0-9]+/[0-9]+: https?://' "$arjun_out_file" | sed -E 's/^.*Scanning [0-9]+\/[0-9]+:[[:space:]]*//' \
+ | sed 's/^/URL: /' | anew -q webs/params_discovered.txt || true
+ grep -aE 'Parameters found:[[:space:]]*' "$arjun_out_file" | sed -E 's/^.*Parameters found:[[:space:]]*//' \
+ | tr ',' '\n' | sed 's/^[[:space:]]*//; s/[[:space:]]*$//' | sed '/^$/d' \
+ | sed 's/^/PARAM: /' | sort -u | anew -q webs/params_discovered.txt || true
+ grep -aEo '([?&][A-Za-z0-9_.-]+)=' "$arjun_out_file" \
+ | sed -E 's/^[?&]//; s/=.*$//' | sed '/^$/d' \
+ | sed 's/^/PARAM: /' | sort -u | anew -q webs/params_discovered.txt || true
+ }
+
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $PARAM_DISCOVERY == true ]]; then
- if ! command -v arjun >/dev/null 2>&1; then
- _print_msg WARN "${FUNCNAME[0]}: arjun not found in PATH"
- return 0
- fi
start_func "${FUNCNAME[0]}" "Parameter discovery (arjun)"
local input_file="webs/url_extract_nodupes.txt"
+ local arjun_axiom_ok=true
[[ ! -s $input_file ]] && input_file="webs/webs_all.txt"
if [[ -s $input_file ]]; then
- run_command arjun -i "$input_file" -t "$ARJUN_THREADS" -oJ .tmp/arjun.json 2>>"$LOGFILE" >/dev/null || true
- if [[ -s .tmp/arjun.json ]]; then
- jq -r '..|.url? // empty' .tmp/arjun.json | sed 's/^/URL: /' | anew -q webs/params_discovered.txt
- jq -r '..|.params? // empty | to_entries[] | .key' .tmp/arjun.json | sed 's/^/PARAM: /' | sort -u | anew -q webs/params_discovered.txt
+ if [[ $AXIOM == true ]]; then
+ if ! run_command axiom-scan "$input_file" -m arjun -o .tmp/arjun.txt "$AXIOM_EXTRA_ARGS" 2>>"$LOGFILE" >/dev/null; then
+ arjun_axiom_ok=false
+ fi
+
+ _parse_arjun_text_output .tmp/arjun.txt
+
+ if [[ "$arjun_axiom_ok" != true ]] || [[ ! -s .tmp/arjun.txt ]]; then
+ _print_msg WARN "${FUNCNAME[0]}: axiom arjun failed or returned no output; falling back to local arjun"
+ log_note "${FUNCNAME[0]}: axiom arjun failed/no output; local fallback" "${FUNCNAME[0]}" "${LINENO}"
+ if command -v arjun >/dev/null 2>&1; then
+ run_command arjun -i "$input_file" -t "$ARJUN_THREADS" -oT .tmp/arjun.txt 2>>"$LOGFILE" >/dev/null || true
+ _parse_arjun_text_output .tmp/arjun.txt
+ else
+ _print_msg WARN "${FUNCNAME[0]}: arjun not found in PATH for local fallback"
+ fi
+ fi
+ else
+ if ! command -v arjun >/dev/null 2>&1; then
+ _print_msg WARN "${FUNCNAME[0]}: arjun not found in PATH"
+ return 0
+ fi
+ run_command arjun -i "$input_file" -t "$ARJUN_THREADS" -oT .tmp/arjun.txt 2>>"$LOGFILE" >/dev/null || true
+ _parse_arjun_text_output .tmp/arjun.txt
fi
fi
end_func "Results are saved in webs/params_discovered.txt" "${FUNCNAME[0]}"
diff --git a/reconftw.cfg b/reconftw.cfg
index 11e0ff7..087338c 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -395,7 +395,7 @@ GRAPHQL_CHECK=true # Detect GraphQL endpoints and introspection
GQLSPECTION=false # Run GQLSpection deep introspection on detected GraphQL endpoints (heavier)
PARAM_DISCOVERY=true # Parameter discovery with arjun
GRPC_SCAN=false # Attempt basic gRPC reflection on common ports
-LLM_PROBE=false # Probe discovered web/API endpoints for exposed LLM services using julius
+LLM_PROBE=true # Probe discovered web/API endpoints for exposed LLM services using julius
LLM_PROBE_AUGUSTUS=false # Include augustus generator config in julius output
# IPv6
diff --git a/tests/unit/test_new_tool_integrations.bats b/tests/unit/test_new_tool_integrations.bats
index 3983fc5..9698467 100644
--- a/tests/unit/test_new_tool_integrations.bats
+++ b/tests/unit/test_new_tool_integrations.bats
@@ -401,3 +401,118 @@ SH
[ -s "webs/llm_probe.txt" ]
grep -q "openai-compatible" "webs/llm_probe.txt"
}
+
+@test "param_discovery uses axiom arjun when AXIOM=true" {
+ mkdir -p webs .tmp
+ printf '%s\n' 'https://target.example.com/path' > webs/url_extract_nodupes.txt
+
+ cat > "$MOCK_BIN/axiom-scan" <<'SH'
+#!/usr/bin/env bash
+outfile=""
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ -o)
+ outfile="$2"
+ shift 2
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+printf '%s\n' 'https://target.example.com/path?a=1&b=2' > "$outfile"
+printf '%s\n' ' Scanning 0/1: https://target.example.com/path'
+printf '%s\n' ' Parameters found: a, b'
+exit 0
+SH
+ chmod +x "$MOCK_BIN/axiom-scan"
+
+ export AXIOM=true
+ export AXIOM_EXTRA_ARGS=""
+ export PARAM_DISCOVERY=true
+ export ARJUN_THREADS=5
+
+ run param_discovery
+ [ "$status" -eq 0 ]
+ [ -s "webs/params_discovered.txt" ]
+ grep -q "URL: https://target.example.com/path?a=1&b=2" "webs/params_discovered.txt"
+ grep -q "PARAM: a" "webs/params_discovered.txt"
+ grep -q "PARAM: b" "webs/params_discovered.txt"
+}
+
+@test "param_discovery falls back to local arjun when axiom arjun fails" {
+ mkdir -p webs .tmp
+ printf '%s\n' 'https://target.example.com/path' > webs/url_extract_nodupes.txt
+
+ cat > "$MOCK_BIN/axiom-scan" <<'SH'
+#!/usr/bin/env bash
+exit 1
+SH
+ chmod +x "$MOCK_BIN/axiom-scan"
+
+ cat > "$MOCK_BIN/arjun" <<'SH'
+#!/usr/bin/env bash
+outfile=""
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ -oT)
+ outfile="$2"
+ shift 2
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+printf '%s\n' 'https://target.example.com/path?x=1' > "$outfile"
+exit 0
+SH
+ chmod +x "$MOCK_BIN/arjun"
+
+ export AXIOM=true
+ export AXIOM_EXTRA_ARGS=""
+ export PARAM_DISCOVERY=true
+ export ARJUN_THREADS=5
+
+ run param_discovery
+ [ "$status" -eq 0 ]
+ [[ "$output" == *"falling back to local arjun"* ]]
+ [ -s "webs/params_discovered.txt" ]
+ grep -q "URL: https://target.example.com/path?x=1" "webs/params_discovered.txt"
+ grep -q "PARAM: x" "webs/params_discovered.txt"
+}
+
+@test "param_discovery local mode uses arjun text output" {
+ mkdir -p webs .tmp
+ printf '%s\n' 'https://target.example.com/path' > webs/url_extract_nodupes.txt
+
+ cat > "$MOCK_BIN/arjun" <<'SH'
+#!/usr/bin/env bash
+outfile=""
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ -oT)
+ outfile="$2"
+ shift 2
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+printf '%s\n' 'http://testaspnet.vulnweb.com/login.aspx?__VIEWSTATE=3698&token=abc' > "$outfile"
+exit 0
+SH
+ chmod +x "$MOCK_BIN/arjun"
+
+ export AXIOM=false
+ export PARAM_DISCOVERY=true
+ export ARJUN_THREADS=5
+
+ run param_discovery
+ [ "$status" -eq 0 ]
+ [ -s "webs/params_discovered.txt" ]
+ grep -q "URL: http://testaspnet.vulnweb.com/login.aspx?__VIEWSTATE=3698&token=abc" "webs/params_discovered.txt"
+ grep -q "PARAM: __VIEWSTATE" "webs/params_discovered.txt"
+ grep -q "PARAM: token" "webs/params_discovered.txt"
+}