|
|
|
@ -128,7 +128,7 @@ quickScan(){ |
|
|
|
|
echo -e "${GREEN}---------------------Starting Nmap Quick Scan---------------------" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
|
|
|
|
|
$nmapType -T4 --max-retries 1 --max-scan-delay 20 --defeat-rst-ratelimit --open -oN nmap/Quick_$1.nmap $1 |
|
|
|
|
$nmapType -T4 --max-retries 1 --max-scan-delay 20 --defeat-rst-ratelimit --open -oA nmap/Quick_$1 $1 |
|
|
|
|
assignPorts $1 |
|
|
|
|
|
|
|
|
|
echo -e "" |
|
|
|
@ -143,7 +143,7 @@ echo -e "${NC}" |
|
|
|
|
if [ -z `echo "${basicPorts}"` ]; then |
|
|
|
|
echo -e "${YELLOW}No ports in quick scan.. Skipping!" |
|
|
|
|
else |
|
|
|
|
$nmapType -sCV -p`echo "${basicPorts}"` -oN nmap/Basic_$1.nmap $1 |
|
|
|
|
$nmapType -sCV -p`echo "${basicPorts}"` -oA nmap/Basic_$1 $1 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ -f nmap/Basic_$1.nmap ] && [[ ! -z `cat nmap/Basic_$1.nmap | grep -w "Service Info: OS:"` ]]; then |
|
|
|
@ -166,7 +166,7 @@ UDPScan(){ |
|
|
|
|
echo -e "${GREEN}----------------------Starting Nmap UDP Scan----------------------" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
|
|
|
|
|
$nmapType -sU --max-retries 1 --open -oN nmap/UDP_$1.nmap $1 |
|
|
|
|
$nmapType -sU --max-retries 1 --open -oA nmap/UDP_$1 $1 |
|
|
|
|
assignPorts $1 |
|
|
|
|
|
|
|
|
|
if [ ! -z `echo "${udpPorts}"` ]; then |
|
|
|
@ -175,9 +175,9 @@ if [ ! -z `echo "${udpPorts}"` ]; then |
|
|
|
|
echo -e "${YELLOW}Making a script scan on UDP ports: `echo "${udpPorts}" | sed 's/,/, /g'`" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
if [ -f /usr/share/nmap/scripts/vulners.nse ]; then |
|
|
|
|
$nmapType -sCVU --script vulners --script-args mincvss=7.0 -p`echo "${udpPorts}"` -oN nmap/UDP_$1.nmap $1 |
|
|
|
|
$nmapType -sCVU --script vulners --script-args mincvss=7.0 -p`echo "${udpPorts}"` -oA nmap/UDP_$1 $1 |
|
|
|
|
else |
|
|
|
|
$nmapType -sCVU -p`echo "${udpPorts}"` -oN nmap/UDP_$1.nmap $1 |
|
|
|
|
$nmapType -sCVU -p`echo "${udpPorts}"` -oA nmap/UDP_$1 $1 |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
@ -190,7 +190,7 @@ fullScan(){ |
|
|
|
|
echo -e "${GREEN}---------------------Starting Nmap Full Scan----------------------" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
|
|
|
|
|
$nmapType -p- --max-retries 1 --max-rate 500 --max-scan-delay 20 -T4 -v -oN nmap/Full_$1.nmap $1 |
|
|
|
|
$nmapType -p- --max-retries 1 --max-rate 500 --max-scan-delay 20 -T4 -v -oA nmap/Full_$1 $1 |
|
|
|
|
assignPorts $1 |
|
|
|
|
|
|
|
|
|
if [ -z `echo "${basicPorts}"` ]; then |
|
|
|
@ -198,7 +198,7 @@ if [ -z `echo "${basicPorts}"` ]; then |
|
|
|
|
echo "" |
|
|
|
|
echo -e "${YELLOW}Making a script scan on all ports" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
$nmapType -sCV -p`echo "${allPorts}"` -oN nmap/Full_$1.nmap $1 |
|
|
|
|
$nmapType -sCV -p`echo "${allPorts}"` -oA nmap/Full_$1 $1 |
|
|
|
|
assignPorts $1 |
|
|
|
|
else |
|
|
|
|
cmpPorts $1 |
|
|
|
@ -214,7 +214,7 @@ else |
|
|
|
|
echo "" |
|
|
|
|
echo -e "${YELLOW}Making a script scan on extra ports: `echo "${extraPorts}" | sed 's/,/, /g'`" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
$nmapType -sCV -p`echo "${extraPorts}"` -oN nmap/Full_$1.nmap $1 |
|
|
|
|
$nmapType -sCV -p`echo "${extraPorts}"` -oA nmap/Full_$1 $1 |
|
|
|
|
assignPorts $1 |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -246,14 +246,14 @@ if [ ! -f /usr/share/nmap/scripts/vulners.nse ]; then |
|
|
|
|
else |
|
|
|
|
echo -e "${YELLOW}Running CVE scan on $portType ports" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
$nmapType -sV --script vulners --script-args mincvss=7.0 -p`echo "${ports}"` -oN nmap/CVEs_$1.nmap $1 |
|
|
|
|
$nmapType -sV --script vulners --script-args mincvss=7.0 -p`echo "${ports}"` -oA nmap/CVEs_$1 $1 |
|
|
|
|
echo "" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
echo "" |
|
|
|
|
echo -e "${YELLOW}Running Vuln scan on $portType ports" |
|
|
|
|
echo -e "${NC}" |
|
|
|
|
$nmapType -sV --script vuln -p`echo "${ports}"` -oN nmap/Vulns_$1.nmap $1 |
|
|
|
|
$nmapType -sV --script vuln -p`echo "${ports}"` -oA nmap/Vulns_$1 $1 |
|
|
|
|
echo -e "" |
|
|
|
|
echo -e "" |
|
|
|
|
echo -e "" |
|
|
|
@ -377,7 +377,7 @@ if [[ ! -z `echo "${file}" | grep -w "445/tcp"` ]]; then |
|
|
|
|
echo "smbmap -H $1 | tee recon/smbmap_$1.txt" |
|
|
|
|
echo "smbclient -L \"//$1/\" -U \"guest\"% | tee recon/smbclient_$1.txt" |
|
|
|
|
if [[ $osType == "Windows" ]]; then |
|
|
|
|
echo "nmap -Pn -p445 --script vuln -oN recon/SMB_vulns_$1.txt $1" |
|
|
|
|
echo "nmap -Pn -p445 --script vuln -oA recon/SMB_vulns_$1.txt $1" |
|
|
|
|
fi |
|
|
|
|
if [[ $osType == "Linux" ]]; then |
|
|
|
|
echo "enum4linux -a $1 | tee recon/enum4linux_$1.txt" |
|
|
|
|