14/04/2025

Tanker Network Security Scanner for CTFs!!

πŸ” Advanced Nmap Service Scanner – Bash Script

This blog post introduces a powerful Bash script designed to automate and streamline network service scanning using Nmap. The script uses service-specific plugins, checks only open ports, logs results with timestamps, and outputs color-coded terminal feedback.

πŸ“‚ View it on GitHub: github.com/ElusiveHacker/Tanker


πŸš€ Features

  • ✅ Scans only open ports for efficiency
  • πŸ“œ Uses Nmap plugins/scripts tailored to each service
  • 🎨 Color-coded terminal output:
    • 🟑 Yellow for open ports
    • πŸ”΅ Blue for closed/filtered ports
  • πŸ“… Start and end time displayed and logged
  • πŸ•’ Total scan duration shown in the report
  • πŸ—‚️ Full report saved in scan_report.txt

⚙️ Requirements

  • A Linux/Unix system with bash installed
  • Nmap installed and in your $PATH

πŸ“¦ Services Scanned

The script includes a pre-configured list of commonly scanned services:

Service Port Protocol Nmap Script(s)
telnet23TCPtelnet-ntlm-info
ssh22TCPssh2-enum-algos
msrpc135TCPmsrpc-enum
nbstat137TCPnbstat
ldap389TCPldap-rootdse
http80TCPhttp-headers
smtp25TCPsmtp-open-relay, smtp-strangeport
wsman5985TCPhttp-headers

πŸ› ️ How to Use

1️⃣ Give execute permission and run the script:

chmod +x nmap_service_scanner.sh
./nmap_service_scanner.sh

2️⃣ When prompted, enter a valid IP or CIDR:

Enter an IP address or CIDR range: 192.168.1.0/24

πŸ“„ Output & Report

  • πŸ–₯️ Terminal output is color-coded for quick review
  • πŸ“ All detailed results (including plugin output) are saved to scan_report.txt
  • ⏱️ Includes:
    • Start time
    • End time
    • Total duration in seconds

πŸ“Œ Notes

➡️ UDP scans are slower and depend on the defined services. You can extend or modify the service list directly inside the script.


πŸ§‘‍πŸ’» About

This tool was developed to simplify focused Nmap scanning for sysadmins, security testers, and red teams. Feel free to fork, improve, or suggest enhancements!

πŸ”— GitHub Repository: github.com/ElusiveHacker/Tanker


πŸ“œ License

This project is licensed under the MIT License.