Ethical › Module 2 › Lesson 2
Active Recon: Touching a Target You Own
When a packet leaves your machine, you need written permission.
Visual · active_recon_permission
Active recon is a packet you sent on purpose. Written permission — ownership or RoE — decides whether that packet is a lab or a problem.
Opening
The quiet map ends when your packet leaves. After that, you need writing that says you may send it.
Lesson 1 treated footprints as published facts: a homepage, a job ad on a company you run, DNS that already exists. You could sit still and still learn. Active reconnaissance is the opposite motion: you send something — a ping, an extra HTTP request you crafted as a probe, a TCP connect, a DNS query you treat as a test of THEIR name server rather than a normal lookup — and a log on the other side can record that you did. In many places, unauthorized probing is illegal. In every place, it is rude and it burns trust. Cyberlium’s rule is simple enough to tattoo on a scope card: when a packet leaves your machine as a test, you need written permission. Written permission, for this course, means you own the destination (your domain, your VM, 127.0.0.1) or you have Rules of Engagement that name the host, the hours, and the techniques. “I am studying CEH” is not writing. This path is original Cyberlium teaching of the same domain, not official EC-Council training and not an exam dump. You will not ping the café gateway to see if it is up. You will not traceroute a school. You will not “just send one SYN” at a stranger. Next lesson uses nslookup and whois on example.com — public records, still not a zone-transfer attack. This lesson is the permission switch between reading and touching.
1. Active means you initiated contact — logs can name you
A normal browser visit to a public homepage is often treated as ordinary use of a public service. A burst of pings, a port probe, a scripted crawl, a custom User-Agent that says SCANNER, or a connect_ex loop is not ordinary use. Defenders call those things reconnaissance or scanning because they look like the opening of an attack even when you meant homework. The other host does not owe you the benefit of the doubt. Your ISP and the café operator do not owe it either. Active recon is defined by your intent to test plus traffic you caused, not by whether you used nmap. Python ping-equivalents, curl in a loop, and “I only used ping” are still active.
Topic 7 already made this concrete: connect_ex to 127.0.0.1 is a lab; the same call to a café IP is unauthorized scanning. Module 2 sits one step earlier. Even before a port loop, a single ICMP echo to a host you do not own is a packet you chose to send. DNS lookups of example.com are the public-record exception Lesson 3 will use — they are how the internet is supposed to work, aimed at a designated example name. ICMP to a neighbor, TCP to a school jumphost, and HTTP flooding a shop “to see headers” are not that exception. If you are unsure, do not send it. Ask Cyberlium AI Mentor for a hint about scope, not for a target list.
Command guide
Active means you initiated — WHAT/WHY (logs can name you)
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install curl sudo apt install python3
macOS:
Command — copy this
brew install python3
Windows: Built-in (PowerShell: Invoke-WebRequest) Download https://python.org/downloads/
═══ COMMANDS ═══
Command — copy this
curl -sS -m 2 -D - "http://127.0.0.1:8000/" | head -n 12
2. Permission is a document, not a feeling: ownership or RoE
Module 1 asked you to write a personal RoE for YOUR lab. Pull that file. Active recon against 127.0.0.1 is covered because you own the machine. Active recon against a domain you registered is covered if your own RoE says so — still not against their CDN’s other customers. Active recon against a client network requires a contract: names, IP ranges, excluded hosts, allowed ports, hours, emergency contact. You do not have that contract for the campus, the hotel Wi-Fi, or the ISP. Do not invent one. Do not screenshot a Terms of Service and call it RoE; ToS is not a pentest authorization letter.
What “written” looks like in this course: a text file you dated, that lists allowed targets (example.com for public DNS/WHOIS only; YOUR domain; 127.0.0.1 for later scans), and that lists forbidden targets (café, ISP, school, random internet, neighbor). chmod 600. If a future job gives you a real RoE PDF, you will recognize the shape. Until then, your personal RoE is the only writing that matters, and it does not authorize strangers.
Command guide
Permission document — WHAT/WHY (ownership or RoE)
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install dnsutils
macOS: Built-in
Windows: Use nslookup (built-in)
═══ COMMANDS ═══
Command — copy this
cat >> "$NOTES" << 'EOF' active_means: I initiated contact; logs can name me permission_document: I own this PC / VM OR signed RoE names the host not_permission: it answered ping; it is on my Wi-Fi; I am learning CEH EOF
3. What this lesson will not teach you to send
This lesson will not give you a ping sweep of a /24. It will not give you traceroute to a news site as “practice.” It will not give you a list of nmap timing templates. It will not tell you to knock on every host that answered ARP on café Wi-Fi. Those are how unauthorized scans start. The positive list is short: you may ping a host you own (your VM, your router if you administer it at home — not the café AP). You may send one GET to example.com or YOUR site (Lesson 1). You may query public DNS/WHOIS for example.com (Lesson 3). You may later TCP-connect 127.0.0.1 (Module 3). Everything else waits for a contract you do not have yet.
Home-lab note: pinging 127.0.0.1 proves ICMP locally and teaches nothing about the internet, which is fine. Pinging your own public IP from the same machine can hit carrier-grade NAT and confuse you; it still is not a reason to ping a neighbor to “compare.” If you share a house network, other people’s devices are still not yours. Get explicit consent, in writing, or stay on loopback and names you registered.
Command guide
What you will not send — WHAT/WHY (refusal list)
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install nmap
macOS:
Command — copy this
brew install nmap
Windows:
Command — copy this
choco install nmap # or download https://nmap.org/download.html
═══ COMMANDS ═══
Command — copy this
cat >> "$NOTES" << 'EOF' will_not_send: port-sweeps of 192.168.0.0/24, hydra, nmap -sS, directory brute on strangers will_send: GET/HEAD to 127.0.0.1 or DEMO only after identify proved MY app EOF
4. A scope card you can read before every command
Print three lines before any active tool: TARGET, WHY_ALLOWED, PACKET_TYPE. TARGET must be example.com (public records only), a domain you own, 127.0.0.1, or a VM IP you typed because you own the hypervisor. WHY_ALLOWED must be “I own it” or “RoE dated YYYY-MM-DD.” PACKET_TYPE must be the actual thing (ICMP, TCP connect, one HTTP GET) — not “recon” as a fog word. If any line is blank, do not send. If TARGET is a café gateway, stop. This card is the whole skill. Tools change; the card does not.
Logs work both ways. Your notes should record what you sent, to whom, and the permission line, so you can prove the lab stayed in scope. Their logs may still show your IP. That is why permission exists — so a defender who sees you can call the person who authorized you instead of calling abuse. Without writing, you are just a source address.
5. Wrong vs right: probing the café vs a scope card on a name you own
Worked failure — same ping binary, opposite legal story. Right never treats “the packet is small” as authorization.
Wrong
Ping the café gateway, traceroute the school, or send a one-off SYN to a random IP “because active recon is the module.” Call ping harmless. Skip RoE. Scan a /24 you walked onto. Store other people’s IPs in a trophy file. This is original Cyberlium teaching, not a CEH dump, and it will not bless that traffic.
Right
Fill a scope card: TARGET you own (or example.com for public DNS/WHOIS next), WHY_ALLOWED in writing, PACKET_TYPE named. Ping only a host you administer. Keep café / ISP / school off the card. Lock notes in $HOME/cyberlium-lab chmod 600. Next: nslookup and whois of example.com as public records — still not AXFR against strangers.
6. Hands-on: write the scope card; optional ping of a host YOU own
Create or update $HOME/cyberlium-lab/active-recon-scope.txt. The Python below only pings 127.0.0.1 — loopback ICMP — so you can see an active packet that cannot leave the machine. If ping is blocked on your OS, write “ICMP not available; card still filled” and stop. Do not switch the host to the café to get a prettier RTT. chmod 600.
Command guide
active_recon_scope.sh — written permission card; ping 127.0.0.1 only
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install whois sudo apt install python3
macOS:
Command — copy this
brew install whois brew install python3
Windows: Use https://lookup.icann.org or install via WSL Download https://python.org/downloads/
═══ COMMANDS ═══
Command — copy this
cd "$HOME/cyberlium-lab"
Command — copy this
cat > active_recon_loopback_ping.py << 'PY'
import platform
import subprocess
HOST = "127.0.0.1"
if HOST != "127.0.0.1":
raise SystemExit("refusing non-loopback — this is not a cafe/ISP/school probe")
count_flag = "-n" if platform.system().lower().startswith("win") else "-c"
cmd = ["ping", count_flag, "1", HOST]
print("scope_target:", HOST)
print("why_allowed: I own this machine (loopback)")
print("packet_type: ICMP echo (one packet)")
print("command:", " ".join(cmd))
try:
completed = subprocess.run(cmd, capture_output=True, text=True, timeout=8)
print("exit:", completed.returncode)
print((completed.stdout or completed.stderr or "")[:500])
except Exception as e:
print("ping_unavailable:", e)
print("still valid: fill the scope card; do not retarget a cafe")
print("ethics: no cafe, no ISP, no school, no random hosts")
PYCommand — copy this
python3 active_recon_loopback_ping.py || python active_recon_loopback_ping.py
Command — copy this
{Mission: active-recon-scope.txt in cyberlium-lab (mode 600)
1) Write TARGET / WHY_ALLOWED / PACKET_TYPE in your own words. State that when a packet leaves as a test, you need written permission (ownership or RoE). 2) Optional: one ping to 127.0.0.1 only. If ICMP is blocked, still fill the card. chmod 600 under $HOME/cyberlium-lab. 3) Forbidden line: café, ISP, school, neighbor, random internet. Do not retarget to get a prettier RTT.
Stuck? Ask Cyberlium AI Mentor
If “ping is harmless so I can aim it anywhere” still feels true, ask for a hint — not a sweep. Try: "Hint only: why is ICMP to 127.0.0.1 a valid active-recon demo, why café/ISP/school pings need writing I do not have, and what three lines belong on a scope card?" You still fill the notes. No /24. No traceroute of strangers.
You now treat active recon as traffic you caused, logged on both sides, legal only with ownership or RoE. Loopback ping is the safe demo. Café, ISP, and school stay off the card. This is original Cyberlium material, not official CEH training. Next — Public Records: DNS, WHOIS, and Your Domain — you will read nslookup and whois for example.com (or a domain you control). Those queries are public records, not zone-transfer attacks on random names.
Knowledge Check
APPLY: A classmate says ping the café gateway because “ICMP is not hacking.” What is active recon here, and what do you do?
Multiple choice
Knowledge Check
APPLY: True or False: Studying this path is the same as official CEH authorization, so traceroute to a school is covered homework.
True or False
Knowledge Check
APPLY: Which three lines belong on the scope card before any active command?
Multiple choice
Knowledge Check
APPLY: curl of http://192.168.0.1/ shows a home router login (TP-Link / Netgear / Huawei / "Router Admin"). Is that DEMO in scope as a hacking target?
Multiple choice