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
Sub dns added, wordlist cleaned, recursive and httprobing enhanced
six2dezc726c5e9938c
diff --git a/install.sh b/install.shindex 3f30a97..11fbeb7 100755--- a/install.sh+++ b/install.sh@@ -215,8 +215,7 @@ eval wget -nc -O ~/.config/amass/config.ini https://raw.githubusercontent.com/OWeval wget -nc -O ~/.gf/potential.json https://raw.githubusercontent.com/devanshbatham/ParamSpider/master/gf_profiles/potential.json $DEBUG_STDeval wget -nc -O ~/.config/notify/notify.conf https://gist.githubusercontent.com/six2dez/23a996bca189a11e88251367e6583053/raw/a66c4d8cf47a3bc95f5e9ba84773428662ea760c/notify_sample.conf $DEBUG_ERROReval wget -N -c https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py $DEBUG_STD-eval wget -N -c https://s3.amazonaws.com/assetnote-wordlists/data/manual/best-dns-wordlist.txt $DEBUG_STD && cp best-dns-wordlist.txt subdomains_big.txt-eval wget -N -c https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD && cp all.txt subdomains_big2.txt+eval wget -N -c https://wordlists-cdn.assetnote.io/data/manual/best-dns-wordlist.txt $DEBUG_STD && mv best-dns-wordlist.txt subdomains_big.txteval wget -N -c https://gist.githubusercontent.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw/1bcdf2d61df08e66fd2d63b6a840f02c3a2ae24c/subdomains.txt $DEBUG_STDeval wget -N -c https://gist.githubusercontent.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw/137bb6b60c616552c705e93a345c06cec3a2cb1f/permutations_list.txt $DEBUG_STDeval wget -N -c https://gist.githubusercontent.com/h4ms1k/adcc340495d418fcd72ec727a116fea2/raw/ea0774de5e27f9bc855207b175249edae2e9ccef/asyncio_ssrf.py $DEBUG_STD && cp asyncio_ssrf.py ssrf.py@@ -225,8 +224,6 @@ eval wget -N -c https://raw.githubusercontent.com/xmendez/wfuzz/master/wordlist/printf "${bblue} Running: Performing last configurations ${reset}\n\n"## Last steps-eval cat subdomains_big2.txt $DEBUG_ERROR | anew -q subdomains_big.txt-eval rm subdomains_big2.txt $DEBUG_ERRORif [ ! -s "resolvers.txt" ]; thenprintf "${yellow} Generating personlized resolvers ${reset}\n\n"eval dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 100 -o resolvers.txt $DEBUG_STDdiff --git a/reconftw.sh b/reconftw.shindex efe014b..5bd1907 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -256,13 +256,14 @@ function subdomains_full(){fisub_passivesub_crt- sub_dns+ sub_activesub_brute- sub_scrapingsub_permutif [ "$DEEP" = true ] ; thensub_recursivefi+ sub_dns+ sub_scrapingwebprobe_simpleif [ -f "subdomains/subdomains.txt" ]then@@ -356,7 +357,7 @@ function sub_crt(){fi}-function sub_dns(){+function sub_active(){if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]thenstart_subfunc "Running : Active Subdomain Enumeration"@@ -369,9 +370,21 @@ function sub_dns(){#eval shuffledns -d $domain -list .tmp/subs_no_resolved.txt -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/subdomains_tmp.txt $DEBUG_STDeval $tools/puredns/puredns resolve .tmp/subs_no_resolved.txt -w .tmp/subdomains_tmp.txt -r $resolvers $DEBUG_STDecho $domain | dnsx -silent | anew -q .tmp/subdomains_tmp.txt- dnsx -retry 3 -silent -cname -resp-only -l .tmp/subdomains_tmp.txt | grep ".$domain$" | anew -q .tmp/subdomains_tmp.txt- eval dnsx -retry 3 -silent -cname -resp -l subdomains/subdomains.txt -o subdomains/subdomains_cname.txt $DEBUG_STDNUMOFLINES=$(eval cat .tmp/subdomains_tmp.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (active resolution)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fi+}++function sub_dns(){+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]+ then+ start_subfunc "Running : DNS Subdomain Enumeration"+ eval dnsx -retry 3 -silent -cname -resp -l subdomains/subdomains.txt -o subdomains/subdomains_cname.txt $DEBUG_STD+ cat subdomains/subdomains_cname.txt | cut -d '[' -f2 | sed 's/.$//' | grep ".$domain$" | anew -q .tmp/subdomains_dns.txt+ eval $tools/puredns/puredns resolve .tmp/subdomains_dns.txt -w .tmp/subdomains_dns_resolved.txt -r $resolvers $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/subdomains_dns_resolved.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | wc -l)end_subfunc "${NUMOFLINES} new subs (dns resolution)" ${FUNCNAME[0]}elseprintf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"@@ -405,7 +418,7 @@ function sub_scraping(){thenstart_subfunc "Running : Source code scraping subdomain search"touch .tmp/scrap_subs.txt- cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt+ cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp_scrap.txtif [ "$DEEP" = true ] ; thengospider -S .tmp/probed_tmp.txt --js -t $GOSPIDER_THREADS -d 2 -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txtelse@@ -415,7 +428,8 @@ function sub_scraping(){cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | unfurl --unique domains | grep ".$domain$" | anew -q .tmp/scrap_subs.txt#cat .tmp/scrap_subs.txt | eval shuffledns -d $domain -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/scrap_subs_resolved.txt $DEBUG_STDeval $tools/puredns/puredns resolve .tmp/scrap_subs.txt -w .tmp/scrap_subs_resolved.txt -r $resolvers $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/scrap_subs_resolved.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | wc -l)+ NUMOFLINES=$(eval cat .tmp/scrap_subs_resolved.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | tee .tmp/diff_scrap.txt | wc -l)+ cat .tmp/diff_scrap.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp_scrap.txtend_subfunc "${NUMOFLINES} new subs (code scraping)" ${FUNCNAME[0]}elseif [ "$SUBSCRAPING" = false ]; then@@ -556,28 +570,31 @@ function sub_recursive(){thenstart_func "Subdomains recursive search"- save_domain=$domain- for sub in $(cat subdomains/subdomains.txt); do- domain=$sub- eval $tools/puredns/puredns bruteforce $subs_wordlist_big $domain -w .tmp/${sub}_brute_recursive.txt -r $resolvers $DEBUG_STD- done- cat .tmp/*_brute_recursive.txt | anew -q .tmp/brute_recursive.txt-- domain=$save_domain+ if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 1000 ]]+ then+ for sub in $(cat subdomains/subdomains.txt); do+ sed "s/$/.$sub/" $subs_wordlist | anew -q .tmp/brute_recursive_wordlist.txt+ done+ eval $tools/puredns/puredns resolve .tmp/brute_recursive_wordlist.txt $domain -r $resolvers -w .tmp/brute_recursive_result.txt $DEBUG_STD+ cat .tmp/brute_recursive_result.txt | anew -q .tmp/brute_recursive.txt- eval DNScewl --tL .tmp/brute_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 > .tmp/DNScewl1_recursive.txt- eval $tools/puredns/puredns resolve .tmp/DNScewl1_recursive.txt -w .tmp/permute1_recursive_tmp.txt -r $resolvers $DEBUG_STD- eval cat .tmp/permute1_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1_recursive.txt- eval DNScewl --tL .tmp/permute1_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 > .tmp/DNScewl2_recursive.txt- eval $tools/puredns/puredns resolve .tmp/DNScewl2_recursive.txt -w .tmp/permute2_recursive_tmp.txt -r $resolvers $DEBUG_STD- eval cat .tmp/permute1_recursive.txt .tmp/permute2_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_recursive.txt+ eval DNScewl --tL .tmp/brute_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 > .tmp/DNScewl1_recursive.txt+ eval $tools/puredns/puredns resolve .tmp/DNScewl1_recursive.txt -w .tmp/permute1_recursive_tmp.txt -r $resolvers $DEBUG_STD+ eval cat .tmp/permute1_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1_recursive.txt+ eval DNScewl --tL .tmp/permute1_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 > .tmp/DNScewl2_recursive.txt+ eval $tools/puredns/puredns resolve .tmp/DNScewl2_recursive.txt -w .tmp/permute2_recursive_tmp.txt -r $resolvers $DEBUG_STD+ eval cat .tmp/permute1_recursive.txt .tmp/permute2_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_recursive.txt- NUMOFLINES=$(eval cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt $DEBUG_ERROR | anew subdomains/subdomain.txt | wc -l)+ NUMOFLINES=$(eval cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | wc -l)- if [ "$NUMOFLINES" -gt 0 ]; then- notification "${NUMOFLINES} new subdomains found with recursive search" info+ if [ "$NUMOFLINES" -gt 0 ]; then+ notification "${NUMOFLINES} new subdomains found with recursive search" info+ fi+ else+ notification "Skipping Permutations: Too Much Subdomains" warnfi- end_func "Results are saved in subdomains/subdomain.txt" ${FUNCNAME[0]}++ end_func "Results are saved in subdomains/subdomains.txt" ${FUNCNAME[0]}elseif [ "$SUBRECURSIVE" = false ]; thenprintf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n"@@ -595,7 +612,14 @@ function webprobe_simple(){if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBESIMPLE" = true ]thenstart_subfunc "Running : Http probing"- cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt++ if [ -s ".tmp/probed_tmp_scrap.txt" ]+ then+ mv .tmp/probed_tmp_scrap.txt .tmp/probed_tmp.txt+ else+ cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt+ fi+deleteOutScoped $outOfScope_file .tmp/probed_tmp.txtNUMOFLINES=$(eval cat .tmp/probed_tmp.txt $DEBUG_ERROR | anew webs/webs.txt | wc -l)end_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}@@ -1047,14 +1071,14 @@ function open_redirect(){cat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txteval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txtsed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txt- end_func "Results are saved in vulns/openredirex.txt" ${FUNCNAME[0]}+ end_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}elseif [[ $(cat gf/redirect.txt | wc -l) -le 1000 ]]thencat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txteval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txtsed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txt- end_func "Results are saved in vulns/openredirex.txt" ${FUNCNAME[0]}+ end_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}elseprintf "${bred} Skipping Open redirects: Too Much URLs to test, try with --deep flag${reset}\n"printf "${bgreen}#######################################################################\n"