Live lesson · progress saved to your account

How the Internet Works

From typing a URL to a page loading: the physical path, IP addresses, DNS resolution, HTTP and HTTPS, and the cloud. Ends with a DNS investigation into a fake banking page.

beginner60 minwalkthrough

Anyone can read this lesson. To submit answers and earn XP, create a free account.

TASK 01Mission briefing: the fake bank page

TICKET · KAVERI-SOC-2291 · Priority: High Since Monday, customers of Kaveri Bank (a fictional bank) report that kaveribank.in "sometimes opens a strange login page". It only happens on certain Wi-Fi networks, mostly cafés near the Bengaluru branch. At home, the site looks normal. Three customers have already lost money.

The bank's web team says "our server is fine, nothing has changed". They're probably right. The problem is somewhere between the customer and the server.

To find it, you need to know exactly what should happen when someone types a URL and presses Enter. It's more than you'd think:

What happens after you press Enter Click a bar
https://kaveribank.in
0 mspage ready ≈ 420 ms

DNS. Turn kaveribank.in into an IP address. On a repeat visit the answer is already cached, so this costs 0 ms.

Six stages in under half a second:

  1. DNS: turn the name into an IP address
  2. TCP: open a connection to that IP
  3. TLS: set up encryption and check the server's identity
  4. Request: send GET / and wait
  5. Download: receive the HTML
  6. Render: draw the page (and fetch dozens more files)

Keep this list in mind. By the end of the room you'll know which stage the attacker broke, and how to prove it.

Answer the questions

+10 XP

+10 XP

TASK 02Clients, servers and the path between

The internet is a network of networks. It is physical: cables, routers and buildings full of computers.

  • A client asks for something (your browser, a mobile app).
  • A server answers (a computer in a data centre running the website).
  • In between are routers run by many different organisations.

Watch a request travel, then click each hop to see what it can see:

Where your request physically goes Click a hop
round trip ≈ 18 ms

Your laptop

Wi-Fi router

ISP

Internet exchange

Data centre

Can seeWhich sites you visit (by IP and DNS). Not HTTPS contents.

DoesNAT: swaps your private IP for the home's one public IP.

Run byYou, or whoever runs the Wi-Fi (a café, a hotel)

HopWhat it is
Home / Wi-Fi routerConnects your devices to the internet and shares one public IP between them (NAT)
ISPInternet Service Provider: Jio, Airtel, BSNL. Connects you to the rest of the internet
Internet exchange (IXP)A building where networks swap traffic directly. India's NIXI runs exchanges in many cities
Undersea cablesOver 95% of intercontinental traffic travels as light through fibre on the sea floor. India's main landing stations are in Mumbai and Chennai
Data centreRows of servers with power, cooling and fast connections

Security lesson: every hop is run by someone else. The café Wi-Fi owner, your ISP and anyone tapping a link can see metadata (who talks to whom, when, how much). Whether they can see the contents depends on encryption: that's Task 5.

Answer the questions

+10 XP

+10 XP

+10 XP

TASK 03IP addresses and domain names

Machines find each other by IP address, a number like 203.0.113.10. Humans prefer names like kaveribank.in. DNS (next task) connects the two.

IPv4 and IPv6

  • IPv4: four numbers from 0–255, e.g. 192.168.1.23. About 4.3 billion addresses, which ran out years ago.
  • IPv6: eight groups of hex, e.g. 2001:db8:10::10. Enough addresses for every grain of sand on Earth, many times over.

Public vs private

Most devices don't have their own public address. Your router gives them private addresses that only work inside your network, then translates them to the home's one public address (NAT).

RangeType
10.0.0.0/8Private
172.16.0.0/12 (172.16 to 172.31)Private
192.168.0.0/16Private
127.0.0.0/8Loopback: "this machine"
Everything else (mostly)Public

Try it:

Sort the addresses 0/0 correct
192.168.1.23
8.8.8.8
10.40.2.7
127.0.0.1
172.20.1.4
172.32.0.9
203.0.113.10

Why attackers care: a public IP can be scanned from anywhere on the internet. A private IP can only be reached from inside, which is why attackers work so hard to get one foothold inside a network.

Answer the questions

+10 XP

+10 XP

+10 XP

TASK 04DNS resolution

DNS (Domain Name System) is the internet's phone book. When you type kaveribank.in, your computer needs its IP address before anything else can happen.

Nobody holds the whole phone book. Instead, the answer is found by asking a chain of servers:

Resolving kaveribank.in Step 1/8

Browser

Resolver

Root ( . )

TLD ( .in )

kaveribank.in NS

Browser cache and OS cache miss, so the question goes to the DNS resolver (your ISP's, or one like 1.1.1.1).

Resolver cache

(empty)

  1. Caches first: browser, then OS. If either remembers the answer, done.
  2. Recursive resolver: usually your ISP's, or a public one like 1.1.1.1 or 8.8.8.8. It does the legwork for you.
  3. Root servers (.): know who runs each top-level domain.
  4. TLD servers (.in, .com): know which name servers belong to each domain.
  5. Authoritative name server: owned by the domain. Holds the real answer.

The answer comes with a TTL (time to live) in seconds: how long caches may keep it.

Record types

TypeHoldsExample
AIPv4 addresskaveribank.in → 203.0.113.10
AAAAIPv6 address2001:db8:10::10
CNAMEAlias to another namewww.kaveribank.in → kaveribank.in
MXMail server10 mail.kaveribank.in
TXTText: often email security (SPF, DMARC) or domain verificationv=spf1 … -all
NSThe domain's name serversns1.kaveribank.in

DNS spoofing

Switch the animation to cache poisoning. Classic DNS has no built-in proof that an answer is genuine. If an attacker can get a fake answer accepted, by racing the real one or by controlling the resolver itself (a rogue Wi-Fi router can hand out its own DNS server), every user of that resolver is sent to the wrong IP while the address bar still shows the right name.

Defences: DNSSEC (signed DNS records), encrypted DNS (DoH/DoT) to a trusted resolver, and above all HTTPS certificates, which the attacker can't fake.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 05HTTP and HTTPS

Once the browser has the IP, it talks to the server using HTTP (HyperText Transfer Protocol): plain-text requests and responses. Click through a real login exchange:

A login, as raw HTTP Click any line

Method POST (send data), path /login, protocol version. GET would fetch; PUT/DELETE change or remove things.

200 OK301 Moved permanently302 Found (redirect)401 Not logged in403 Forbidden404 Not found500 Server error

Status codes in one line

2xx it worked · 3xx go elsewhere · 4xx you made a mistake (or aren't allowed) · 5xx the server broke.

What HTTPS adds

HTTPS = HTTP inside TLS (Transport Layer Security). TLS gives you:

  1. Confidentiality: contents are encrypted.
  2. Integrity: nobody can change them in transit without detection.
  3. Authentication: the server proves its identity with a certificate signed by a trusted Certificate Authority (CA).

Watch the same login cross a café Wi-Fi three ways:

The same login, three ways Pick a mode

Riya's laptop

Café Wi-Fi

Internet

kaveribank.in

Eavesdropper

What the eavesdropper captures

POST http://kaveribank.in/login

Host: kaveribank.in

Cookie: session=4f9a…e21

user=riya.k&pass=Riya@1234

Everything is readable: the password, the cookie, the page. Anyone on the same Wi-Fi with Wireshark can take it.

What the padlock really means: "this connection is encrypted, to a server that proved it owns this name". It does not mean the site is honest. A phishing site at kaveri-bank-kyc.in can have a valid padlock too: it really does own that name.

And the rule that matters most for our case: never click "Proceed anyway" on a certificate warning. That warning is the browser telling you someone may be in the middle.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 06The cloud and CDNs

"The cloud" is just someone else's data centre, rented by the hour. Instead of buying servers, companies rent computing from providers like AWS, Microsoft Azure or Google Cloud, many of which have regions in Mumbai and Hyderabad.

ModelYou manageProvider managesExample
IaaSOS, apps, dataHardware, networkA rented virtual machine
PaaSApps, dataOS and belowA managed database
SaaSJust your data and usersEverything elseGmail, Microsoft 365

This split is called the shared responsibility model. Most cloud breaches are customer-side mistakes: a storage bucket left public, a weak admin password.

CDNs

A Content Delivery Network keeps copies of a site at edge servers in many cities, so users are served from nearby:

Why big sites use a CDN Pick a mode

Delhi

Mumbai

Chennai

Origin · USA

~230 ms per requestEvery user, every image, all the way to one server in the USA. Slow, and that one server takes all the load.

CDNs make sites faster, and because they're spread across huge capacity they also absorb DDoS floods before they reach the real (origin) server.

Answer the questions

+10 XP

+10 XP

+10 XP

TASK 07Lab: DNS detective

Time to investigate. This terminal lets you query DNS from two networks:

  • Home broadband: uses the trusted resolver 1.1.1.1
  • FreeCafe_WiFi: the café network near the Bengaluru branch, where customers saw the fake page

Your tasks:

  1. Run nslookup kaveribank.in on home, note the address.
  2. Switch to cafe and run it again. Compare.
  3. Use dig kaveribank.in to see the TTL of each answer.
  4. Check whether the mail (MX) record is also changed.
  5. Run curl -I https://kaveribank.in on both networks and read the certificate issuer.
DNS detective Home broadband
resolver 1.1.1.1

anyONEhack DNS lab · type 'help' to start

Tip: look up kaveribank.in on both networks and compare.

home$

Tip: use the arrow keys to repeat commands, or click the suggestion chips under the terminal.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 08Final mission: close ticket KAVERI-SOC-2291

Write up your findings for the bank's SOC lead. Using what you found in the lab:

  • Where is the attack happening: at the bank's server, at the customer's ISP, or on a specific network?
  • Which stage of the page load from Task 1 did the attacker break?
  • Which DNS record type was spoofed?
  • What warning should have stopped the customers?
  • What one-word protocol extension would let resolvers detect forged DNS answers?

What really happened: an attacker set up a Wi-Fi network named like the café's and ran their own DNS server on it. It answered kaveribank.in with their phishing server and a very long TTL. Customers who clicked through the certificate warning typed their passwords into the fake page.

Recommendations to the bank: enable HSTS preload (so browsers refuse to load the site over a bad connection at all), sign the zone with DNSSEC, and tell customers: a certificate warning on your bank's site means stop.

Complete the mission to earn the Packet Tracer badge and 320 XP.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP