0Pricing
Ethical Hacking Academy · Lesson

Host Discovery

Find live hosts.

Host Discovery is a free Ethical Hacking Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is Host Discovery?

Before scanning ports, you need to know which hosts are alive. Host discovery (also called ping scanning) identifies responsive systems on a network so you do not waste time scanning dead addresses.

Nmap is the industry-standard tool for this and for nearly all network scanning tasks.

The Ping Sweep

The -sn flag performs a ping sweep: it checks which hosts respond without scanning any ports. It is fast and ideal for mapping a subnet first.

nmap -sn 192.168.1.0/24
# Lists which hosts in the /24 are up

How Nmap Decides a Host Is Up

By default (with privileges) Nmap sends a mix of probes to local and remote hosts:

  • ICMP echo request (a classic ping).
  • TCP SYN to port 443.
  • TCP ACK to port 80.
  • ICMP timestamp request.

If any probe gets a response, the host is marked up. Using several probe types defeats many filters.

Specifying Targets

Nmap accepts flexible target syntax: single IPs, CIDR ranges, hyphenated ranges, hostnames, or a file list.

nmap -sn 10.0.0.1
nmap -sn 10.0.0.1-50
nmap -sn -iL targets.txt

Custom Discovery Probes

You can choose specific probe types when defaults are filtered:

  • -PS TCP SYN to listed ports.
  • -PA TCP ACK to listed ports.
  • -PU UDP probe.
  • -PE ICMP echo.

Tuning probes helps when firewalls block the defaults.

nmap -sn -PS22,80,443 192.168.1.0/24

When ICMP Is Blocked

Many firewalls drop ICMP, making hosts look down. The -Pn flag tells Nmap to skip discovery and treat every target as up, scanning ports directly.

This is essential against hardened networks, though it is slower because Nmap scans hosts that may truly be offline.

nmap -Pn 192.168.1.10
# Assume host is up, go straight to port scan

ARP Discovery on Local Networks

On a local Ethernet segment, Nmap uses ARP requests for discovery, which is faster and more reliable than ICMP because hosts cannot easily ignore ARP.

Nmap does this automatically for local targets when run with privileges. The -PR flag forces ARP discovery explicitly.

List Scan

The list scan -sL does no probing at all. It simply lists the targets Nmap would scan and performs reverse-DNS lookups.

It is the stealthiest option and a great way to sanity-check your target range and discover hostnames before sending any packets.

nmap -sL 192.168.1.0/24

Reading Discovery Output

Discovery output reports each host as up or omits hosts that are down. With ARP or DNS, you may also see MAC addresses (and vendor) and hostnames.

This list becomes the input for the next phase: detailed port scanning of only the hosts that are actually alive.

Discovery and Stealth

Discovery generates traffic that monitoring tools can notice. To stay quieter you can:

  • Use -sL for zero probes.
  • Slow timing with -T1 or -T2.
  • Limit probe types to what you need.

Always scan only systems you are authorized to test.

DNS During Discovery

Nmap can resolve hostnames during discovery, which adds context but also generates DNS queries that may be logged.

  • -n disables all DNS resolution (faster, quieter).
  • -R forces resolution even for hosts marked down.
  • --dns-servers specifies which resolver to use.

Disabling DNS with -n speeds up large sweeps significantly.

nmap -sn -n 192.168.1.0/24

Quick Check

Choose the right flag for a firewalled target.

Recap

You learned host discovery with Nmap:

  • -sn runs a ping sweep with no port scan.
  • Nmap mixes ICMP, TCP SYN/ACK, and timestamp probes by default; ARP on local segments.
  • Custom probes: -PS/-PA/-PU/-PE.
  • -Pn skips discovery when ICMP is blocked; -sL lists targets with zero probes.
  • Tune timing and probes for stealth, and only scan authorized systems.

Next: port scanning techniques.

Frequently asked questions

Is the “Host Discovery” lesson free?

Yes — the full text of “Host Discovery” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.

What will I learn in “Host Discovery”?

Find live hosts. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Ethical Hacking Academy?

No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Host Discovery” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Ethical Hacking Academy lesson?

Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Host Discovery
  2. Port Scanning Techniques
  3. Service and OS Detection
  4. The Nmap Scripting Engine
← Back to Ethical Hacking Academy