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
Added ssti wordlist, improved installer double check, fix passive recursive, lfi and ssti improvements
six2dezb58376f18706
diff --git a/install.sh b/install.shindex 268b572..dfe1a82 100755--- a/install.sh+++ b/install.sh@@ -60,6 +60,7 @@ repos["commix"]="commixproject/commix"repos["JSA"]="w9w/JSA"dir=${tools}+double_check=falseif grep -q "ARMv" /proc/cpuinfothen@@ -189,6 +190,7 @@ for gotool in "${!gotools[@]}"; doprintf "${yellow} $gotool installed (${go_step}/${#gotools[@]})${reset}\n"elseprintf "${red} Unable to install $gotool, try manually (${go_step}/${#gotools[@]})${reset}\n"+ double_check=truefidone@@ -215,6 +217,7 @@ for repo in "${!repos[@]}"; doprintf "${yellow} $repo installed (${repos_step}/${#repos[@]})${reset}\n"elseprintf "${red} Unable to install $repo, try manually (${repos_step}/${#repos[@]})${reset}\n"+ double_check=truefiif [ -s "setup.py" ]; theneval $SUDO python3 setup.py install $DEBUG_STD@@ -263,33 +266,36 @@ eval wget -O permutations_list.txt https://gist.github.com/six2dez/ffc2b14d283e8eval wget -nc -O ssrf.py https://gist.github.com/h4ms1k/adcc340495d418fcd72ec727a116fea2/raw $DEBUG_STDeval wget -nc -O fuzz_wordlist.txt https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt $DEBUG_STDeval wget -O lfi_wordlist.txt https://gist.githubusercontent.com/six2dez/a89a0c7861d49bb61a09822d272d5395/raw $DEBUG_STD+eval wget -O ssti_wordlist.txt https://gist.githubusercontent.com/six2dez/ab5277b11da7369bf4e9db72b49ad3c1/raw $DEBUG_STD## Last check-printf "${bblue} Running: Double check for installed tools ${reset}\n\n"-go_step=0-for gotool in "${!gotools[@]}"; do- go_step=$((go_step + 1))- eval type -P $gotool $DEBUG_STD || { eval ${gotools[$gotool]} $DEBUG_STD; }- exit_status=$?-done-repos_step=0-for repo in "${!repos[@]}"; do- repos_step=$((repos_step + 1))- eval cd $dir/$repo $DEBUG_STD || { eval git clone https://github.com/${repos[$repo]} $dir/$repo $DEBUG_STD && cd $dir/$repo; }- eval git pull $DEBUG_STD- exit_status=$?- if [ -s "setup.py" ]; then- eval $SUDO python3 setup.py install $DEBUG_STD- fi- if [ "massdns" = "$repo" ]; then- eval make $DEBUG_STD && strip -s bin/massdns && eval $SUDO cp bin/massdns /usr/bin/ $DEBUG_ERROR- elif [ "gf" = "$repo" ]; then- eval cp -r examples ~/.gf $DEBUG_ERROR- elif [ "Gf-Patterns" = "$repo" ]; then- eval mv *.json ~/.gf $DEBUG_ERROR- fi- cd $dir-done+if [ "$double_check" = "true" ]; then+ printf "${bblue} Running: Double check for installed tools ${reset}\n\n"+ go_step=0+ for gotool in "${!gotools[@]}"; do+ go_step=$((go_step + 1))+ eval type -P $gotool $DEBUG_STD || { eval ${gotools[$gotool]} $DEBUG_STD; }+ exit_status=$?+ done+ repos_step=0+ for repo in "${!repos[@]}"; do+ repos_step=$((repos_step + 1))+ eval cd $dir/$repo $DEBUG_STD || { eval git clone https://github.com/${repos[$repo]} $dir/$repo $DEBUG_STD && cd $dir/$repo; }+ eval git pull $DEBUG_STD+ exit_status=$?+ if [ -s "setup.py" ]; then+ eval $SUDO python3 setup.py install $DEBUG_STD+ fi+ if [ "massdns" = "$repo" ]; then+ eval make $DEBUG_STD && strip -s bin/massdns && eval $SUDO cp bin/massdns /usr/bin/ $DEBUG_ERROR+ elif [ "gf" = "$repo" ]; then+ eval cp -r examples ~/.gf $DEBUG_ERROR+ elif [ "Gf-Patterns" = "$repo" ]; then+ eval mv *.json ~/.gf $DEBUG_ERROR+ fi+ cd $dir+ done+fiprintf "${bblue} Running: Performing last configurations ${reset}\n\n"## Last stepsdiff --git a/reconftw.cfg b/reconftw.cfgindex f0bf0b7..021ad6b 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -133,6 +133,7 @@ HTTPX_UNCOMMONPORTS_TIMEOUT=10 # Seconds# listsfuzz_wordlist=${tools}/fuzz_wordlist.txtlfi_wordlist=${tools}/lfi_wordlist.txt+ssti_wordlist=${tools}/ssti_wordlist.txtsubs_wordlist=${tools}/subdomains.txtsubs_wordlist_big=${tools}/subdomains_big.txtresolvers=${tools}/resolvers.txtdiff --git a/reconftw.sh b/reconftw.shindex dad206f..74d3ab9 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -484,8 +484,9 @@ function sub_permut(){}function sub_recursive(){- if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBRECURSIVE" = true ]; then+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && { [ "$SUBRECURSIVE" = true ] || [ "$DEEP" = true ]; } ; then+ start_subfunc "Running : Subdomains recursive search"# Passive recursivefor sub in $(cat subdomains/subdomains.txt | rev | cut -d '.' -f 3,2,1 | rev | sort | uniq -c | sort -nr | grep -v '1 ' | sed -e 's/^[[:space:]]*//' | cut -d ' ' -f 2); dosubfinder -d $sub -all -silent &>>"$LOGFILE" | anew -q .tmp/passive_recursive.txt@@ -498,7 +499,6 @@ function sub_recursive(){# Bruteforce recursiveif [[ $(cat subdomains/subdomains.txt | wc -l) -le 1000 ]]; then- start_subfunc "Running : Subdomains recursive search"echo "" > .tmp/brute_recursive_wordlist.txtfor sub in $(cat subdomains/subdomains.txt); dosed "s/$/.$sub/" $subs_wordlist >> .tmp/brute_recursive_wordlist.txt@@ -514,7 +514,7 @@ function sub_recursive(){NUMOFLINES=$(cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt 2>>"$LOGFILE" | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)end_subfunc "${NUMOFLINES} new subs (recursive)" ${FUNCNAME[0]}else- notification "Skipping Recursive: Too Many Subdomains" warn+ notification "Skipping Recursive BF: Too Many Subdomains" warnfielseif [ "$SUBRECURSIVE" = false ]; then@@ -1190,7 +1190,7 @@ function lfi(){start_func "LFI checks"cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txtfor url in $(cat .tmp/tmp_lfi.txt); do- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txt+ ffuf -v -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txtdoneend_func "Results are saved in vulns/lfi.txt" ${FUNCNAME[0]}else@@ -1207,10 +1207,10 @@ function lfi(){function ssti(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ]; thenstart_func "SSTI checks"- cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt- cat gf/ssti.txt | qsreplace "{{''.class.mro[2].subclasses()[40]('/etc/passwd').read()}}" | anew -q .tmp/ssti_fuzz2.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ cat gf/ssti.txt | qsreplace FUZZ | anew -q .tmp/tmp_ssti.txt+ for url in $(cat .tmp/tmp_ssti.txt); do+ ffuf -v -t $FFUF_THREADS -H "${HEADER}" -w $ssti_wordlist -u $url -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ doneend_func "Results are saved in vulns/ssti.txt" ${FUNCNAME[0]}elseif [ "$SSTI" = false ]; then@@ -1925,7 +1925,7 @@ function help(){########################################### START SCRIPT ####################################################################################################################################################################-PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:rspawvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help' -n 'reconFTW' -- "$@")+PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:rspanwvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help' -n 'reconFTW' -- "$@")# Note the quotes around "$PROGARGS": they are essential!diff --git a/reconftw_axiom.sh b/reconftw_axiom.shindex 1cb6dfb..e1b6ccb 100755--- a/reconftw_axiom.sh+++ b/reconftw_axiom.sh@@ -271,9 +271,7 @@ function subdomains_full(){sub_activesub_brutesub_permut- if [ "$DEEP" = true ]; then- sub_recursive- fi+ sub_recursivesub_dnssub_scrapingwebprobe_simple@@ -488,8 +486,9 @@ function sub_permut(){}function sub_recursive(){- if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBRECURSIVE" = true ]; then+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && { [ "$SUBRECURSIVE" = true ] || [ "$DEEP" = true ]; } ; then+ start_subfunc "Running : Subdomains recursive search"# Passive recursivefor sub in $(cat subdomains/subdomains.txt | rev | cut -d '.' -f 3,2,1 | rev | sort | uniq -c | sort -nr | grep -v '1 ' | sed -e 's/^[[:space:]]*//' | cut -d ' ' -f 2); doecho $sub | anew -q .tmp/sub_pass_recur_target.com@@ -498,13 +497,12 @@ function sub_recursive(){axiom-scan .tmp/sub_pass_recur_target.com -m assetfinder -o .tmp/assetfinder_prec.txt &>>"$LOGFILE"axiom-scan .tmp/sub_pass_recur_target.com -m amass -passive -o .tmp/amass_prec.txt &>>"$LOGFILE"axiom-scan .tmp/sub_pass_recur_target.com -m findomain -o .tmp/findomain_prec.txt &>>"$LOGFILE"- cat .tmp/*_prec.txt | anew -q .tmp/passive_recursive.txt+ eval cat .tmp/*_prec.txt 2>>"$LOGFILE" | anew -q .tmp/passive_recursive.txtaxiom-scan .tmp/passive_recursive.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/passive_recurs_tmp.txt &>>"$LOGFILE"[ -f ".tmp/passive_recurs_tmp.txt" ] && cat .tmp/passive_recurs_tmp.txt | anew -q subdomains/subdomains.txt#Bruteforce recursiveif [[ $(cat subdomains/subdomains.txt | wc -l) -le 1000 ]]; then- start_subfunc "Running : Subdomains recursive search"echo "" > .tmp/brute_recursive_wordlist.txtfor sub in $(cat subdomains/subdomains.txt); dosed "s/$/.$sub/" $subs_wordlist >> .tmp/brute_recursive_wordlist.txt@@ -520,7 +518,7 @@ function sub_recursive(){NUMOFLINES=$(cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt 2>>"$LOGFILE" | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)end_subfunc "${NUMOFLINES} new subs (recursive)" ${FUNCNAME[0]}else- notification "Skipping Recursive: Too Many Subdomains" warn+ notification "Skipping Recursive BF: Too Many Subdomains" warnfielseif [ "$SUBRECURSIVE" = false ]; then@@ -1197,7 +1195,7 @@ function lfi(){start_func "LFI checks"cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txtfor url in $(cat .tmp/tmp_lfi.txt); do- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txt+ ffuf -v -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txtdoneend_func "Results are saved in vulns/lfi.txt" ${FUNCNAME[0]}else@@ -1214,10 +1212,10 @@ function lfi(){function ssti(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ]; thenstart_func "SSTI checks"- cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt- cat gf/ssti.txt | qsreplace "{{''.class.mro[2].subclasses()[40]('/etc/passwd').read()}}" | anew -q .tmp/ssti_fuzz2.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ cat gf/ssti.txt | qsreplace FUZZ | anew -q .tmp/tmp_ssti.txt+ for url in $(cat .tmp/tmp_ssti.txt); do+ ffuf -v -t $FFUF_THREADS -H "${HEADER}" -w $ssti_wordlist -u $url -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ doneend_func "Results are saved in vulns/ssti.txt" ${FUNCNAME[0]}elseif [ "$SSTI" = false ]; then@@ -2027,7 +2025,7 @@ function help(){########################################### START SCRIPT ####################################################################################################################################################################-PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:rspawvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help' -n 'reconFTW' -- "$@")+PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:rspanwvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help' -n 'reconFTW' -- "$@")# Note the quotes around "$PROGARGS": they are essential!