smb-vuln-finder.sh 2.1 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. ips="$1"
  3. params="-Pn"
  4. echo "[*] Enumerating all SMB Shares"
  5. nmap -p 139,445 --script=smb-enum-shares -iL $ips -oA nmap/smb-enum-shares $params > /dev/null
  6. echo "[*] Enumerating SMB Vulnerability: MS06-025"
  7. nmap -p 139,445 --script=smb-vuln-ms06-025 -iL $ips -oA nmap/smb-vuln-ms06-025 $params > /dev/null
  8. echo "[*] Enumerating SMB Vulnerability: MS07-029"
  9. nmap -p 139,445 --script=smb-vuln-ms07-029 -iL $ips -oA nmap/smb-vuln-ms07-029 $params > /dev/null
  10. echo "[*] Enumerating SMB Vulnerability: MS08-067"
  11. nmap -p 139,445 --script=smb-vuln-ms08-067 -iL $ips -oA nmap/smb-vuln-ms08-067 $params > /dev/null
  12. echo "[*] Enumerating SMB Vulnerability: MS10-054"
  13. nmap -p 139,445 --script=smb-vuln-ms10-054 -iL $ips -oA nmap/smb-vuln-ms10-054 $params > /dev/null
  14. echo "[*] Enumerating SMB Vulnerability: MS10-061"
  15. nmap -p 139,445 --script=smb-vuln-ms10-061 -iL $ips -oA nmap/smb-vuln-ms10-061 $params > /dev/null
  16. echo "[*] Enumerating SMB Vulnerability: ms17-010 (aka EternalBlue)"
  17. nmap -p 139,445 --script=smb-vuln-ms17-010 -iL $ips -oA nmap/smb-vuln-ms17-010 $params > /dev/null
  18. echo "[*] Enumerating SMB Vulnerability: regsvc-dos"
  19. nmap -p 139,445 --script=smb-vuln-regsvc-dos -iL $ips -oA nmap/smb-vuln-regsvc-dos $params > /dev/null