Skip to content

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

Some changes:

six2dez1e85bb54856d
diff --git a/install.sh b/install.sh
index bd43920..62ad58a 100755
--- a/install.sh
+++ b/install.sh
@@ -177,6 +177,8 @@ printf "${bgreen} 70%% done${reset}\n\n"
eval git clone https://github.com/ProjectAnte/dnsgen $dir/dnsgen $DEBUG_STD
eval git clone https://github.com/drwetter/testssl.sh $dir/testssl.sh $DEBUG_STD
eval git clone https://github.com/laramies/theHarvester $dir/theHarvester $DEBUG_STD
+eval git clone https://github.com/x90skysn3k/brutespray $dir/brutespray $DEBUG_STD
+eval git clone https://github.com/vortexau/dnsvalidator $dir/dnsvalidator $DEBUG_STD
printf "${bgreen} 80%% done${reset}\n\n"
if [ "True" = "$IS_ARM" ]
then
@@ -196,6 +198,7 @@ cd $dir/LinkFinder && eval $SUDO python3 setup.py install $DEBUG_STD
cd $dir/dnsgen && eval $SUDO python3 setup.py install $DEBUG_STD
cd $dir/Arjun && eval $SUDO python3 setup.py install $DEBUG_STD
cd $dir/wafw00f && eval $SUDO python3 setup.py install $DEBUG_STD
+cd $dir/dnsvalidator && eval $SUDO python3 setup.py install $DEBUG_STD
cd $dir
eval git clone https://github.com/devanshbatham/OpenRedireX $dir/OpenRedireX $DEBUG_STD
printf "${bgreen} 90%% done${reset}\n\n"
@@ -206,9 +209,12 @@ eval wget -nc -O ~/.config/amass/config.ini https://raw.githubusercontent.com/OW
cd ~/.gf; eval wget -O potential.json https://raw.githubusercontent.com/devanshbatham/ParamSpider/master/gf_profiles/potential.json $DEBUG_STD; cd $dir
touch $dir/.github_tokens
eval wget -O getjswords.py https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py $DEBUG_STD
-eval wget -O subdomains_big.txt https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD
+eval wget -O subdomains_big.txt https://s3.amazonaws.com/assetnote-wordlists/data/manual/best-dns-wordlist.txt
+eval wget -O subdomains_big2.txt https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD
+eval cat subdomains_big2.txt $DEBUG_ERROR | anew -q subdomains_big.txt
+eval rm subdomains_big2.txt $DEBUG_ERROR
eval wget -O subdomains.txt https://gist.githubusercontent.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw/1bcdf2d61df08e66fd2d63b6a840f02c3a2ae24c/subdomains.txt $DEBUG_STD
-eval wget -O resolvers.txt https://raw.githubusercontent.com/BBerastegui/fresh-dns-servers/master/resolvers.txt $DEBUG_STD
+eval dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 100 -o resolvers.txt $DEBUG_STD
eval wget -O permutations_list.txt https://gist.githubusercontent.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw/137bb6b60c616552c705e93a345c06cec3a2cb1f/permutations_list.txt $DEBUG_STD
eval wget -O ssrf.py https://gist.githubusercontent.com/h4ms1k/adcc340495d418fcd72ec727a116fea2/raw/ea0774de5e27f9bc855207b175249edae2e9ccef/asyncio_ssrf.py $DEBUG_STD
eval wget -O fuzz_wordlist.txt https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt $DEBUG_STD
diff --git a/reconftw.cfg b/reconftw.cfg
index 831d664..c7dd547 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -23,7 +23,7 @@ output=${dir}/Recon/${domain}
AMASS_CONFIG=~/.config/amass/config.ini
GITHUB_TOKENS=${tools}/.github_tokens
-# APIs/TOKENS
+# APIs/TOKENS - Uncomment the lines you set removing the '#' at the beginning of the line
#SHODAN_API_KEY=XXXXXXXXXXXXX
#XSS_SERVER=XXXXXXXXXXXXXXXXX
#COLLAB_SERVER=XXXXXXXXXXXXXXXXX
@@ -83,6 +83,7 @@ LFI=true
SSTI=true
SQLI=true
BROKENLINKS=true
+SPRAY=true
# Extra features
NOTIFICATION=false
@@ -103,9 +104,12 @@ SHUFFLEDNS_THREADS=5000
GOSPIDER_THREADS=50
GITDORKER_THREADS=5
XSSTRIKE_THREADS=30
+BRUTESPRAY_THREADS=20
+BRUTESPRAY_CONCURRENCE=10
# lists
fuzz_wordlist=${tools}/fuzz_wordlist.txt
lfi_wordlist=${tools}/lfi_wordlist.txt
subs_wordlist=${tools}/subdomains.txt
+subs_wordlist_big=${tools}/subdomains_big.txt
resolvers=${tools}/resolvers.txt
diff --git a/reconftw.sh b/reconftw.sh
index 3b1fdfc..e8426f4 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -100,7 +100,7 @@ function google_dorks(){
then
start_func "Google Dorks in process"
$tools/degoogle_hunter/degoogle_hunter.sh $domain | tee osint/dorks.txt
- sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/dorks.txt && touch $called_fn_dir/.${FUNCNAME[0]}
+ sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/dorks.txt
end_func "Results are saved in osint/dorks.txt" ${FUNCNAME[0]}
else
if [ "$GOOGLE_DORKS" = false ]; then
@@ -143,7 +143,6 @@ function metadata(){
eval metafinder -d $domain -l 20 -o osint -go -bi -ba $DEBUG_STD
eval mv osint/${domain}/* osint/ $DEBUG_ERROR
eval rmdir osint/${domain} $DEBUG_ERROR
- touch $called_fn_dir/.${FUNCNAME[0]}
end_func "Results are saved in osint/[software/authors/metadata_results].txt" ${FUNCNAME[0]}
else
if [ "$METADATA" = false ]; then
@@ -341,7 +340,6 @@ function sub_crt(){
eval curl "https://tls.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r .Results[] $DEBUG_ERROR | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs.txt
eval curl "https://dns.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r '.FDNS_A'[],'.RDNS'[] $DEBUG_ERROR | cut -d ',' -f2 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txt
fi
- touch $called_fn_dir/.${FUNCNAME[0]}
NUMOFLINES=$(eval cat .tmp/crtsh_subs_tmp.txt $DEBUG_ERROR | anew .tmp/crtsh_subs.txt | wc -l)
end_subfunc "${NUMOFLINES} new subs (cert transparency)" ${FUNCNAME[0]}
else
@@ -357,7 +355,11 @@ function sub_brute(){
if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBBRUTE" = true ]
then
start_subfunc "Running : Bruteforce Subdomain Enumeration"
- eval shuffledns -d $domain -w $subs_wordlist -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/active_tmp.txt $DEBUG_STD
+ if [ "$DEEP" = true ] ; then
+ eval shuffledns -d $domain -w $subs_wordlist_big -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/active_tmp.txt $DEBUG_STD
+ else
+ eval shuffledns -d $domain -w $subs_wordlist -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/active_tmp.txt $DEBUG_STD
+ fi
NUMOFLINES=$(eval cat .tmp/active_tmp.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/brute_subs.txt | wc -l)
end_subfunc "${NUMOFLINES} new subs (bruteforce)" ${FUNCNAME[0]}
else
@@ -592,7 +594,7 @@ function portscan(){
if [ "$PORTSCAN_ACTIVE" = true ]
then
- eval nmap --top-ports 1000 -sV -n --max-retries 2 -iL .tmp/ips_nowaf.txt -oN hosts/portscan_active.txt $DEBUG_STD
+ eval nmap --top-ports 1000 -sV -n --max-retries 2 -iL .tmp/ips_nowaf.txt -oN hosts/portscan_active.txt -oG .tmp/nmap_grep.gnmap $DEBUG_STD
fi
end_func "Results are saved in hosts/portscan_[passive|active].txt" ${FUNCNAME[0]}
@@ -840,12 +842,7 @@ function wordlist_gen(){
cat .tmp/url_extract_tmp.txt | tr "[:punct:]" "\n" | anew -q webs/dict_words.txt
cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt
cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt
- touch $called_fn_dir/.${FUNCNAME[0]}
- end=`date +%s`
- getElapsedTime $start $end
- notification "Wordlists Generated in ${runtime}" info
- printf "${bblue} Results are saved in webs/dict_[words|paths].txt${reset}\n"
- printf "${bgreen}#######################################################################\n\n"
+ end_func "Results are saved in webs/dict_[words|paths].txt" ${FUNCNAME[0]}
else
if [ "$WORDLIST" = false ]; then
printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n"
@@ -890,20 +887,20 @@ function xss(){
if [ "$DEEP" = true ] ; then
if [ -n "$XSS_SERVER" ]; then
sed -i "s/^blindPayload = \x27\x27/blindPayload = \x27${XSS_SERVER}\x27/" $tools/XSStrike/core/config.py
- eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --blind --skip > vulns/xss.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}
+ eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --blind --skip > vulns/xss.txt $DEBUG_STD
else
printf "${yellow}\n No XSS_SERVER defined, blind xss skipped\n\n"
- eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --skip > vulns/xss.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}
+ eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --skip > vulns/xss.txt $DEBUG_STD
fi
else
if [[ $(cat .tmp/xss_reflected.txt | wc -l) -le 200 ]]
then
if [ -n "$XSS_SERVER" ]; then
sed -i "s/^blindPayload = \x27\x27/blindPayload = \x27${XSS_SERVER}\x27/" $tools/XSStrike/core/config.py
- eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --blind --skip > vulns/xss.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}
+ eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --blind --skip > vulns/xss.txt $DEBUG_STD
else
printf "${yellow}\n No XSS_SERVER defined, blind xss skipped\n\n"
- eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --skip > vulns/xss.txt $DEBUG_STD && touch $called_fn_dir/.${FUNCNAME[0]}
+ eval python3 $tools/XSStrike/xsstrike.py --seeds .tmp/xss_reflected.txt -t $XSSTRIKE_THREADS --crawl --skip > vulns/xss.txt $DEBUG_STD
fi
else
printf "${bred} Skipping XSS: Too Much URLs to test, try with --deep flag${reset}\n"
@@ -926,7 +923,7 @@ function cors(){
then
start_func "CORS Scan"
eval python3 $tools/Corsy/corsy.py -i webs/webs.txt > webs/cors.txt $DEBUG_STD
- eval cat webs/cors.txt $DEBUG_ERROR && touch $called_fn_dir/.${FUNCNAME[0]}
+ eval cat webs/cors.txt $DEBUG_ERROR
end_func "Results are saved in webs/cors.txt"
else
if [ "$CORS" = false ]; then
@@ -1092,7 +1089,7 @@ function test_ssl(){
if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$TEST_SSL" = true ]
then
start_func "SSL Test"
- eval $tools/testssl.sh/testssl.sh --quiet --color 0 -U -iL hosts/ips.txt $DEBUG_ERROR > hosts/testssl.txt && touch $called_fn_dir/.${FUNCNAME[0]}
+ eval $tools/testssl.sh/testssl.sh --quiet --color 0 -U -iL hosts/ips.txt $DEBUG_ERROR > hosts/testssl.txt
end_func "Results are saved in hosts/testssl.txt" ${FUNCNAME[0]}
else
if [ "$TEST_SSL" = false ]; then
@@ -1103,6 +1100,23 @@ function test_ssl(){
fi
}
+function spraying(){
+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SPRAY" = true ]
+ then
+ start_func "Password spraying"
+ cd $tools/brutespray
+ eval python3 $tools/brutespray/brutespray.py --file .tmp/nmap_grep.gnmap --threads $BRUTESPRAY_THREADS --hosts $BRUTESPRAY_CONCURRENCE -o $dir/hosts/brutespray.txt $DEBUG_STD
+ cd $dir
+ end_func "Results are saved in hosts/brutespray.txt" ${FUNCNAME[0]}
+ else
+ if [ "$SPRAY" = false ]; then
+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n"
+ else
+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"
+ fi
+ fi
+}
+
###############################################################################################################
########################################## OPTIONS & MGMT #####################################################
###############################################################################################################
@@ -1352,6 +1366,7 @@ function all(){
ssti
sqli
xss
+ spraying
brokenLinks
test_ssl
end
@@ -1603,14 +1618,15 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; do
urlchecks
wordlist_gen
url_gf
+ jschecks
open_redirect
ssrf_checks
crlf_checks
lfi
ssti
sqli
- jschecks
xss
+ spraying
brokenLinks
test_ssl
end
diff --git a/requirements.txt b/requirements.txt
index 57896d1..73a2186 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -38,4 +38,5 @@ texttable==1.6.3
lxml==4.6.2
uvloop==0.15.2
PySocks==1.6.8
-h8mail
\ No newline at end of file
+h8mail
+argcomplete==1.10.0
\ No newline at end of file
diff --git a/update.sh b/update.sh
index 8b44a77..3665261 100755
--- a/update.sh
+++ b/update.sh
@@ -43,7 +43,7 @@ printf "${bblue}\n Updating installed python packages is finished ${reset}\n"
printf "${bgreen}#######################################################################\n"
#Tools to be updated
-repos="six2dez/degoogle_hunter davidtavarez/pwndb laramies/theHarvester EnableSecurity/wafw00f s0md3v/Arjun sqlmapproject/sqlmap 1ndianl33t/Gf-Patterns s0md3v/XSStrike gwen001/github-search eslam3kl/crtfinder dark-warlord14/LinkFinder ProjectAnte/dnsgen devanshbatham/ParamSpider s0md3v/Corsy Tuhinshubhra/CMSeeK pielco11/fav-up tomnomnom/gf codingo/Interlace blechschmidt/massdns devanshbatham/OpenRedireX obheda12/GitDorker"
+repos="six2dez/degoogle_hunter davidtavarez/pwndb vortexau/dnsvalidator laramies/theHarvester x90skysn3k/brutespray EnableSecurity/wafw00f s0md3v/Arjun sqlmapproject/sqlmap 1ndianl33t/Gf-Patterns s0md3v/XSStrike gwen001/github-search eslam3kl/crtfinder dark-warlord14/LinkFinder ProjectAnte/dnsgen devanshbatham/ParamSpider s0md3v/Corsy Tuhinshubhra/CMSeeK pielco11/fav-up tomnomnom/gf codingo/Interlace blechschmidt/massdns devanshbatham/OpenRedireX obheda12/GitDorker"
printf "\n\n${bgreen}#######################################################################\n"
printf "${bgreen} reconFTW updater script ${reset}\n\n"
@@ -61,19 +61,9 @@ for repo in ${repos}; do
cp *.json ~/.gf
elif [ "gf" = "$(basename $repo)" ]; then
cp -r examples ~/.gf
- elif [ "Interlace" = "$(basename $repo)" ] || [ "LinkFinder" = "$(basename $repo)" ]; then
- eval $SUDO python3 setup.py install $DEBUG_STD
- elif [ "LinkFinder" = "$(basename $repo)" ] || [ "LinkFinder" = "$(basename $repo)" ]; then
- eval $SUDO python3 setup.py install $DEBUG_STD
- elif [ "dnsgen" = "$(basename $repo)" ] || [ "LinkFinder" = "$(basename $repo)" ]; then
- eval $SUDO python3 setup.py install $DEBUG_STD
- elif [ "Arjun" = "$(basename $repo)" ] || [ "LinkFinder" = "$(basename $repo)" ]; then
+ elif [ "Interlace" = "$(basename $repo)" ] || [ "LinkFinder" = "$(basename $repo)" ] || [ "dnsgen" = "$(basename $repo)" ] || [ "Arjun" = "$(basename $repo)" ] || [ "wafw00f" = "$(basename $repo)" ] || [ "dnsvalidator" = "$(basename $repo)" ]; then
eval $SUDO python3 setup.py install $DEBUG_STD
fi
-# if [ "True" = "$IS_ARM" ] && [ "git-hound" = "$(basename $repo)" ]
-# then
-# go build && chmod 754 git-hound && $SUDO mv git-hound /usr/local/bin/
-# fi
fi
printf "${bblue}\n Updating ${repo} is finished ${reset}\n"
printf "${bgreen}#######################################################################\n"
@@ -96,9 +86,11 @@ eval wget -N -c -O ~/.gf/potential.json https://raw.githubusercontent.com/devans
eval wget -N -c -O ~/.config/amass/config.ini https://raw.githubusercontent.com/OWASP/Amass/master/examples/config.ini $DEBUG_STD
eval wget -N -C -O ~/.config/notify/notify.conf https://gist.githubusercontent.com/six2dez/23a996bca189a11e88251367e6583053/raw/a66c4d8cf47a3bc95f5e9ba84773428662ea760c/notify_sample.conf $DEBUG_ERROR
eval wget -N -c -O $dir/getjswords.py https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py $DEBUG_STD
-eval wget -N -c -O $dir/subdomains.txt subdomains.txt https://gist.githubusercontent.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw/1bcdf2d61df08e66fd2d63b6a840f02c3a2ae24c/subdomains.txt $DEBUG_STD $DEBUG_STD
-eval wget -N -c -O $dir/subdomains_big.txt https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD
-eval wget -N -c -O $dir/resolvers.txt https://raw.githubusercontent.com/BBerastegui/fresh-dns-servers/master/resolvers.txt $DEBUG_STD
+eval wget -N -c -O $dir/subdomains_big.txt https://s3.amazonaws.com/assetnote-wordlists/data/manual/best-dns-wordlist.txt
+eval wget -N -c -O $dir/subdomains_big2.txt https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD
+eval cat $dir/subdomains_big2.txt $DEBUG_ERROR | anew -q $dir/subdomains_big.txt
+eval rm $dir/subdomains_big2.txt $DEBUG_ERROR
+eval dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 100 -o $dir/resolvers.txt $DEBUG_STD
eval wget -N -c -O $dir/permutations_list.txt https://gist.githubusercontent.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw/137bb6b60c616552c705e93a345c06cec3a2cb1f/permutations_list.txt $DEBUG_STD
eval wget -N -c -O $dir/ssrf.py https://gist.githubusercontent.com/h4ms1k/adcc340495d418fcd72ec727a116fea2/raw/ea0774de5e27f9bc855207b175249edae2e9ccef/asyncio_ssrf.py $DEBUG_STD
eval wget -N -c -O $dir/fuzz_wordlist.txt https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt $DEBUG_STD