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
Unimap added, sudoers advice and small fixes
six2dezfb0682fbb74d
diff --git a/install.sh b/install.shindex f7b5859..54c2660 100755--- a/install.sh+++ b/install.sh@@ -65,15 +65,22 @@ elseIS_ARM="False";fi+printf "\n\n${bgreen}#######################################################################${reset}\n"+printf "${bgreen} reconFTW installer/updater script ${reset}\n\n"+printf "${yellow} This may take time. So, go grab a coffee! ${reset}\n\n"+if [[ $(id -u | grep -o '^0$') == "0" ]]; thenSUDO=" "else+ if sudo -n false 2>/dev/null; then+ printf "${bred} Is strongly recommended to add your user to sudoers${reset}\n"+ printf "${bred} This will avoid prompts for sudo password in the middle of the installation${reset}\n"+ printf "${bred} And more important, in the middle of the scan (needed for nmap SYN scan)${reset}\n\n"+ printf "${bred} echo \"${USERNAME} ALL=(ALL:ALL) NOPASSWD: ALL\" > /etc/sudoers.d/reconFTW${reset}\n\n"+ fiSUDO="sudo"fi-printf "\n\n${bgreen}#######################################################################${reset}\n"-printf "${bgreen} reconFTW installer/updater script ${reset}\n\n"-printf "${yellow} This may take time. So, go grab a coffee! ${reset}\n\n"install_apt(){eval $SUDO apt update -y $DEBUG_STDeval $SUDO apt install chromium-browser -y $DEBUG_STD@@ -222,18 +229,21 @@ doneif [ "True" = "$IS_ARM" ]theneval wget -N -c https://github.com/Findomain/Findomain/releases/latest/download/findomain-rpi $DEBUG_STD- eval $SUDO mv findomain-rpi /usr/local/bin/findomain+ eval $SUDO mv findomain-rpi /usr/bin/findomainelseeval wget -N -c https://github.com/Findomain/Findomain/releases/latest/download/findomain-linux $DEBUG_STDeval wget -N -c https://github.com/sensepost/gowitness/releases/download/2.3.4/gowitness-2.3.4-linux-amd64 $DEBUG_STDeval wget -N -c https://github.com/codingo/DNSCewl/raw/master/DNScewl $DEBUG_STD- eval $SUDO mv DNScewl /usr/local/bin/DNScewl- eval $SUDO mv gowitness-2.3.4-linux-amd64 /usr/local/bin/gowitness- eval $SUDO mv findomain-linux /usr/local/bin/findomain+ eval wget -N -c https://github.com/Edu4rdSHL/unimap/releases/download/0.4.0/unimap-linux $DEBUG_STD+ eval $SUDO mv DNScewl /usr/bin/DNScewl+ eval $SUDO mv gowitness-2.3.4-linux-amd64 /usr/bin/gowitness+ eval $SUDO mv findomain-linux /usr/bin/findomain+ eval $SUDO mv unimap-linux /usr/bin/unimapfi-eval $SUDO chmod 755 /usr/local/bin/findomain-eval $SUDO chmod 755 /usr/local/bin/gowitness-eval $SUDO chmod 755 /usr/local/bin/DNScewl+eval $SUDO chmod 755 /usr/bin/findomain+eval $SUDO chmod 755 /usr/bin/gowitness+eval $SUDO chmod 755 /usr/bin/DNScewl+eval $SUDO chmod 755 /usr/bin/unimapeval subfinder $DEBUG_STDeval subfinder $DEBUG_STD@@ -289,6 +299,8 @@ eval h8mail -g $DEBUG_STD## Stripping all Go binarieseval strip -s $HOME/go/bin/* $DEBUG_STD+eval $SUDO cp $HOME/go/bin/* /usr/bin $DEBUG_STD+printf "${yellow} Remember set your api keys:\n - amass (~/.config/amass/config.ini)\n - subfinder (~/.config/subfinder/config.yaml)\n - GitHub (~/Tools/.github_tokens)\n - SHODAN (SHODAN_API_KEY in reconftw.cfg)\n - SSRF Server (COLLAB_SERVER in reconftw.cfg) \n - Blind XSS Server (XSS_SERVER in reconftw.cfg) \n - notify (~/.config/notify/notify.conf) \n - theHarvester (~/Tools/theHarvester/api-keys.yml)\n - H8mail (~/Tools/h8mail_config.ini)\n\n${reset}"printf "${bgreen} Finished!${reset}\n\n"printf "\n\n${bgreen}#######################################################################${reset}\n"diff --git a/reconftw.sh b/reconftw.shindex aafc95e..c14a95b 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -325,7 +325,7 @@ function sub_crt(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBCRT" = true ]; thenstart_subfunc "Running : Crtsh Subdomain Enumeration"python3 $tools/ctfr/ctfr.py -d $domain -o .tmp/crtsh_subs_tmp.txt &>>"$LOGFILE"- curl "https://tls.bufferover.run/dns?q=.${domain}" 2>>"$LOGFILE" | jq -r .Results[] 2>>"$LOGFILE" | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs.txt+ curl "https://tls.bufferover.run/dns?q=.${domain}" 2>>"$LOGFILE" | jq -r .Results[] 2>>"$LOGFILE" | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txtcurl "https://dns.bufferover.run/dns?q=.${domain}" 2>>"$LOGFILE" | jq -r '.FDNS_A'[],'.RDNS'[] 2>>"$LOGFILE" | cut -d ',' -f2 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txtNUMOFLINES=$(cat .tmp/crtsh_subs_tmp.txt 2>>"$LOGFILE" | anew .tmp/crtsh_subs.txt | wc -l)end_subfunc "${NUMOFLINES} new subs (cert transparency)" ${FUNCNAME[0]}@@ -599,12 +599,14 @@ function webprobe_full(){if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ]; thenstart_func "Http probing non standard ports"- timeout_secs=$(($(cat subdomains/subdomains.txt | wc -l)*5+10))+ sudo unimap --fast-scan -f subdomains/subdomains.txt --ports $UNCOMMON_PORTS_WEB -q -k --url-output | anew -q .tmp/nmap_uncommonweb.txt+ cat .tmp/nmap_uncommonweb.txt | httpx -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt- cat subdomains/subdomains.txt | timeout $timeout_secs naabu -p $UNCOMMON_PORTS_WEB -o .tmp/nmap_uncommonweb.txt &>>"$LOGFILE" && uncommon_ports_checked=$(cat .tmp/nmap_uncommonweb.txt | cut -d ':' -f2 | sort -u | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d')- if [ -n "$uncommon_ports_checked" ]; then- cat subdomains/subdomains.txt | httpx -ports $uncommon_ports_checked -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt- fi+ #timeout_secs=$(($(cat subdomains/subdomains.txt | wc -l)*5+10))+ #cat subdomains/subdomains.txt | timeout $timeout_secs naabu -p $UNCOMMON_PORTS_WEB -o .tmp/nmap_uncommonweb.txt &>>"$LOGFILE" && uncommon_ports_checked=$(cat .tmp/nmap_uncommonweb.txt | cut -d ':' -f2 | sort -u | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d')+ #if [ -n "$uncommon_ports_checked" ]; then+ #cat subdomains/subdomains.txt | httpx -ports $uncommon_ports_checked -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt+ #fiNUMOFLINES=$(cat .tmp/probed_uncommon_ports_tmp.txt 2>>"$LOGFILE" | anew webs/webs_uncommon_ports.txt | wc -l)notification "Uncommon web ports: ${NUMOFLINES} new websites" goodcat webs/webs_uncommon_ports.txt 2>>"$LOGFILE"@@ -682,7 +684,7 @@ function portscan(){donefiif [ "$PORTSCAN_ACTIVE" = true ]; then- nmap --top-ports 1000 -sV -n --max-retries 2 -Pn -iL .tmp/ips_nowaf.txt -oN hosts/portscan_active.txt -oG .tmp/nmap_grep.gnmap &>>"$LOGFILE"+ sudo nmap --top-ports 1000 -sV -n --max-retries 2 -Pn -iL .tmp/ips_nowaf.txt -oN hosts/portscan_active.txt -oG .tmp/nmap_grep.gnmap &>>"$LOGFILE"fiend_func "Results are saved in hosts/portscan_[passive|active].txt" ${FUNCNAME[0]}else@@ -953,7 +955,7 @@ function jschecks(){fiif [ -s ".tmp/js_endpoints.txt" ]; thensed -i '/^\//!d' .tmp/js_endpoints.txt- cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt+ cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txtfiprintf "${yellow} Running : Gathering secrets 4/5${reset}\n"if [ -s "js/js_livelinks.txt" ]; then@@ -1572,6 +1574,7 @@ function multi_osint(){fiif [ -s "$list" ]; then+ sed -i 's/\r$//' $listtargets=$(cat $list)elsenotification "Target list not provided" error@@ -1642,6 +1645,7 @@ function multi_recon(){fiif [ -s "$list" ]; then+ sed -i 's/\r$//' $listtargets=$(cat $list)elsenotification "Target list not provided" error@@ -1823,7 +1827,7 @@ function webs_menu(){function help(){printf "\n Usage: $0 [-d domain.tld] [-m name] [-l list.txt] [-x oos.txt] [-i in.txt] "- printf "\n [-r] [-s] [-p] [-a] [-w] [-n] [-i] [-h] [--deep] [--fs] [-o OUTPUT]\n\n"+ printf "\n [-r] [-s] [-p] [-a] [-w] [-n] [-i] [-h] [-f] [--deep] [-o OUTPUT]\n\n"printf " ${bblue}TARGET OPTIONS${reset}\n"printf " -d domain.tld Target domain\n"printf " -m company Target company name\n"@@ -1841,7 +1845,7 @@ function help(){printf " -h Help - Show this help\n"printf " \n"printf " ${bblue}GENERAL OPTIONS${reset}\n"- printf " -f confile_file Alternate reconftw.cfg file\n"+ printf " -f confile_file Alternate reconftw.cfg file\n"printf " --deep Deep scan (Enable some slow options for deeper scan)\n"printf " -o output/path Define output folder\n"printf " \n"@@ -1895,7 +1899,7 @@ while true; dooutOfScope_file=$2shift 2continue- ;;+ ;;'-i')inScope_file=$2shift 2@@ -1929,10 +1933,10 @@ while true; docontinue;;'-n'|'--osint')- opt_mode='i'+ opt_mode='n'shiftcontinue- ;;+ ;;# extra stuff'-o')@@ -1941,18 +1945,17 @@ while true; doshift 2continue- ;;+ ;;'-f')config_file=$2shift 2continue- ;;+ ;;'--deep')opt_deep=trueshiftcontinue;;-'--')shiftbreak@@ -1963,12 +1966,10 @@ while true; dohelpexit 1;;-esacdone--# This is the first thing to do to read in alternate config+# This is the first thing to do to read in alternate configif [ -s "$config_file" ]; then. "${config_file}"else@@ -2026,8 +2027,8 @@ case $opt_mode inexitfiif [ -n "$list" ]; then-#mode="list_recon"+ sed -i 's/\r$//' $listfor domain in $(cat $list); dostartrecon@@ -2043,6 +2044,7 @@ case $opt_mode in's')if [ -n "$list" ]; then#mode="subs_menu"+ sed -i 's/\r$//' $listfor domain in $(cat $list); dosubs_menudone@@ -2053,6 +2055,7 @@ case $opt_mode in'p')if [ -n "$list" ]; then#mode="passive"+ sed -i 's/\r$//' $listfor domain in $(cat $list); dopassivedone@@ -2063,6 +2066,7 @@ case $opt_mode in'a')if [ -n "$list" ]; then#mode="all"+ sed -i 's/\r$//' $listfor domain in $(cat $list); doalldone@@ -2085,10 +2089,11 @@ case $opt_mode in'i')PRESERVE=trueif [ -n "$multi" ]; then- multi_osint+ multi_osintexitfiif [ -n "$list" ]; then+ sed -i 's/\r$//' $listfor domain in $(cat $list); dostartosint@@ -2099,11 +2104,10 @@ case $opt_mode inosintendfi-- ;;+ ;;# No mode selected. EXIT!*)helpexit 1;;-esac+esac\ No newline at end of filediff --git a/reconftw_axiom.sh b/reconftw_axiom.shindex c674416..7568c1e 100755--- a/reconftw_axiom.sh+++ b/reconftw_axiom.sh@@ -954,7 +954,7 @@ function jschecks(){fiif [ -s ".tmp/js_endpoints.txt" ]; thensed -i '/^\//!d' .tmp/js_endpoints.txt- cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt+ cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txtfiprintf "${yellow} Running : Gathering secrets 4/5${reset}\n"if [ -s "js/js_livelinks.txt" ]; then