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

Added misconfig-mapper

six2dezd87829444a59
diff --git a/install.sh b/install.sh
index 50a7121..e7b9837 100755
--- a/install.sh
+++ b/install.sh
@@ -106,8 +106,8 @@ repos["trufflehog"]="trufflesecurity/trufflehog"
repos["nomore403"]="devploit/nomore403"
repos["SwaggerSpy"]="UndeadSec/SwaggerSpy"
repos["LeakSearch"]="JoelGMSec/LeakSearch"
-repos["Wapiti"]="wapiti-scanner/wapiti"
repos["ffufPostprocessing"]="Damian89/ffufPostprocessing"
+repos["misconfig-mapper"]="intigriti/misconfig-mapper"
function banner() {
tput clear
@@ -213,9 +213,11 @@ function install_tools() {
eval git pull $DEBUG_STD
eval go build -o ffufPostprocessing main.go $DEBUG_STD && eval chmod +x ./ffufPostprocessing $DEBUG_STD
fi
- if [[ "wapiti" == "$repo" ]]; then
- eval make install $DEBUG_STD
- fi
+ if [[ "misconfig-mapper" == "$repo" ]]; then
+ eval git reset --hard origin/main $DEBUG_STD
+ eval git pull $DEBUG_STD
+ eval go build -o misconfig-mapper $DEBUG_STD && eval chmod +x ./misconfig-mapper $DEBUG_STD
+ fi
fi
if [[ "gf" == "$repo" ]]; then
eval cp -r examples ~/.gf $DEBUG_ERROR
diff --git a/reconftw.cfg b/reconftw.cfg
index 5af28de..64d5b45 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -53,6 +53,7 @@ DOMAIN_INFO=true # whois info
REVERSE_WHOIS=true # amass intel reverse whois info, takes some time
IP_INFO=true # Reverse IP search, geolocation and whois
API_LEAKS=true # Check for API leaks
+3RD_PARTIES=true # Check for 3rd parties misconfigs
METAFINDER_LIMIT=20 # Max 250
# Subdomains
diff --git a/reconftw.sh b/reconftw.sh
index b521593..6f099e3 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -181,6 +181,14 @@ function tools_installed() {
printf "${bred} [*] nomore403 [NO]${reset}\n"
allinstalled=false
}
+ [ -f "${tools}/ffufPostprocessing/ffufPostprocessing" ] || {
+ printf "${bred} [*] ffufPostprocessing [NO]${reset}\n"
+ allinstalled=false
+ }
+ [ -f "${tools}/misconfig-mapper/misconfig-mapper" ] || {
+ printf "${bred} [*] misconfig-mapper [NO]${reset}\n"
+ allinstalled=false
+ }
[ -f "${tools}/SwaggerSpy/swaggerspy.py" ] || {
printf "${bred} [*] swaggerspy [NO]${reset}\n"
allinstalled=false
@@ -642,6 +650,40 @@ function domain_info() {
}
+function third_party_misconfigs() {
+
+ mkdir -p 3rdparties
+ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $3RD_PARTIES == true ]] && [[ $OSINT == true ]] && ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then
+ start_func ${FUNCNAME[0]} "Searching for third parties misconfigurations"
+ company_name=$(echo $domain | unfurl format %r)
+
+ pushd "${tools}/misconfig-mapper" >/dev/null || {
+ echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"
+ }
+ ./misconfig-mapper -target $company_name -service "*" | grep "\[-\]" > ${dir}/3rdparties/visma_misconfigurations.txt
+
+ popd >/dev/null || {
+ echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"
+ }
+
+ end_func "Results are saved in $domain/3rdparties" ${FUNCNAME[0]}
+
+ else
+ if [[ $3RD_PARTIES == false ]] || [[ $OSINT == false ]]; then
+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"
+ elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then
+ return
+ else
+ if [[ $3RD_PARTIES == false ]] || [[ $OSINT == false ]]; then
+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"
+ else
+ printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"
+ fi
+ fi
+ fi
+
+}
+
function ip_info() {
mkdir -p osint
@@ -1724,7 +1766,15 @@ function fuzz() {
interlace -tL webs/webs_all.txt -threads ${INTERLACE_THREADS} -c "ffuf ${FFUF_FLAGS} -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_/FUZZ -o _output_/_cleantarget_.json" -o $dir/.tmp/fuzzing 2>>"$LOGFILE" >/dev/null
for sub in $(cat webs/webs_all.txt); do
sub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')
- ~/Tools/ffufPostprocessing/ffufPostprocessing -result-file $dir/.tmp/fuzzing/${sub_out}.json -overwrite-result-file
+
+ pushd "${tools}/ffufPostprocessing" >/dev/null || {
+ echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"
+ }
+ ./ffufPostprocessing -result-file $dir/.tmp/fuzzing/${sub_out}.json -overwrite-result-file
+ popd >/dev/null || {
+ echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"
+ }
+
[ -s "$dir/.tmp/fuzzing/${sub_out}.json" ] && cat $dir/.tmp/fuzzing/${sub_out}.json | jq -r 'try .results[] | "\(.status) \(.length) \(.url)"' | sort -k1 | anew -q $dir/fuzzing/${sub_out}.txt
done
find $dir/fuzzing/ -type f -iname "*.txt" -exec cat {} + 2>>"$LOGFILE" | sort -k1 | anew -q $dir/fuzzing/fuzzing_full.txt