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
cf-check and clouddetect removed, ipcdn
six2dez314b3b5508ff
diff --git a/install.sh b/install.shindex dd6f692..8280ea4 100755--- a/install.sh+++ b/install.sh@@ -47,7 +47,6 @@ gotools["qsreplace"]="go install -v github.com/tomnomnom/qsreplace@latest"gotools["Amass"]="go install -v github.com/OWASP/Amass/v3/...@master"gotools["ffuf"]="go install -v github.com/ffuf/ffuf@latest"gotools["github-subdomains"]="go install -v github.com/gwen001/github-subdomains@latest"-gotools["cf-check"]="go install -v github.com/dwisiswant0/cf-check@latest"gotools["waybackurls"]="go install -v github.com/tomnomnom/waybackurls@latest"gotools["nuclei"]="go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest"gotools["anew"]="go install -v github.com/tomnomnom/anew@latest"@@ -68,7 +67,7 @@ gotools["analyticsrelationships"]="go install -v github.com/Josue87/analyticsrelgotools["gotator"]="go install -v github.com/Josue87/gotator@latest"gotools["roboxtractor"]="go install -v github.com/Josue87/roboxtractor@latest"gotools["mapcidr"]="go install -v github.com/projectdiscovery/mapcidr/cmd/mapcidr@latest"-gotools["clouddetect"]="go install -v github.com/99designs/clouddetect/cli/clouddetect@latest"+gotools["ipcdn"]="go install -v github.com/six2dez/ipcdn/@latest"gotools["dnstake"]="go install -v github.com/pwnesia/dnstake/cmd/dnstake@latest"gotools["gowitness"]="go install -v github.com/sensepost/gowitness@latest"gotools["cero"]="go install -v github.com/glebarez/cero@latest"diff --git a/reconftw.cfg b/reconftw.cfgindex 340187e..c33dbeb 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -80,7 +80,7 @@ FAVICON=truePORTSCANNER=truePORTSCAN_PASSIVE=truePORTSCAN_ACTIVE=true-CLOUD_IP=true+CDN_IP=true# Web analysisWAF_DETECTION=truediff --git a/reconftw.sh b/reconftw.shindex 11ca021..9966ec2 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -72,7 +72,6 @@ function tools_installed(){type -P gau &>/dev/null || { printf "${bred} [*] gau [NO]${reset}\n"; allinstalled=false;}type -P dnsx &>/dev/null || { printf "${bred} [*] dnsx [NO]${reset}\n"; allinstalled=false;}type -P gotator &>/dev/null || { printf "${bred} [*] gotator [NO]${reset}\n"; allinstalled=false;}- type -P cf-check &>/dev/null || { printf "${bred} [*] Cf-check [NO]${reset}\n"; allinstalled=false;}type -P nuclei &>/dev/null || { printf "${bred} [*] Nuclei [NO]${reset}\n"; allinstalled=false;}[ -d ~/nuclei-templates ] || { printf "${bred} [*] Nuclei templates [NO]${reset}\n"; allinstalled=false;}type -P gf &>/dev/null || { printf "${bred} [*] Gf [NO]${reset}\n"; allinstalled=false;}@@ -96,7 +95,7 @@ function tools_installed(){type -P mapcidr &>/dev/null || { printf "${bred} [*] mapcidr [NO]${reset}\n"; allinstalled=false;}type -P ppfuzz &>/dev/null || { printf "${bred} [*] ppfuzz [NO]${reset}\n"; allinstalled=false;}type -P searchsploit &>/dev/null || { printf "${bred} [*] searchsploit [NO]${reset}\n"; allinstalled=false;}- type -P clouddetect &>/dev/null || { printf "${bred} [*] clouddetect [NO]${reset}\n"; allinstalled=false;}+ type -P ipcdn &>/dev/null || { printf "${bred} [*] ipcdn [NO]${reset}\n"; allinstalled=false;}type -P interactsh-client &>/dev/null || { printf "${bred} [*] interactsh-client [NO]${reset}\n"; allinstalled=false;}type -P uro &>/dev/null || { printf "${bred} [*] uro [NO]${reset}\n"; allinstalled=false;}type -P cero &>/dev/null || { printf "${bred} [*] cero [NO]${reset}\n"; allinstalled=false;}@@ -908,24 +907,18 @@ function portscan(){[ -s "hosts/subs_ips_vhosts.txt" ] && cat hosts/subs_ips_vhosts.txt | cut -d ' ' -f1 | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txtelse echo $domain | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txtfi- if [ ! "$AXIOM" = true ]; then- [ -s "hosts/ips.txt" ] && cat hosts/ips.txt | cf-check | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nowaf.txt- else- [ -s "hosts/subs_ips_vhosts.txt" ] && cat hosts/subs_ips_vhosts.txt | cut -d ' ' -f1 | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txt- [ -s "hosts/ips.txt" ] && axiom-scan hosts/ips.txt -m cf-check -o .tmp/ips_nowaf_.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" &>/dev/null- [ -s ".tmp/ips_nowaf_.txt" ] && cat .tmp/ips_nowaf_.txt | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nowaf.txt- fi- printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n";- [ -s ".tmp/ips_nowaf.txt" ] && cat .tmp/ips_nowaf.txt | sort+ [ -s "hosts/ips.txt" ] && cat hosts/ips.txt | ipcdn -m not | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nocdn.txt+ printf "${bblue}\n Resolved IP addresses (No CDN) ${reset}\n\n";+ [ -s ".tmp/ips_nocdn.txt" ] && cat .tmp/ips_nocdn.txt | sortprintf "${bblue}\n Scanning ports... ${reset}\n\n";- if [ "$PORTSCAN_PASSIVE" = true ] && [ ! -f "hosts/portscan_passive.txt" ] && [ -s "hosts/ips.txt" ] ; then- nrich hosts/ips.txt > hosts/portscan_passive.txt+ if [ "$PORTSCAN_PASSIVE" = true ] && [ ! -f "hosts/portscan_passive.txt" ] && [ -s ".tmp/ips_nocdn.txt" ] ; then+ nrich .tmp/ips_nocdn.txt > hosts/portscan_passive.txtfiif [ "$PORTSCAN_ACTIVE" = true ]; thenif [ ! "$AXIOM" = true ]; then- [ -s ".tmp/ips_nowaf.txt" ] && $SUDO nmap --top-ports 200 -sV -n --max-retries 2 -Pn --open -iL .tmp/ips_nowaf.txt -oA hosts/portscan_active 2>>"$LOGFILE" &>/dev/null+ [ -s ".tmp/ips_nocdn.txt" ] && $SUDO nmap --top-ports 200 -sV -n --max-retries 2 -Pn --open -iL .tmp/ips_nocdn.txt -oA hosts/portscan_active 2>>"$LOGFILE" &>/dev/nullelse- [ -s ".tmp/ips_nowaf.txt" ] && axiom-scan .tmp/ips_nowaf.txt -m nmapx --top-ports 200 -sV -n -Pn --open --max-retries 2 -o hosts/portscan_active.gnmap $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" &>/dev/null+ [ -s ".tmp/ips_nocdn.txt" ] && axiom-scan .tmp/ips_nocdn.txt -m nmapx --top-ports 200 -sV -n -Pn --open --max-retries 2 -o hosts/portscan_active.gnmap $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" &>/dev/null[ -s "hosts/portscan_active.gnmap" ] && cat hosts/portscan_active.gnmap | egrep -v "^#|Status: Up" | cut -d' ' -f2,4- | sed -n -e 's/Ignored.*//p' | awk '{print "Host: " $1 " Ports: " NF-1; $1=""; for(i=2; i<=NF; i++) { a=a" "$i; }; split(a,s,","); for(e in s) { split(s[e],v,"/"); printf "%-8s %s/%-7s %s\n" , v[2], v[3], v[1], v[5]}; a="" }' > hosts/portscan_active.txt 2>>"$LOGFILE" &>/dev/nullfifi@@ -946,17 +939,13 @@ function portscan(){fi}-function cloudprovider(){- if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$CLOUD_IP" = true ]; then- start_func ${FUNCNAME[0]} "Cloud provider check"- if [ -s "$dir/hosts/ips.txt" ]; then- for ip in $( cat "$dir/hosts/ips.txt" ); do- echo "$( echo -n ${ip} && echo -n " " && clouddetect -ip=${ip} )" | grep -iv "Error" | anew -q $dir/hosts/cloud_providers.txt- done- fi- end_func "Results are saved in hosts/cloud_providers.txt" ${FUNCNAME[0]}+function cdnprovider(){+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$CDN_IP" = true ]; then+ start_func ${FUNCNAME[0]} "CDN provider check"+ [ -s "$dir/hosts/ips.txt" ] && cat $dir/hosts/ips.txt | ipcdn -m all | anew -q $dir/hosts/cdn_providers.txt+ end_func "Results are saved in hosts/cdn_providers.txt" ${FUNCNAME[0]}else- if [ "$CLOUD_IP" = false ]; then+ if [ "$CDN_IP" = false ]; thenprintf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"elseprintf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"@@ -2059,6 +2048,7 @@ function passive(){subdomains_fullremove_big_filesfavicon+ cdnproviderPORTSCAN_ACTIVE=falseportscan@@ -2066,7 +2056,6 @@ function passive(){axiom_shutdownfi- cloudproviderend}@@ -2186,6 +2175,7 @@ function recon(){s3bucketsscreenshotvirtualhosts+ cdnproviderportscanwaf_checksnuclei_check@@ -2197,7 +2187,6 @@ function recon(){axiom_shutdownfi- cloudprovidercms_scannerurl_gfwordlist_gen@@ -2291,8 +2280,8 @@ function multi_recon(){remove_big_filesscreenshotvirtualhosts+ cdnproviderportscan- cloudprovidercurrently=$(date +"%H:%M:%S")loopend=$(date +%s)getElapsedTime $loopstart $loopend@@ -2316,7 +2305,7 @@ function multi_recon(){NUMOFLINES_webs_total=$(find . -type f -name 'webs.txt' -exec cat {} + | anew webs/webs.txt | sed '/^$/d' | wc -l)NUMOFLINES_webs_total=$(find . -type f -name 'webs_uncommon_ports.txt' -exec cat {} + | anew webs/webs_uncommon_ports.txt | sed '/^$/d' | wc -l)NUMOFLINES_ips_total=$(find . -type f -name 'ips.txt' -exec cat {} + | anew hosts/ips.txt | sed '/^$/d' | wc -l)- NUMOFLINES_cloudsprov_total=$(find . -type f -name 'cloud_providers.txt' -exec cat {} + | anew hosts/cloud_providers.txt | sed '/^$/d' | wc -l)+ NUMOFLINES_cloudsprov_total=$(find . -type f -name 'cdn_providers.txt' -exec cat {} + | anew hosts/cdn_providers.txt | sed '/^$/d' | wc -l)find . -type f -name 'portscan_active.txt' -exec cat {} + > hosts/portscan_active.txt 2>>"$LOGFILE" &>/dev/nullfind . -type f -name 'portscan_active.gnmap' -exec cat {} + > hosts/portscan_active.gnmap 2>>"$LOGFILE" &>/dev/nullfind . -type f -name 'portscan_passive.txt' -exec cat {} + > hosts/portscan_passive.txt 2>>"$LOGFILE" &>/dev/null