Module 3 ยท Lesson 1 ยท 30 minutes

๐Ÿ“ก Internet in Simple Terms: IP, Port, TCP/UDP

No jargon. Analogies from life. After this lesson, you'll understand how one computer "calls" another over the internet โ€” and where a hacker can "eavesdrop".

๐Ÿ“– Why You Need to Know This

Imagine a hacker is like a burglar. Before breaking in, they look for:

  • Where the house is located (IP address)
  • What doors and windows are available (ports)
  • Which ones are open (port scanning โ€” Module 4)

This lesson is about "house, doors, windows". If you don't understand โ€” the next modules will be like Chinese. If you get it โ€” you'll have a mental picture to build on.

No commands. Just pictures and analogies.

๐Ÿ  What is an IP Address

๐ŸŽฏ In Simple Terms for 30 Seconds

IP address = computer's home address on the internet.

Want to send a message to your grandma? You need to know her address (street, house). Without an address, the mailman won't arrive.

Want to open Google? Your computer needs to know Google's IP address. Without it, the browser won't arrive.

An IP address looks like four numbers separated by dots:

192.168.1.5
74.6.143.26
8.8.8.8

Each number is between 0 and 255. That's it. This is the "address".

๐Ÿ˜ How Postal Address vs "In the Yard" Works

You have two addresses at home:

๐Ÿ“ฎ Postal Address (Public)

"Moscow, Pushkin Street, house 5" โ€” this address is known to the whole world. The mailman, friends, tax office. Anyone can write to you using this address.

On the internet, this is a public IP โ€” provided by your internet service provider (Bilain, MTS). All websites you visit can see it.

๐Ÿšช "In the Yard, to the Left" (Local)

Inside your building, you don't have a street โ€” you have "apartment 22 on the 5th floor". This address is known only to your neighbors.

On the internet, this is a local IP โ€” your address within your home Wi-Fi. Usually starts with 192.168. or 10.. Websites on the internet can't see it.

Your neighbor on a different street also has apartment 22 โ€” nobody gets confused. Similarly: you have 192.168.1.5 at home, and your neighbor might also have 192.168.1.5. They are in different networks and don't intersect.

๐Ÿค” Why a Hacker Needs to Know the Victim's IP

Without an IP, a hacker simply doesn't know where to knock. It's like trying to rob an apartment without knowing the building's address.

Getting a company's IP is easy: you google their domain, and DNS (which we'll cover later) converts "company.com" to an IP. Then the hacker works with the specific IP.

๐Ÿšช What is a Port

๐ŸŽฏ In Simple Terms for 30 Seconds

Port = window or door at your "house" (IP).

In a real apartment, there's one front door and some windows. In a computer, on one IP, there are 65,535 "windows". Each one runs its own program.

Analogy:

When your browser opens Google over https โ€” it knocks on 74.6.143.26 at window 443. Only on this window. Other windows are closed or not responding.

๐Ÿ˜ Standard "Windows" โ€” Learn the Top 5

No need to memorize all 65,535 numbers. The main ones:

Window NumberWhat Lives ThereHow to Explain to Mom
22SSH (remote management)Admin door, through which they enter the server
80HTTP (regular website)Store window without a lock
443HTTPS (secure website)Window with bulletproof glass
3306MySQL (database)Door to the warehouse with goods
3389RDP (remote Windows desktop)"Mirror" of someone else's screen

๐Ÿšจ Main Rule for a Hacker

๐Ÿ’ก What to Look For

If a website has an open window 3306 (database) โ€” this is a huge mistake by the owner. The database shouldn't be exposed. Often, there's no password either.

One of the largest classes of attacks in 2024 โ€” finding open databases on the internet. Shodan.io (a search engine for "windows on the internet") shows millions of such mistakes.

๐Ÿ“ฌ TCP vs UDP โ€” Two Delivery Methods

You've decided where to knock (IP + port). Now you need to decide how to send the data.

On the internet, there are two methods. In simple terms:

๐Ÿ“ฌ TCP = Registered Mail with Notification

You send it, the mailman checks that the recipient actually received it. If not โ€” sends it again. Nothing gets lost.

When to use: when it's crucial not to lose data.

  • Opening a website (it's essential to receive the entire page without gaps)
  • Downloading a file (if one piece is missing, the file is broken)
  • Logging in to a bank

Downside: slightly slower. Each confirmation is an extra exchange.

๐Ÿ“ข UDP = Postcard

You throw it in the mailbox and forget. If it arrives โ€” great. If not โ€” the next one will. No confirmations.

When to use: when speed is crucial, and losing 1-2 packets isn't critical.

  • Online video games (DOTA, CS) โ€” if a packet with enemy movement is lost, it's not a big deal, a new one will arrive in a second
  • Video calls (Skype, Zoom) โ€” better to skip a frame than "lag" for 3 seconds
  • YouTube live, Twitch โ€” same thing

Downside: can lose packets.

๐Ÿค” Simple Test to Check Understanding

What delivery method do the following use:

๐ŸŽฃ Hackers Use the Difference

๐Ÿ’ก Why a Hacker Needs This Difference

When a hacker scans a server (Module 4) โ€” they can check TCP windows or UDP windows. TCP is fast: it's clear if it's open or closed. UDP is slow: the packet is sent, no response... is it closed or just not responding?

Many hackers forget to check UDP. But there are often interesting services (DNS, SNMP, NTP) running there. This can be useful โ€” looking for what others have missed.

๐Ÿง  Picture to Remember

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  INTERNET                                        โ”‚
โ”‚                                                  โ”‚
โ”‚  Google's house (IP: 74.6.143.26)                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”‚
โ”‚  โ”‚  Window 80   - HTTP                  โ”‚         โ”‚
โ”‚  โ”‚  Window 443  - HTTPS                 โ”‚ โ† your browser knocks here โ”‚
โ”‚  โ”‚  Window 53   - DNS                   โ”‚         โ”‚
โ”‚  โ”‚  Window 22   - SSH (closed from outside)   โ”‚         โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚
โ”‚                                                  โ”‚
โ”‚  Your house (IP: 95.181.4.12)                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”‚
โ”‚  โ”‚  All windows usually closed           โ”‚         โ”‚
โ”‚  โ”‚  Browser opens temporary windows    โ”‚         โ”‚
โ”‚  โ”‚  to receive responses               โ”‚         โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚
โ”‚                                                  โ”‚
โ”‚  Between them, packets fly:                       โ”‚
โ”‚    ๐Ÿ“ฌ TCP โ€” registered (important)                   โ”‚
โ”‚    ๐Ÿ“ข UDP โ€” postcards (fast)                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ›  Optional but Interesting

If you want to try it hands-on โ€” open a Kali terminal and try:

# Find your local IP
hostname -I

# Find your public IP (the one the internet sees)
curl ifconfig.me

# What windows are open on google.com?
# (full scanning will be in Module 4)
nc -zv google.com 80
nc -zv google.com 443
nc -zv google.com 22

Don't panic if something doesn't work. This is a bonus. The main thing is to have a mental picture of "house โ†’ windows โ†’ delivery method".

๐Ÿค– Vibe-task: Ask Claude

Open Claude (claude.ai) and ask:

Explain in simple terms, as if I'm a 10-year-old:

1. What is an IP address โ€” using a postal address example
2. What is a port โ€” using a house with windows example
3. How does TCP differ from UDP โ€” using a food delivery example

Each explanation โ€” 2-3 sentences max.
No jargon. No abbreviations like "TCP/IP".

If Claude explains it clearly โ€” great, you can explain these concepts to a friend. If it's confusing โ€” ask Claude to rephrase it even simpler.

๐Ÿ’ก Main Takeaways from the Lesson

๐ŸŽ“ What to Take Away
  1. IP โ€” this is the computer's address. Without an IP, nobody can "call" each other on the internet.
  2. Port โ€” this is a window at the computer. On one IP, there are 65,535 "windows". Each one runs its own program.
  3. TCP โ€” for important things (websites, files, passwords). Doesn't lose data.
  4. UDP โ€” for fast things (video, games). Can lose packets, but is faster.
  5. A hacker always starts by figuring out "what windows are open on my target". This will be covered in Module 4.

๐ŸŽฌ What's Next

Lesson 3.2 โ€” HTTP, HTTPS, DNS. What happens in 200 milliseconds between pressing "Enter" and the page opening. Where a hacker can intervene. Without jargon, with pictures.

โ† Back to Module Lesson 3.2: HTTP, HTTPS, DNS โ†’