To improve an organisation’s security posture by identifying open service ports, enumerating service identities, and identifying the operating systems of systems in different network environments.
- Kali Linux installed and updated.
- A target system/network to scan.
- Administrative permissions (if needed) for specific networks.
- Tools installed on Kali Linux:
Nmap(Network Mapper)Netcat(for manual port enumeration)Nikto(optional, for web server analysis)
- Documentation software for reporting findings (e.g., LibreOffice, Markdown editor).
-
Network Environment Preparation:
- Set up three network zones to mimic real-world environments:
- Border Firewall: The external perimeter of the organization's network.
- Guest Network: A network for unauthenticated or limited access users.
- Client Network: Internal network for authenticated users and servers.
- Set up three network zones to mimic real-world environments:
-
Ensure Target Systems Are Running:
- Set up virtual machines or devices with known services (e.g., Apache, MySQL, SSH) to emulate realistic environments for scanning.
-
Lab Rules:
- Avoid intrusive scans on unauthorized systems.
- Inform team members and follow your organization's security policies.
-
Objective:
- Identify open service ports exposed to the internet.
-
Commands:
-
Use
Nmapfor port scanning.nmap -sS -p- -Pn <target IP>
-sS: TCP SYN scan for stealth.-p-: Scan all 65,535 ports.-Pn: Disable ping check (useful if ICMP is blocked).
-
If you suspect service banners are hidden, use a service version scan:
nmap -sV <target IP>
-sV: Detect service versions.
-
Check for operating system information:
nmap -O <target IP>
-O: Enable OS detection.
-
-
Analysis:
- Document all open ports and their associated services.
- Identify if any exposed services are unnecessary or misconfigured.
-
Actions:
- Share findings with the firewall administrator to close unnecessary ports.
-
Objective:
- Determine if unauthorized devices on the guest network expose services or sensitive information.
-
Commands:
-
Scan the subnet used by guest devices:
nmap -sn <subnet>
-sn: Host discovery only.
-
For active hosts, perform a port scan:
nmap -sS -p 1-1000 <active host IP>
- Scan the first 1,000 commonly used ports.
-
Check for additional details, such as scripts for vulnerability detection:
nmap --script vuln <active host IP>
--script vuln: Use vulnerability scripts.
-
-
Analysis:
- Review open ports and services for security implications.
- Identify devices that might be inadvertently sharing resources (e.g., printers, file shares).
-
Actions:
- Coordinate with IT to isolate or secure devices exposing services unnecessarily.
-
Objective:
- Perform a deep analysis of internal servers for open ports and exposed services.
-
Commands:
-
Conduct a detailed scan of server IP:
nmap -A -p- <server IP>
-A: Aggressive mode (OS detection + service version + traceroute).
-
Check for web server vulnerabilities (if applicable):
nikto -h <server IP>
- Use
Niktoto identify misconfigurations or outdated software on web servers.
- Use
-
For a more manual approach, connect to specific ports:
nc <server IP> <port>
Netcatcan verify service banners.
-
-
Analysis:
- Document high-risk services such as databases or remote management interfaces (e.g., RDP, SSH).
- Highlight services running with outdated or vulnerable versions.
-
Actions:
- Collaborate with the server administrator to patch vulnerabilities or limit access.
-
Documentation:
- Create a comprehensive report detailing:
- Network zone scanned.
- List of open ports and services identified.
- Risk assessment for each open service.
- Recommendations to reduce the attack surface.
- Create a comprehensive report detailing:
-
Sample Table:
Network Zone IP Address Open Ports Services Risk Level Recommendation Border Firewall 203.0.113.1 22, 80 SSH, HTTP High Close SSH on public IP. Guest Network 192.168.1.100 445 SMB Medium Disable SMB sharing. Client Network 10.0.0.200 3306 MySQL High Restrict access to MySQL. -
Recommendations:
- Close unnecessary ports.
- Update outdated software versions.
- Implement firewall rules for internal and external network traffic.
This lab demonstrates how to identify open ports and evaluate their risks.
If you find these projects helpful or inspiring, please consider supporting my work! Your contributions will help me dedicate more time to creating educational content and building more projects to share with the community.
-
Sponsor me on GitHub
Visit my GitHub Sponsors page to make a one-time or recurring donation. Every bit of support makes a big difference! -
Buy Me a Coffee
Fuel my coding sessions by buying me a coffee. ☕ Your support keeps the inspiration flowing! -
Spread the Word
-
Contribute
- Open an issue or submit a pull request to improve the projects.
- Suggest ideas for future projects or enhancements.
Your support means the world to me. Together, we can inspire more learners to dive into the exciting world of cybersecurity.