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
emailfinder and analytics relationships
six2dez5658d3547951
diff --git a/install.sh b/install.shindex 38ed046..4ad34f4 100755--- a/install.sh+++ b/install.sh@@ -59,6 +59,7 @@ repos["testssl"]="drwetter/testssl.sh"repos["ip2provider"]="oldrho/ip2provider"repos["commix"]="commixproject/commix"repos["JSA"]="w9w/JSA"+repos["AnalyticsRelationships"]="Josue87/AnalyticsRelationships"dir=${tools}double_check=falsediff --git a/reconftw.cfg b/reconftw.cfgindex 91fe8dd..66a9f7b 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -48,6 +48,7 @@ METAFINDER_LIMIT=20 # Max 250# SubdomainsSUBCRT=true+SUBANALYTICS=trueSUBBRUTE=trueSUBSCRAPING=trueSUBPERMUTE=truediff --git a/reconftw.sh b/reconftw.shindex 8b0382e..372d1cd 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -101,6 +101,7 @@ function tools_installed(){type -P hakrevdns &>/dev/null || { printf "${bred} [*] hakrevdns [NO]${reset}\n${reset}"; allinstalled=false;}type -P gdn &>/dev/null || { printf "${bred} [*] gdn [NO]${reset}\n"; allinstalled=false;}type -P resolveDomains &>/dev/null || { printf "${bred} [*] resolveDomains [NO]${reset}\n"; allinstalled=false;}+ type -P emailfinder &>/dev/null || { printf "${bred} [*] emailfinder [NO]${reset}\n"; allinstalled=false;}if [ "${allinstalled}" = true ]; thenprintf "${bgreen} Good! All installed! ${reset}\n\n"@@ -176,6 +177,8 @@ function metadata(){function emails(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$EMAILS" = true ] && [ "$OSINT" = true ]; thenstart_func "Searching emails/users/passwords leaks"+ emailfinder -d $domain | anew -q .tmp/emailfinder.txt+ [ -s ".tmp/emailfinder.txt" ] && cat .tmp/emailfinder.txt | awk 'matched; /^-----------------$/ { matched = 1 }' | anew -q osint/emails.txtcd "$tools/theHarvester" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }python3 theHarvester.py -d $domain -b all 2>>"$LOGFILE" > $dir/.tmp/harvester.txtcd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }@@ -271,6 +274,7 @@ function subdomains_full(){sub_recursivesub_dnssub_scraping+ sub_analyticswebprobe_simpleif [ -f "subdomains/subdomains.txt" ]; thendeleteOutScoped $outOfScope_file subdomains/subdomains.txt@@ -416,6 +420,27 @@ function sub_scraping(){fi}+function sub_analytics(){+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBANALYTICS" = true ]; then+ start_subfunc "Running : Analytics Subdomain Enumeration"+ if [ -s ".tmp/probed_tmp_scrap.txt" ]; then+ for sub in $(cat .tmp/probed_tmp_scrap.txt); do+ python3 $tools/AnalyticsRelationships/Python/analyticsrelationships.py -u $sub | anew -q .tmp/analytics_subs_tmp.txt 2>>"$LOGFILE" &>/dev/null+ done+ [ -s ".tmp/analytics_subs_tmp.txt" ] && cat .tmp/analytics_subs_tmp.txt 2>>"$LOGFILE" | grep "\.$domain$\|^$domain$" | sed "s/|__ //" | anew -q .tmp/analytics_subs_clean.txt+ [ -s ".tmp/analytics_subs_clean.txt" ] && puredns resolve .tmp/analytics_subs_clean.txt -w .tmp/analytics_subs_resolved.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT 2>>"$LOGFILE" &>/dev/null+ fi+ NUMOFLINES=$(cat .tmp/analytics_subs_resolved.txt 2>>"$LOGFILE" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (analytics relationship)" ${FUNCNAME[0]}+ else+ if [ "$SUBANALYTICS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fi+ fi+}+function sub_permut(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBPERMUTE" = true ]; thenstart_subfunc "Running : Permutations Subdomain Enumeration"diff --git a/reconftw_axiom.sh b/reconftw_axiom.shindex 7792a28..212d5bf 100755--- a/reconftw_axiom.sh+++ b/reconftw_axiom.sh@@ -101,6 +101,7 @@ function tools_installed(){type -P hakrevdns &>/dev/null || { printf "${bred} [*] hakrevdns [NO]${reset}\n${reset}"; allinstalled=false;}type -P gdn &>/dev/null || { printf "${bred} [*] gdn [NO]${reset}\n"; allinstalled=false;}type -P resolveDomains &>/dev/null || { printf "${bred} [*] resolveDomains [NO]${reset}\n"; allinstalled=false;}+ type -P emailfinder &>/dev/null || { printf "${bred} [*] emailfinder [NO]${reset}\n"; allinstalled=false;}type -P axiom-ls &>/dev/null || { printf "${bred} [*] axiom [NO]${reset}\n${reset}"; allinstalled=false;}if [ "${allinstalled}" = true ]; then@@ -177,6 +178,8 @@ function metadata(){function emails(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$EMAILS" = true ] && [ "$OSINT" = true ]; thenstart_func "Searching emails/users/passwords leaks"+ emailfinder -d $domain | anew -q .tmp/emailfinder.txt+ [ -s ".tmp/emailfinder.txt" ] && cat .tmp/emailfinder.txt | awk 'matched; /^-----------------$/ { matched = 1 }' | anew -q osint/emails.txtcd "$tools/theHarvester" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }python3 theHarvester.py -d $domain -b all 2>>"$LOGFILE" > $dir/.tmp/harvester.txtcd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }@@ -272,6 +275,7 @@ function subdomains_full(){sub_recursivesub_dnssub_scraping+ sub_analyticswebprobe_simpleif [ -f "subdomains/subdomains.txt" ]; thendeleteOutScoped $outOfScope_file subdomains/subdomains.txt@@ -428,6 +432,27 @@ function sub_scraping(){fi}+function sub_analytics(){+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBANALYTICS" = true ]; then+ start_subfunc "Running : Analytics Subdomain Enumeration"+ if [ -s ".tmp/probed_tmp_scrap.txt" ]; then+ for sub in $(cat .tmp/probed_tmp_scrap.txt); do+ python3 $tools/AnalyticsRelationships/Python/analyticsrelationships.py -u $sub | anew -q .tmp/analytics_subs_tmp.txt 2>>"$LOGFILE" &>/dev/null+ done+ [ -s ".tmp/analytics_subs_tmp.txt" ] && cat .tmp/analytics_subs_tmp.txt 2>>"$LOGFILE" | grep "\.$domain$\|^$domain$" | sed "s/|__ //" | anew -q .tmp/analytics_subs_clean.txt+ [ -s ".tmp/analytics_subs_clean.txt" ] && axiom-scan .tmp/analytics_subs_clean.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/analytics_subs_resolved.txt 2>>"$LOGFILE" &>/dev/null+ fi+ NUMOFLINES=$(cat .tmp/analytics_subs_resolved.txt 2>>"$LOGFILE" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (analytics relationship)" ${FUNCNAME[0]}+ else+ if [ "$SUBANALYTICS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fi+ fi+}+function sub_permut(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBPERMUTE" = true ]; thenstart_subfunc "Running : Permutations Subdomain Enumeration"@@ -631,8 +656,8 @@ function screenshot(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$WEBSCREENSHOT" = true ]; thenstart_func "Web Screenshots"cat webs/webs.txt webs/webs_uncommon_ports.txt 2>>"$LOGFILE" | anew -q .tmp/webs_screenshots.txt- axiom-scan .tmp/webs_screenshots.txt -m webscreenshot -w $WEBSCREENSHOT_THREADS -o screenshots 2>>"$LOGFILE" &>/dev/null-# axiom-scan .tmp/webs_screenshots.txt -m "$AXIOM_SCREENSHOT_MODULE" -o screenshots &>>"$LOGFILE"+ [ "$AXIOM_SCREENSHOT_MODULE" = "webscreenshot" ] && axiom-scan .tmp/webs_screenshots.txt -m $AXIOM_SCREENSHOT_MODULE -w $WEBSCREENSHOT_THREADS -o screenshots 2>>"$LOGFILE" &>/dev/null+ [ "$AXIOM_SCREENSHOT_MODULE" != "webscreenshot" ] && axiom-scan .tmp/webs_screenshots.txt -m $AXIOM_SCREENSHOT_MODULE -o screenshots &>>"$LOGFILE"end_func "Results are saved in $domain/screenshots folder" ${FUNCNAME[0]}elseif [ "$WEBSCREENSHOT" = false ]; thendiff --git a/requirements.txt b/requirements.txtindex e71a933..c0ce4d7 100644--- a/requirements.txt+++ b/requirements.txt@@ -46,4 +46,5 @@ s3scannershodandnspythonpytest-runner-webscreenshot\ No newline at end of file+webscreenshot+emailfinder\ No newline at end of file