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
nuclei fix, replaced metafinder and emailfinder as no longer works
six2deza4f756675c0b
diff --git a/install.sh b/install.shindex 9e27f0f..3a2f01d 100755--- a/install.sh+++ b/install.sh@@ -90,8 +90,6 @@ declare -A pipxtools=(["ghauri"]="r0oth3x49/ghauri"["xnLinkFinder"]="xnl-h4ck3r/xnLinkFinder"["porch-pirate"]="MandConsultingGroup/porch-pirate"- ["MetaFinder"]="Josue87/MetaFinder"- ["EmailFinder"]="Josue87/EmailFinder"["p1radup"]="iambouali/p1radup")@@ -123,6 +121,8 @@ declare -A repos=(["misconfig-mapper"]="intigriti/misconfig-mapper"["Spoofy"]="MattKeeley/Spoofy"["msftrecon"]="Arcanum-Sec/msftrecon"+ ["metagoofil"]="opsdisk/metagoofil"+ ["EmailHarvester"]="maldevel/EmailHarvester")# Function to display the bannerdiff --git a/reconftw.cfg b/reconftw.cfgindex dfbaff9..1546ecb 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -104,8 +104,8 @@ NUCLEI_TEMPLATES_PATH="$HOME/nuclei-templates" # Set nuclei templates pathNUCLEI_SEVERITY="info,low,medium,high,critical" # Set templates criticityNUCLEI_EXTRA_ARGS="" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"#NUCLEI_EXTRA_ARGS="-etags openssh,ssl -eid node-express-dev-env,keycloak-xss,CVE-2023-24044,CVE-2021-20323,header-sql,header-reflection" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"-NUCLEI_FLAGS=" -silent -t ${NUCLEI_TEMPLATES_PATH}/ -retries 2" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"-NUCLEI_FLAGS_JS=" -silent -tags exposure,token -severity info,low,medium,high,critical" # Additional nuclei extra flags for js secrets+NUCLEI_FLAGS="-silent -retries 2" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"+NUCLEI_FLAGS_JS="-silent -tags exposure,token -severity info,low,medium,high,critical" # Additional nuclei extra flags for js secretsURL_CHECK=true # Enable or disable URL collectionURL_CHECK_PASSIVE=true # Search for urls, passive methods from Archive, OTX, CommonCrawl, etcURL_CHECK_ACTIVE=true # Search for urls by crawling the websitesdiff --git a/reconftw.sh b/reconftw.shindex 32dd3fe..3fe7645 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -158,6 +158,10 @@ function tools_installed() {["Oralyzer_python"]="${tools}/Oralyzer/venv/bin/python3"["msftrecon"]="${tools}/msftrecon/msftrecon/msftrecon.py"["msftrecon_python"]="${tools}/msftrecon/venv/bin/python3"+ ["EmailHarvester"]="${tools}EmailHarvester"+ ["EmailHarvester_python"]="${tools}/EmailHarvester/venv/bin/python3"+ ["metagoofil"]="${tools}metagoofil"+ ["metagoofil_python"]="${tools}/metagoofil/venv/bin/python3")declare -A tools_folders=(@@ -182,7 +186,6 @@ function tools_installed() {["katana"]="katana"["wafw00f"]="wafw00f"["dnsvalidator"]="dnsvalidator"- ["metafinder"]="metafinder"["whois"]="whois"["dnsx"]="dnsx"["gotator"]="gotator"@@ -202,7 +205,6 @@ function tools_installed() {["notify"]="notify"["dalfox"]="dalfox"["puredns"]="puredns"- ["emailfinder"]="emailfinder"["analyticsrelationships"]="analyticsrelationships"["mapcidr"]="mapcidr"["ppmap"]="ppmap"@@ -426,25 +428,9 @@ function metadata() {if { [[ ! -f "${called_fn_dir}/.${FUNCNAME[0]}" ]] || [[ ${DIFF} == true ]]; } && [[ ${METADATA} == true ]] && [[ ${OSINT} == true ]] && ! [[ ${domain} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; thenstart_func "${FUNCNAME[0]}" "Scanning metadata in public files"- # Run metafinder and check for errors- if ! metafinder -d "${domain}" -l "${METAFINDER_LIMIT}" -o osint -go -bi &>>"${LOGFILE}"; then- printf "%b[!] metafinder command failed.%b\n" "${bred}" "${reset}"- return 1- fi-- # Move result files and check for errors- if [ -d "osint/${domain}" ] && [ "$(ls -A "osint/${domain}")" ]; then- if ! mv "osint/${domain}/"*.txt "osint/" 2>>"${LOGFILE}"; then- printf "%b[!] Failed to move metadata files.%b\n" "${bred}" "${reset}"- return 1- fi- fi-- # Remove temporary directory and check for errors- if ! rm -rf "osint/${domain}" 2>>"${LOGFILE}"; then- printf "%b[!] Failed to remove temporary directory.%b\n" "${bred}" "${reset}"- return 1- fi+ mkdir -p ".tmp/metagoofil_${domain}/" 2>>"${LOGFILE}"+ "${tools}/metagoofil/venv/bin/python3" "${tools}/metagoofil/metagoofil.py" -d "${domain}" -t pdf,docx,xlsx -l 10 -w -o ".tmp/metagoofil_${domain}/" 2>>"${LOGFILE}"+ exiftool -r .tmp/metagoofil_${domain}/* | egrep -i "Author|Creator|Email|Producer|Template" | sort -u | anew -q "osint/metadata_results.txt"end_func "Results are saved in ${domain}/osint/[software/authors/metadata_results].txt" "${FUNCNAME[0]}"else@@ -517,12 +503,12 @@ function emails() {start_func "${FUNCNAME[0]}" "Searching for emails/users/passwords leaks"- # Run emailfinder and handle errors- emailfinder -d "$domain" 2>>"$LOGFILE" | anew -q .tmp/emailfinder.txt++ "${tools}/EmailHarvester/venv/bin/python3" "${tools}/EmailHarvester/EmailHarvester.py" -d ${domain} -e all -l 20 2>>"$LOGFILE" | anew -q .tmp/EmailHarvester.txt# Process emailfinder results- if [[ -s ".tmp/emailfinder.txt" ]]; then- grep "@" .tmp/emailfinder.txt | grep -iv "|_" | anew -q osint/emails.txt+ if [[ -s ".tmp/EmailHarvester.txt" ]]; then+ grep "@" .tmp/EmailHarvester.txt | anew -q osint/emails.txtfi# Change directory to LeakSearch@@ -570,8 +556,7 @@ function domain_info() {# Run whois command and check for errorswhois -H "$domain" >"osint/domain_info_general.txt"-- msftrecon -d ${domain} > osint/azure_tenant_domains.txt+ "${tools}/msftrecon/venv/bin/python3" "${tools}/msftrecon/msftrecon/msftrecon.py" -d ${domain} > osint/azure_tenant_domains.txtend_func "Results are saved in ${domain}/osint/domain_info_[general/azure_tenant_domains].txt" "${FUNCNAME[0]}"@@ -1031,7 +1016,7 @@ function sub_tls() {if [[ $DEEP == true ]]; thenif [[ $AXIOM != true ]]; then- tlsx -san -cn -silent -ro -c "$TLSX_THREADS" \+ cat subdomains/subdomains.txt | tlsx -san -cn -silent -ro -c "$TLSX_THREADS" \-p "$TLS_PORTS" -o .tmp/subdomains_tlsx.txt <subdomains/subdomains.txt \2>>"$LOGFILE" >/dev/nullelse@@ -1041,7 +1026,7 @@ function sub_tls() {fielseif [[ $AXIOM != true ]]; then- tlsx -san -cn -silent -ro -c "$TLSX_THREADS" <subdomains/subdomains.txt >.tmp/subdomains_tlsx.txt 2>>"$LOGFILE"+ cat subdomains/subdomains.txt | tlsx -san -cn -silent -ro -c "$TLSX_THREADS" <subdomains/subdomains.txt >.tmp/subdomains_tlsx.txt 2>>"$LOGFILE"elseaxiom-scan subdomains/subdomains.txt -m tlsx \-san -cn -silent -ro -c "$TLSX_THREADS" \@@ -3269,7 +3254,6 @@ function nuclei_check() {# Check if the function should runif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $NUCLEICHECK == true ]]; thenstart_func "${FUNCNAME[0]}" "Templates-based Web Scanner"-cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null# Update nuclei templatesnuclei -update 2>>"$LOGFILE" >/dev/null@@ -3297,7 +3281,6 @@ function nuclei_check() {# Combine webs_subs.txt and webs_fuzz.txt into webs_nuclei.txt and duplicate itcat .tmp/webs_subs.txt .tmp/webs_fuzz.txt 2>>"$LOGFILE" | anew -q .tmp/webs_nuclei.txt | tee -a webs/webs_nuclei.txt-# Check if AXIOM is enabledif [[ $AXIOM != true ]]; then# Split severity levels into an array@@ -3306,8 +3289,7 @@ function nuclei_check() {for crit in "${severity_array[@]}"; doprintf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Severity: $crit ${reset}\n\n"# Run nuclei for each severity level- nuclei -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" "$NUCLEI_FLAGS" "$NUCLEI_EXTRA_ARGS" -j -o "nuclei_output/${crit}_json.txt" <.tmp/webs_nuclei.txt-+ nuclei -l .tmp/webs_nuclei.txt -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH} -j -o "nuclei_output/${crit}_json.txt" 2>>"$LOGFILE" >/dev/null# Parse the JSON output and save the results to a text fileif [[ -s "nuclei_output/${crit}_json.txt" ]]; thenjq -r '["[" + .["template-id"] + (if .["matcher-name"] != null then ":" + .["matcher-name"] else "" end) + "] [" + .["type"] + "] [" + .info.severity + "] " + (.["matched-at"] // .host) + (if .["extracted-results"] != null then " " + (.["extracted-results"] | @json) else "" end)] | .[]' nuclei_output/${crit}_json.txt > nuclei_output/${crit}.txt@@ -3330,7 +3312,7 @@ function nuclei_check() {axiom-scan .tmp/webs_nuclei.txt -m nuclei \--nuclei-templates "$NUCLEI_TEMPLATES_PATH" \-severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" \- "$NUCLEI_EXTRA_ARGS" -j -o "nuclei_output/${crit}_json.txt" "$AXIOM_EXTRA_ARGS" 2>>"$LOGFILE" >/dev/null+ -silent -retries 2 "$NUCLEI_EXTRA_ARGS" -j -o "nuclei_output/${crit}_json.txt" "$AXIOM_EXTRA_ARGS" 2>>"$LOGFILE" >/dev/null# Parse the JSON output and save the results to a text fileif [[ -s "nuclei_output/${crit}_json.txt" ]]; thenjq -r '["[" + .["template-id"] + (if .["matcher-name"] != null then ":" + .["matcher-name"] else "" end) + "] [" + .["type"] + "] [" + .info.severity + "] " + (.["matched-at"] // .host) + (if .["extracted-results"] != null then " " + (.["extracted-results"] | @json) else "" end)] | .[]' nuclei_output/${crit}_json.txt > nuclei_output/${crit}.txt@@ -3345,7 +3327,6 @@ function nuclei_check() {fifi-# Faraday integrationif [[ $FARADAY == true ]]; then# Check if the Faraday server is running@@ -6181,7 +6162,7 @@ if [[ $OSTYPE == "darwin"* ]]; thenPATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"fi-PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:q:c:z:rspanwvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,zen,deep,help,vps,check-tools' -n 'reconFTW' -- "$@")+PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:q:c::zrspanwvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,zen,deep,help,vps,check-tools' -n 'reconFTW' -- "$@")exit_status=$?if [[ $exit_status -ne 0 ]]; then