Exploit databaseDownload repository ZIP
GH-26a48736551fb5413c84682bfcc08ae5
jheeree/cve-2022-1388-checker
Sources for CVE-2022-1388
57 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
jheeree/cve-2022-1388-checkerRevision a0206e45ef31
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
CVE-2022-1388.sh
Shell · 1,493 bytes#!/bin/bash
#-*- ENCODING: UTF-8 -*-
# Simple CVE-2022-1388 checker
archivo=$1
barra=`echo "-------------------------------------------------"`
dt=`date +"%Y_%m_%d_%H%M%S"`
#-------Colores-------
endColour="\033[0m\e[0m"
redColour="\e[0;31m\033[1m"
grayColour="\e[0;37m\033[1m"
greenColour="\e[0;32m\033[1m"
function helpPanel (){
echo -e "\n\t[+] Uso: ./CVE-2022-1388.sh hosts.txt"
exit 1
}
if [ -f $dt"/temp.tmp" ];then
rm -f $dt"/temp.tmp"
fi
function checker (){
carpeta=`mkdir $dt`
for ip in $(cat $archivo | sort -u );do
request=`curl -sk --max-time 2 "https://$ip/mgmt/shared/authn/login" | grep -q "resterrorresponse"`
if [ $? -eq 0 ]; then
echo $barra
echo -e "[x] Host: $ip F5 iControl Rest API exposed" >> $dt"/report.txt"
echo -e "${redColour}"$(tail -n1 $dt"/report.txt")"${endColour}"
else
echo $barra
echo -e "[✔] Host: $ip No Detectado" >> $dt"/report.txt"
echo -e "${greenColour}"$(tail -n1 $dt"/report.txt")"${endColour}"
fi
done
echo $barra; sleep 1
echo -e " ${greenColour}[✔]${endColour}${grayColour} Total equipos OK: ${endColour}${greenColour}"$(cat $dt"/report.txt" | grep "\[✔\]" | wc -l)"${endColour}"
echo $barra; sleep 1
echo -e " ${redColour}[x]${endColour}${grayColour} Total equipos detectados: ${endColour}${redColour}"$(cat $dt"/report.txt" | grep "\[x\]" | wc -l)"${endColour}"
echo $barra; sleep 1
rm -f $dt"/temp.tmp" >/dev/null 2>&1
exit 0
}
if [ $# -eq 0 ]; then
helpPanel
else
checker
fi