Cyberlium

Privacy › Module 3 › Lesson 4

BeginnerModule 3Lesson 4/5

Lab — Check Your Privacy Score

Run curl and dig checks to see what your connection reveals about you

25 min+18 XP3 quiz
Module progress4 of 5

Opening

Score YOUR path — not the stranger at the next table

This lab is a privacy score for the connection you already use: HTTPS headers from your client, optional public IP of YOUR egress, DNS for a name you already query, and a browser checklist (cookies / tracking protection, padlock on HTTPS). You will write the evidence to $HOME/cyberlium-lab/privacy-score.txt and chmod 600. You will not nmap the café. You will not tcpdump other guests. You will not port-scan the hotel gateway "to see what it exposes." curl -I https://example.com talks to a documentation name from YOUR machine. curl ifconfig.me (optional) asks a service what YOUR public IP is. dig/nslookup of example.com (or another name you already use) is YOUR stub resolver at work. That is the whole scope. If a command fails, write the error — do not widen the target list.

1. What each check actually reveals

curl -I https://example.com: your client opens TCP/443, completes TLS to that name, and prints response headers (HEAD-style). You want: a successful TLS verify, a status (200/301/302/…), and any Strict-Transport-Security. You are not attacking example.com. You are reading the envelope stamp. A certificate error here is a finding about YOUR trust store or middlebox — stop, do not -k to "make the lab pass" on a real site. Public IP echo (ifconfig.me / icanhazip.com / api.ipify.org): the service sees the source address of YOUR TCP connection and prints it back. That is the address the internet sees for you right now — home NAT, café NAT, or VPN server, depending on what is up. It is not someone else's IP. Do not iterate the subnet. Do not mass-query. One GET is enough. dig example.com +short or nslookup example.com: YOUR configured resolver answers with A/AAAA (and maybe CNAME). That tells you which DNS you are actually using — ISP, router, tunnel DNS, or a DoH stub. It does not give you permission to zone-transfer, to brute names, or to query internal hostnames of a company you do not own. Stick to example.com or a name you already type in the browser every day.

The browser half of the score is not a command. Open YOUR browser: is third-party cookie blocking / tracking protection on? Does https://example.com show a padlock (or equivalent) without a warning? Those two questions close the loop with lessons 1–3. A perfect curl and a browser that still allows all cookies is a mid score, not a win. Write both.

2. Wrong vs right: café inventory vs own-path evidence

Worked failure mode — turning a privacy lab into a LAN sweep. Evidence is your headers, your IP, your resolver, your browser.

  • Wrong

    You sit in a coffee shop and nmap the /24, arp-scan, or masscan "to see who leaks." You tcpdump the café adapter. You curl every RFC1918 gateway. You add -k to skip TLS errors. You paste full Set-Cookie headers and VPN passwords into a public gist. You "hack the hotspot" because the score felt too small.

  • Right

    curl -I https://example.com on your VM/WSL/laptop. Optional one-shot public IP of yourself. dig/nslookup of example.com (or a name you already use). Browser: cookies/trackers + padlock. Notes in $HOME/cyberlium-lab/privacy-score.txt, chmod 600, score out of the checklist below. If you are on café Wi-Fi, you are still only talking about YOUR association — never other devices.

3. Hands-on: commands, browser checklist, then a score

Run the block on a machine you administer (Windows: WSL or native curl.exe if present; macOS/Linux: Terminal). Create the lab directory first so the redirect cannot fail halfway. After commands, open the browser you hardened in lesson 1. Visit https://example.com — padlock, no warning. Note tracking protection. Then score. Healthy output is still a lab: write "rungs passed." Do not invent extra targets because everything succeeded.

Command guide

Own connection — curl, optional public IP, dig/nslookup, chmod 600 notes

Command — copy this

mkdir -p "$HOME/cyberlium-lab"

--- A. HTTPS envelope (documentation name; YOUR client) ---

Command — copy this

echo '=== curl -I https://example.com ==='
curl -I --connect-timeout 10 https://example.com

Optional contrast (still example.com, still you). Note Location / HSTS if present.

Command — copy this

echo '=== curl -I http://example.com ==='
curl -I --connect-timeout 10 http://example.com

--- B. Optional: YOUR public IP (one service, one shot) ---

Command — copy this

echo '=== public IP (self) ==='
curl -sS --max-time 10 https://ifconfig.me; echo

fallbacks if the first fails — still YOU, still one line:

Optional command

curl -sS --max-time 10 https://icanhazip.com
curl -sS --max-time 10 https://api.ipify.org; echo

--- C. DNS for a name you already use ---

Command — copy this

echo '=== DNS ==='
dig example.com +short 2>/dev/null || nslookup example.com

Windows PowerShell alternative: Resolve-DnsName example.com | Select-Object -First 8

--- D. Write the scorecard (fill the blanks; do not dump secrets) ---

Command — copy this

{
  echo "date: $(date -Iseconds 2>/dev/null || date)"
  echo "=== curl HTTPS ==="
  echo "tls_ok_no_warning: yes/no"
  echo "http_status:"
  echo "hsts_present: yes/no"
  echo "=== public IP (self, optional) ==="
  echo "public_ip: (or skipped)"
  echo "looks_like: home_nat / cafe_nat / vpn_egress / unknown"
  echo "=== DNS ==="
  echo "resolver_tool: dig / nslookup / Resolve-DnsName"
  echo "name_queried: example.com"
  echo "answers:"
  echo "=== browser checklist ==="
  echo "third_party_cookies_or_tracking_blocked: yes/no"
  echo "https_padlock_on_example: yes/no"
  echo "https_only_mode: yes/no"
  echo "=== score (1 point each, max 6) ==="
  echo "1_https_tls_ok:"
  echo "2_hsts_or_http_redirect_noted:"
  echo "3_public_ip_recorded_or_honestly_skipped:"
  echo "4_dns_answer_recorded:"
  echo "5_browser_tracker_control_on:"
  echo "6_padlock_without_clickthrough:"
  echo "total:"
  echo "one_improvement_next: (DoH / VPN on untrusted Wi-Fi / banking profile / permissions review)"
  echo "ethics: did not scan other devices, did not capture café guests"
} > "$HOME/cyberlium-lab/privacy-score.txt"
chmod 600 "$HOME/cyberlium-lab/privacy-score.txt"

NEVER: nmap/arp-scan/masscan the café, hotel, or school /24 NEVER: tcpdump/wireshark on a shared AP NEVER: curl random RFC1918 hosts "to see banners" NEVER: -k/--insecure to hide a real certificate failure NEVER: paste session cookies, VPN passwords, or other people's IPs into the file

Mission: privacy-score.txt on YOUR connection only

Run curl -I https://example.com (and optional http://example.com for the redirect/HSTS contrast). Optional: one public-IP curl (ifconfig.me or similar) of YOUR egress. dig or nslookup a name you already use (example.com is enough). In the browser, confirm tracker/cookie controls and the HTTPS padlock. Fill $HOME/cyberlium-lab/privacy-score.txt with the six-point score and one improvement; chmod 600. Never scan other devices on café Wi-Fi. Never capture guests. Never hack the hotspot.

Stuck? Ask Cyberlium AI Mentor

If dig is missing or curl fails DNS, ask Cyberlium AI Mentor for a hint — not a scan of the LAN. Try: "Hint only: curl -I https://example.com says Could not resolve host, but ping 1.1.1.1 works — which lab line should I run next (dig/nslookup), and why is nmap of the café still forbidden?"

You measured what YOUR connection reveals: TLS to a name you may query, the public IP the world sees for you (if you chose to look), the resolver answer, and whether the browser still helps trackers. The score is a baseline for the next café, not a trophy for mapping a room. Next — Quiz — Safe Browsing — APPLY browser isolation, VPN honesty, public-Wi-Fi ethics, and this lab's commands, then Module 4 starts with Social Media Privacy.

Knowledge Check

1

APPLY: Your privacy-score.txt will include curl -I https://example.com and optional curl to ifconfig.me. A classmate wants you to nmap the café /24 "so the score has more hosts." What is in scope?

Multiple choice

Knowledge Check

2

APPLY: curl -I https://example.com shows HTTP/2 200 and Strict-Transport-Security. The browser padlock is clean, but third-party cookies are still allowed. Best score reading?

Multiple choice

Knowledge Check

3

APPLY: True or False: chmod 600 on $HOME/cyberlium-lab/privacy-score.txt is appropriate because the file can contain your public IP, resolver hints, and path notes you should not share casually.

True or False

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)