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

Cloud providers check && fixes

six2dez05c368de40fc
diff --git a/install.sh b/install.sh
index 992e8df..26ed640 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
. ./reconftw.cfg
@@ -55,6 +55,7 @@ repos["GitDorker"]="obheda12/GitDorker"
repos["testssl"]="drwetter/testssl.sh"
repos["S3Scanner"]="sa7mon/S3Scanner"
repos["puredns"]="d3mondev/puredns"
+repos["ip2provider"]="oldrho/ip2provider"
dir=${tools}
diff --git a/reconftw.cfg b/reconftw.cfg
index 2f88864..4a3c49e 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -2,7 +2,7 @@
# reconFTW config file #
#################################################################
-# TERM COLOURS
+# TERM COLORS
bred='\033[1;31m'
bblue='\033[1;34m'
bgreen='\033[1;32m'
@@ -71,6 +71,7 @@ FAVICON=true
PORTSCANNER=true
PORTSCAN_PASSIVE=true
PORTSCAN_ACTIVE=true
+CLOUD_IP=true
# Web analysis
WAF_DETECTION=true
diff --git a/reconftw.sh b/reconftw.sh
index 7a5ab37..cfef644 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
. ./reconftw.cfg
@@ -690,7 +690,7 @@ function portscan(){
eval cat hosts/subs_ips_vhosts.txt $DEBUG_ERROR | cut -d ' ' -f1 | egrep -iv "^(127|10|169|172|192)\." | anew -q hosts/ips.txt
- eval cat hosts/ips.txt $DEBUG_ERROR | cf-check -c $NPROC | egrep -iv "^(127|10|169|172|192)\." | anew -q .tmp/ips_nowaf.txt
+ eval cat hosts/ips.txt $DEBUG_ERROR | cf-check | egrep -iv "^(127|10|169|172|192)\." | anew -q .tmp/ips_nowaf.txt
printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n";
eval cat .tmp/ips_nowaf.txt $DEBUG_ERROR | sort
@@ -718,6 +718,22 @@ function portscan(){
fi
}
+function cloudprovider(){
+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CLOUD_IP" = true ]
+ then
+ start_func "Cloud provider check"
+ cd $tools/ip2provider
+ eval cat $dir/hosts/ips.txt | ./ip2provider.py | anew -q $dir/hosts/cloud_providers.txt $DEBUG_STD
+ cd $dir
+ end_func "Results are saved in hosts/cloud_providers.txt" ${FUNCNAME[0]}
+ else
+ if [ "$CLOUD_IP" = 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
+}
###############################################################################################################
############################################# WEB SCAN ########################################################
@@ -1491,6 +1507,7 @@ function passive(){
favicon
PORTSCAN_ACTIVE=false
portscan
+ cloudprovider
end
}
@@ -1525,6 +1542,7 @@ function recon(){
screenshot
favicon
portscan
+ cloudprovider
waf_checks
nuclei_check
cms_scanner
@@ -1585,6 +1603,7 @@ function multi_recon(){
notification "- ${NUMOFLINES_webs_total} total websites" good
portscan
+ cloudprovider
waf_checks
nuclei_check
for domain in $targets; do