Network Mapping and Security Auditing Tool

Overview

Nmap (Network Mapper) is an essential open-source tool for network analysis and security auditing. It's primarily used for discovering hosts and services on networks, conducting security audits, and network inventory.

Key Components

1. Host Discovery

  • Used to identify active systems on a network.

  • Utilizes ICMP echo requests, ARP and other protocols.

  • Results should always be stored for documentation.

2. Port Scanning

Six possible port states:

  • open : Connection established.

  • closed : Port responds with RST flag.

  • filtered : No response/blocked by firewall.

  • unfiltered : Accessible but state unclear.

  • open|filtered : No response received.

  • closed|filtered : Unclear if closed or filtered.

3. Service Enumeration

  • Identifies applications and versions running on pots.

  • Essential for vulnerability assessment.

  • Can use banner grabbing for additional information.

4. NSE (Nmap Scripting Engine)

Categories include:

  • auth : Authentication testing.

  • brute : Credential brute forcing.

  • vuln : Vulnerability detection.

  • discovery : Service evaluation.

  • safe : Non-intrusive scripts.

5. Performance Optimization

  • Various timing templates (-T0 to -T5).

  • Packet rate control.

  • Parallelism options.

  • Timeout settings.

6. Firewall/IDS Evasion

  • Packet fragmentation.

  • Decoy scanning.

  • TCP ACK scanning.

  • Various stealth techniques.

Essential Command Reference

Basic Scanning

Host Discovery

Port Scanning

Service and Version Detection

Output Options

NSE Scripts

Performance and Timing

Firewall/IDS Evasion

Advanced Usage

Best Practices

  1. Start with host discovery in large networks.

  2. Use appropriate timing for the environment.

  3. Save scan results for documentation.

  4. Verify findings manually when possible.

  5. Consider network load and target stability.

  6. Use steatlh options when necessary.

  7. Combine different scan types for comprehensive results.