Showing posts with label service version. Show all posts
Showing posts with label service version. Show all posts

14 May 2026

How to get inventory information of all the hosts on a network?

nmap -A -T4 -oN network_scan.txt 192.168.2.0/24

  • -A (Aggressive / Advanced Scan): This is a convenient shortcut that enables four powerful features at once:
    • OS Detection: Attempts to identify the operating system of the target.
    • Version Detection: Probes open ports to determine the exact software and version numbers running on the services.
    • Script Scanning: Runs a default set of Nmap Scripting Engine (NSE) scripts to gather extra information or spot common vulnerabilities.
    • Traceroute: Maps the network path taken from your machine to the target.
  • -T4 (Aggressive Timing): This timing template tells Nmap to run a faster, more aggressive scan. It assumes you are on a reasonably fast and reliable network and makes adjustments (like reducing the wait times between probes and capping timeouts) to speed up execution.
  • -oN (Normal Output): This tells Nmap to save the results to a text file in a human-readable format. You must follow this flag with your desired file name (e.g., -oN scan_results.txt).

  •  

    ================= 

    $ sudo nmap -sV -O -R --dns-servers 192.168.0.1 -T4 -vv -oN network_scan.txt 192.168.0.0/24

    -sV: service version detection 

    -O: OS identification

    -R: Force reverse DNS lookup for all hosts

    --system-dns: Use your system's DNS resolver (often better on home networks)

    -T4: Faster scan timing (good balance between speed and accuracy)

    -v or -vv: Increase verbosity so you see hostnames as they are discovered

    -oN: Then you can open network_scan.txt with any text editor