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
Added SSTImap alternative
six2dez97f66297c1a7
diff --git a/install.sh b/install.shindex 6dfd285..e2bde4f 100755--- a/install.sh+++ b/install.sh@@ -303,6 +303,7 @@ declare -A repos=(["EmailHarvester"]="maldevel/EmailHarvester"["reconftw_ai"]="six2dez/reconftw_ai"["gato"]="praetorian-inc/gato"+ ["SSTImap"]="vladko312/SSTImap")# Function to display the banner@@ -534,6 +535,12 @@ function install_tools() {fiuv pip install --upgrade -e . --python venv/bin/python3 &>/dev/null || true;;+ "SSTImap")+ if [[ ! -d "venv" ]]; then+ uv venv venv &>/dev/null || true+ fi+ uv pip install --upgrade -r requirements.txt --python venv/bin/python3 &>/dev/null || true+ ;;esac# Copy gf patterns if applicablediff --git a/modules/core.sh b/modules/core.shindex c62981d..c6f863c 100644--- a/modules/core.sh+++ b/modules/core.sh@@ -411,6 +411,8 @@ function tools_installed() {["reconftw_ai"]="${tools}/reconftw_ai/reconftw_ai.py"["reconftw_ai_python"]="${tools}/reconftw_ai/venv/bin/python3"["ghleaks"]="${tools}/ghleaks/ghleaks"+ ["SSTImap"]="${tools}/SSTImap/sstimap.py"+ ["SSTImap_python"]="${tools}/SSTImap/venv/bin/python3")declare -A tools_folders=(diff --git a/modules/vulns.sh b/modules/vulns.shindex c1ed985..71beb74 100644--- a/modules/vulns.sh+++ b/modules/vulns.sh@@ -299,9 +299,6 @@ function ssti() {# Ensure gf/ssti.txt is not emptyif [[ -s "gf/ssti.txt" ]]; thenlocal ssti_engine="${SSTI_ENGINE:-TInjA}"- if [[ "$ssti_engine" != "TInjA" ]]; then- _print_msg WARN "SSTI_ENGINE='${ssti_engine}' is deprecated; using TInjA."- fi_print_msg INFO "Running: SSTI Payload Generation"@@ -313,36 +310,64 @@ function ssti() {if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then: >".tmp/ssti_candidates.txt"- if ! command -v TInjA >/dev/null 2>&1; then- end_func "Skipping SSTI: TInjA not installed (no legacy fallback)." "${FUNCNAME[0]}" "SKIP_MISSING_TOOL"- return 0- fi+ if [[ "$ssti_engine" == "SSTImap" ]]; then+ # --- SSTImap branch ---+ local sstimap_bin="${tools}/SSTImap/sstimap.py"+ local sstimap_python="${tools}/SSTImap/venv/bin/python3"+ if [[ ! -f "$sstimap_bin" ]] || [[ ! -f "$sstimap_python" ]]; then+ end_func "Skipping SSTI: SSTImap not installed." "${FUNCNAME[0]}" "SKIP_MISSING_TOOL"+ return 0+ fi- _print_msg INFO "Running: SSTI Checks with TInjA"- local TInjA_report_dir="$dir/.tmp/TInjA"- mkdir -p "$TInjA_report_dir"- local -a TInjA_cmd=(TInjA url --reportpath "${TInjA_report_dir}/" --ratelimit "${TInjA_RATELIMIT:-0}" --timeout "${TInjA_TIMEOUT:-15}" --verbosity 0)- if [[ -n "${HEADER:-}" ]]; then- TInjA_cmd+=(-H "${HEADER}")- fi- while IFS= read -r u; do- [[ -n "$u" ]] && TInjA_cmd+=(--url "$u")- done <".tmp/tmp_ssti.txt"+ _print_msg INFO "Running: SSTI Checks with SSTImap (level ${SSTIMAP_LEVEL:-1})"- if ! run_command "${TInjA_cmd[@]}" 2>>"$LOGFILE" >/dev/null; then- log_note "ssti: TInjA execution failed, no findings collected" "${FUNCNAME[0]}" "${LINENO}"- fi+ local -a sstimap_cmd=("$sstimap_python" "$sstimap_bin"+ --level "${SSTIMAP_LEVEL:-1}"+ --no-color+ )+ [[ "${SSTIMAP_LEGACY:-false}" == "true" ]] && sstimap_cmd+=(--legacy)+ [[ "${SSTIMAP_GENERIC:-false}" == "true" ]] && sstimap_cmd+=(--generic)+ [[ "${SSTIMAP_DELAY:-0}" -gt 0 ]] && sstimap_cmd+=(--delay "${SSTIMAP_DELAY}")+ [[ -n "${HEADER:-}" ]] && sstimap_cmd+=(-H "${HEADER}")++ sstimap_cmd+=(--load-urls ".tmp/tmp_ssti.txt")- local report_file=""- report_file=$(ls -1t "${TInjA_report_dir}"/*.jsonl 2>/dev/null | head -n 1 || true)- if [[ -n "$report_file" && -s "$report_file" ]]; then- jq -r 'select((.isWebpageVulnerable == true) or any(.parameters[]?; .isParameterVulnerable == true)) | (.url // empty) + " [certainty:" + (.certainty // "unknown") + "]"' "$report_file" 2>/dev/null \- | sed '/^\s*$/d' \- | anew -q ".tmp/ssti_candidates.txt"+ if ! run_command "${sstimap_cmd[@]}" 2>>"$LOGFILE" | tee ".tmp/sstimap_raw.txt" | grep -i "confirmed\|identified" | grep -oP 'https?://[^\s]+' | anew -q ".tmp/ssti_candidates.txt"; then+ log_note "ssti: SSTImap execution failed or no findings" "${FUNCNAME[0]}" "${LINENO}"+ fi+ else+ # --- TInjA branch (default) ---+ if ! command -v TInjA >/dev/null 2>&1; then+ end_func "Skipping SSTI: TInjA not installed." "${FUNCNAME[0]}" "SKIP_MISSING_TOOL"+ return 0+ fi++ _print_msg INFO "Running: SSTI Checks with TInjA"+ local TInjA_report_dir="$dir/.tmp/TInjA"+ mkdir -p "$TInjA_report_dir"+ local -a TInjA_cmd=(TInjA url --reportpath "${TInjA_report_dir}/" --ratelimit "${TInjA_RATELIMIT:-0}" --timeout "${TInjA_TIMEOUT:-15}" --verbosity 0)+ if [[ -n "${HEADER:-}" ]]; then+ TInjA_cmd+=(-H "${HEADER}")+ fi+ while IFS= read -r u; do+ [[ -n "$u" ]] && TInjA_cmd+=(--url "$u")+ done <".tmp/tmp_ssti.txt"++ if ! run_command "${TInjA_cmd[@]}" 2>>"$LOGFILE" >/dev/null; then+ log_note "ssti: TInjA execution failed, no findings collected" "${FUNCNAME[0]}" "${LINENO}"+ fi++ local report_file=""+ report_file=$(ls -1t "${TInjA_report_dir}"/*.jsonl 2>/dev/null | head -n 1 || true)+ if [[ -n "$report_file" && -s "$report_file" ]]; then+ jq -r 'select((.isWebpageVulnerable == true) or any(.parameters[]?; .isParameterVulnerable == true)) | (.url // empty) + " [certainty:" + (.certainty // "unknown") + "]"' "$report_file" 2>/dev/null \+ | sed '/^\s*$/d' \+ | anew -q ".tmp/ssti_candidates.txt"+ fifiif [[ -s ".tmp/ssti_candidates.txt" ]]; then- cat ".tmp/ssti_candidates.txt" | anew -q "vulns/ssti_TInjA.txt"+ cat ".tmp/ssti_candidates.txt" | anew -q "vulns/ssti_${ssti_engine}.txt"cat ".tmp/ssti_candidates.txt" | anew -q "vulns/ssti.txt"fidiff --git a/reconftw.cfg b/reconftw.cfgindex 3748740..1643eb6 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -243,9 +243,13 @@ SSRF_ALT_MATCH_REGEX="169\\.254\\.169\\.254|latest/meta-data|root:|127\\.0\\.0\\CRLF_CHECKS=true # CRLF checksLFI=true # LFI by fuzzingSSTI=true # SSTI by fuzzing-SSTI_ENGINE="TInjA" # SSTI engine (legacy mode removed)+SSTI_ENGINE="TInjA" # SSTI engine: TInjA|SSTImapTInjA_RATELIMIT=0 # TInjA requests per second (0 = unlimited)TInjA_TIMEOUT=15 # TInjA request timeout seconds+SSTIMAP_LEVEL=1 # SSTImap escaping level (1-5, higher=slower+deeper)+SSTIMAP_DELAY=0 # SSTImap delay between requests in seconds+SSTIMAP_LEGACY=false # SSTImap include legacy engine payloads+SSTIMAP_GENERIC=false # SSTImap try generic engine payloadsSQLI=true # Check SQLISQLMAP=true # Check SQLI with sqlmapGHAURI=false # Check SQLI with ghauri