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
Closes #53
Bilel Eljaamii97ab84d2a5c5
diff --git a/reconftw.sh b/reconftw.shindex bc81763..8570d43 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -252,8 +252,8 @@ sub_passive(){eval rm subfinder.txt assetfinder.txt amass.txt findomain.txt crobat.txt waybackurls.txt $DEBUG_ERRORNUMOFLINES=$(wc -l < passive_subs.txt)end=`date +%s`- runtime=$((end-start))- printf "${green} ${NUMOFLINES} subdomains found in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+ printf "${green} ${NUMOFLINES} subdomains found in ${runtime}${reset}\n\n"elseprintf "${yellow} ${NUMOFLINES} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi@@ -269,8 +269,8 @@ sub_brute(){eval rm active_tmp.txt $DEBUG_ERRORNUMOFLINES=$(wc -l < brute_subs.txt)end=`date +%s`- runtime=$((end-start))- printf "${green} ${NUMOFLINES} subdomains found in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+ printf "${green} ${NUMOFLINES} subdomains found in ${runtime}${reset}\n\n"elseprintf "${yellow} ${NUMOFLINES} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi@@ -286,8 +286,8 @@ sub_dns(){eval shuffledns -d $domain -list tmp_subs_resolution.txt -r $tools/resolvers.txt -o ${domain}_subdomains.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}NUMOFLINES=$(wc -l < ${domain}_subdomains.txt)end=`date +%s`- runtime=$((end-start))- printf "${green} ${NUMOFLINES} subdomains found in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+ printf "${green} ${NUMOFLINES} subdomains found in ${runtime}${reset}\n\n"elseprintf "${yellow} ${NUMOFLINES} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi@@ -323,9 +323,9 @@ sub_scraping(){# NUMOFLINES_cloud=0# fiend=`date +%s`- runtime=$((end-start))-# printf "${green} ${NUMOFLINES} subdomains and ${NUMOFLINES_cloud} open buckets found in ${runtime} secs${reset}\n\n"- printf "${green} ${NUMOFLINES} subdomains found in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+# printf "${green} ${NUMOFLINES} subdomains and ${NUMOFLINES_cloud} open buckets found in ${runtime}${reset}\n\n"+ printf "${green} ${NUMOFLINES} subdomains found in ${runtime}${reset}\n\n"elseprintf "${yellow} ${NUMOFLINES} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi@@ -361,8 +361,8 @@ sub_permut(){NUMOFLINES=0fiend=`date +%s`- runtime=$((end-start))- printf "${green} ${NUMOFLINES} subdomains found in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+ printf "${green} ${NUMOFLINES} subdomains found in ${runtime}${reset}\n\n"elseprintf "${yellow} ${NUMOFLINES} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi@@ -382,8 +382,8 @@ webprobe_simple(){NUMOFLINES=0fiend=`date +%s`- runtime=$((end-start))- printf "${green} ${NUMOFLINES} subdomains resolved in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+ printf "${green} ${NUMOFLINES} subdomains resolved in ${runtime}${reset}\n\n"elseprintf "${yellow} ${NUMOFLINES} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi@@ -399,14 +399,14 @@ subtakeover(){grep -v "Not Vulnerable" <${domain}_all-takeover-checks.txt > ${domain}_takeover.txteval rm ${domain}_all-takeover-checks.txt $DEBUG_ERROR && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))+ getElapsedTime $start $endif [ -f "${domain}_takeover.txt" ]thenNUMOFLINES=$(wc -l < ${domain}_takeover.txt)elseNUMOFLINES=0fi- printf "${bred}\n Subtko: ${NUMOFLINES} subdomains in ${runtime} secs${reset}\n\n"+ printf "${bred}\n Subtko: ${NUMOFLINES} subdomains in ${runtime}${reset}\n\n"eval cat ${domain}_takeover.txt $DEBUG_ERRORprintf "${bblue}\n Subdomain Takeover Finished\n"printf "${bblue} Results are saved in ${domain}_takeover.txt${reset}\n"@@ -425,9 +425,9 @@ webprobe_full(){start=`date +%s`cat ${domain}_subdomains.txt | httpx -ports 81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55672 -follow-redirects -status-code -vhost -threads 100 -silent | sort -u | grep "[200]" | cut -d [ -f1 | sort -u | sed 's/[[:blank:]]*$//' > ${domain}_probed_uncommon_ports.txt && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))+ getElapsedTime $start $endNUMOFLINES=$(wc -l < ${domain}_probed_uncommon_ports.txt)- printf "${bred}\n Uncommon web ports: ${NUMOFLINES} subdomains in ${runtime} secs${reset}\n\n"+ printf "${bred}\n Uncommon web ports: ${NUMOFLINES} subdomains in ${runtime}${reset}\n\n"eval cat ${domain}_probed_uncommon_ports.txt $DEBUG_ERRORprintf "${bblue}\n Web Probe Finished\n"printf "${bblue} Results are saved in ${domain}_takeover.txt${reset}\n"@@ -445,8 +445,8 @@ screenshot(){start=`date +%s`cat ${domain}_probed.txt | aquatone -out screenshots -threads 16 -silent && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Web Screenshot Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Web Screenshot Finished in ${runtime}\n"printf "${bblue} Results are saved in in screenshots/aquatone_report.html folder${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -463,8 +463,8 @@ metadata(){mkdir -p $dir/metadatapymeta -d ${domain} -s all -m 500 -j 5 -o $dir/metadata -f ${domain}_metadata.csv && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Metadat Checks Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Metadat Checks Finished in ${runtime}\n"printf "${bblue} Results are saved in in metadata folder and ${domain}_metadata.csv ${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -480,8 +480,8 @@ portscan(){start=`date +%s`naabu -top-ports 1000 -silent -exclude-cdn -nmap-cli 'nmap -sV --script /usr/share/nmap/scripts/vulners.nse,http-title.nse --min-rate 40000 -T4 --max-retries 2' -iL ${domain}_subdomains.txt > ${domain}_portscan.txt;end=`date +%s`- runtime=$((end-start))- printf "${bred}\n Port scan results in ${runtime} secs${reset}\n\n"+ getElapsedTime $start $end+ printf "${bred}\n Port scan results in ${runtime}${reset}\n\n"eval cat ${domain}_portscan.txt $DEBUG_ERROR && touch $called_fn_dir/.${FUNCNAME[0]}printf "\n"printf "${bblue}\n Port Scan Finished\n"@@ -522,8 +522,8 @@ nuclei_check(){cat ${domain}_probed.txt | nuclei -silent -t ~/nuclei-templates/vulnerabilities/ -o ${domain}_nuclei_vulnerabilities.txt && touch $called_fn_dir/.${FUNCNAME[0]};printf "\n\n"end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Port Scan Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Port Scan Finished in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_nuclei_*.txt files${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -546,10 +546,10 @@ urlchecks(){python3 $tools/github-endpoints.py -d $domain | anew -q ${domain}_url_extract.txt && touch $called_fn_dir/.${FUNCNAME[0]}fiend=`date +%s`- runtime=$((end-start))+ getElapsedTime $start $endNUMOFLINES=$(wc -l < ${domain}_url_extract.txt)printf "${bblue}\n URL Extraction Finished\n"- printf "${bblue}\n ${NUMOFLINES} in ${runtime} secs\n"+ printf "${bblue}\n ${NUMOFLINES} in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_url_extract.txt${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -572,9 +572,9 @@ url_gf(){gf potential ${domain}_url_extract.txt | qsreplace -a | anew -q ${domain}_potential.txt;gf lfi ${domain}_url_extract.txt | qsreplace -a | anew -q ${domain}_lfi.txt && touch $called_fn_dir/.${FUNCNAME[0]};end=`date +%s`- runtime=$((end-start))+ getElapsedTime $start $endcat ${domain}_url_extract.txt | unfurl -u format %s://%d%p > ${domain}_url_endpoints.txt- printf "${bblue}\n Vulnerable Pattern Search Finished in ${runtime} secs\n"+ printf "${bblue}\n Vulnerable Pattern Search Finished in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_*gfpattern*.txt files${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -601,8 +601,8 @@ jschecks(){printf "${yellow} Running : Building wordlist 5/5${reset}\n"cat ${domain}_js_livelinks.txt | python3 $tools/getjswords.py | anew -q ${domain}_js_Wordlist.txt && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Javascript Scan Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Javascript Scan Finished in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_js_*.txt files${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -624,8 +624,8 @@ params(){printf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"eval python3 $tools/Arjun/arjun.py -i ${domain}_param.txt -t 20 -o ${domain}_arjun.json $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Parameter Discovery Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Parameter Discovery Finished in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_param.txt and ${domain}_arjun.json${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -646,12 +646,12 @@ xss(){if [ -n "$XSS_SERVER" ]; thencat ${domain}_xss.txt | Gxss -c 100 -p Xss | sort -u | eval dalfox -b six2dez.xss.ht pipe -o ${domain}_dalfox_xss.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))+ getElapsedTime $start $endelseprintf "${bblue}\n No XSS_SERVER defined, blind xss skipped\n"cat ${domain}_xss.txt | Gxss -c 100 -p Xss | sort -u | eval dalfox pipe -o ${domain}_dalfox_xss.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))+ getElapsedTime $start $endfiprintf "${bblue} Results are saved in in ${domain}_dalfox_xss.txt${reset}\n"printf "${bgreen}#######################################################################\n\n"@@ -668,8 +668,8 @@ github(){start=`date +%s`cat ${domain}_probed.txt | git-hound --dig-files --dig-commits --threads 100 | tee ${domain}_gitrecon.txt && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n GitHub Scanning Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n GitHub Scanning Finished in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_gitrecon.txt${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -686,8 +686,8 @@ favicon(){eval python3 $tools/fav-up/favUp.py -w $domain -sc > ${domain}_favicontest.txt $DEBUG_STDeval cat ${domain}_favicontest.txt $DEBUG_STD | grep found_ips && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n FavIcon Hash Extraction Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n FavIcon Hash Extraction Finished in ${runtime}\n"printf "${bblue} Results are saved in in ${domain}_favicontest.txt${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -710,8 +710,8 @@ fuzz(){donetouch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Directory Fuzzing Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Directory Fuzzing Finished in ${runtime}\n"printf "${bblue} Results are saved in fuzzing/*subdomain*.md${reset}\n"printf "${bgreen}#######################################################################\n\n"else@@ -728,8 +728,8 @@ cors(){eval python3 $tools/Corsy/corsy.py -i ${domain}_probed.txt -t 200 > ${domain}_cors.txt $DEBUG_STDeval cat ${domain}_cors.txt $DEBUG_ERROR && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n CORS Scan Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n CORS Scan Finished in ${runtime}\n"printf "${bblue} Results are saved in ${domain}_cors.txt ${reset}\n"printf "${bgreen}#######################################################################\n"else@@ -745,8 +745,8 @@ testssl(){start=`date +%s`$tools/testssl.sh/testssl.sh --quiet -U -iL ${domain}_subdomains.txt > ${domain}_testssl.txt && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n SSL Test Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n SSL Test Finished in ${runtime}\n"printf "${bblue} Results are saved in ${domain}_testssl.txt ${reset}\n"printf "${bgreen}#######################################################################\n"else@@ -764,8 +764,8 @@ open_redirect(){eval python3 $tools/OpenRedireX/openredirex.py -l test_redirect.txt --keyword FUZZ > ${domain}_openredirex.txt $DEBUG_STDeval rm test_redirect.txt $DEBUG_ERROR && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n Open Redirects Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n Open Redirects Finished in ${runtime}\n"printf "${bblue} Results are saved in ${domain}_openredirex.txt ${reset}\n"printf "${bgreen}#######################################################################\n"else@@ -782,8 +782,8 @@ ssrf_checks(){start=`date +%s`eval cat ${domain}_ssrf.txt $DEBUG_ERROR | eval python3 $tools/ssrf.py $COLLAB_SERVER > ${domain}_ssrf_confirmed.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n SSRF Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n SSRF Finished in ${runtime}\n"elseprintf "${bblue}\n No COLLAB_SERVER defined\n"fi@@ -802,8 +802,8 @@ crlf_checks(){start=`date +%s`eval crlfuzz -l ${domain}_probed.txt -o ${domain}_crlf.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}end=`date +%s`- runtime=$((end-start))- printf "${bblue}\n CRLF Finished in ${runtime} secs\n"+ getElapsedTime $start $end+ printf "${bblue}\n CRLF Finished in ${runtime}${reset}\n"printf "${bblue} Results are saved in ${domain}_crlf.txt ${reset}\n"printf "${bgreen}#######################################################################\n"else@@ -827,6 +827,20 @@ deleteOutScoped(){fi}+function getElapsedTime {+ runtime=""+ local T=$2-$1+ local D=$((T/60/60/24))+ local H=$((T/60/60%24))+ local M=$((T/60%60))+ local S=$((T%60))+ (( $D > 0 )) && runtime="$runtime$D days, "+ (( $H > 0 )) && runtime="$runtime$H hours, "+ (( $M > 0 )) && runtime="$runtime$M minutes, "+ runtime="$runtime$S seconds."+ #echo "$retVal"+}+end(){if [ -n "$dir_output" ]then