The Absolute Basics: How Computers, Networks, and the Web Work
A plain-English tour of operating systems, files, processes, IP addresses, DNS, ports, HTTP, cookies, logs, and encryption before you open a security tool.
By the end, you’ll be able to…
- Explain the layers of a computer system: hardware, operating system, files, processes, and services.
- Trace a request from a browser through DNS, TCP, HTTP, and TLS to a server response.
- Identify users, permissions, ports, and log fields in a real system.
- Run read-only commands that describe your own machine without changing anything.
01The Machine: Hardware, Operating System, and Files
A computer has four pieces you need to picture: the processor (CPU) does the work, memory (RAM) holds what is currently in use, the disk stores data when the power is off, and the network card moves data between machines. The operating system, such as Windows, Linux, or macOS, is the manager. It decides which program runs, which user can read a file, and which network connection is allowed.
A file is a named container for data. A directory, or folder, groups files. A path describes where a file lives, such as /home/analyst/notes/lab.txt on Linux or C:\Users\Analyst\notes\lab.txt on Windows. The extension, such as .txt or .exe, is a hint about the file type, not proof of what is inside. Attackers frequently rename files to hide their real purpose, which is why security work checks content and behaviour, not just names.
A useful office analogy: the CPU is the worker, RAM is the desk, the disk is the filing cabinet, the operating system is the office manager, and the network card is the mail room. Security problems often come from a mismatch between what the manager intended and what the worker actually did, such as a file that everyone can read or a service that runs as an administrator when it only needs a normal user.
# These commands only read information.whoami # Which user am I?hostname # What is this machine called?pwd # Where am I in the filesystem?ls -la # What is here, including hidden files?uname -a # What operating system and kernel am I running?df -h # How much disk space is available?free -h # How much memory is in use?02Programs, Processes, and Services
A program is a file on disk. A process is a running copy of that program in memory. When you open a browser, the operating system creates one or more processes, gives each a process ID (PID), and schedules CPU time for them. A process can start other processes; the original is the parent and the new one is the child. This family tree matters during incident response because malicious scripts often spawn unexpected children, such as a document reader launching a command shell.
A service, sometimes called a daemon, is a long-running background process that provides a capability: a web server, an SSH server, a database, or a logging agent. Services usually start at boot and listen on a port. A security review asks three questions about every service: Does it need to run? Who can reach it? What user does it run as? A web server that runs as root is a far bigger risk than the same server running as a restricted service account.
On Linux, ps aux lists processes, systemctl status ssh describes a service, and ss -tulpn shows listening ports. On Windows, Task Manager and Get-Service provide similar views. You do not need to memorise every flag. You need to know what question each tool answers and how to verify the answer.
ps aux | head -20 # A snapshot of running processessystemctl status ssh # Is the SSH service active, and as which user?ss -tulpn # Which ports are listening, and on which address?sudo systemctl list-units --type=service --state=runningsshd.service - OpenBSD Secure Shell server
Loaded: loaded
Active: active (running)
...
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=812,fd=3))03The Network: IP Addresses, DNS, and Ports
An IP address is the address of a machine on a network. A private address, such as 192.168.1.20 or 10.10.10.20, is used inside a home, office, or lab. A public address is reachable from the internet. A router moves traffic between networks and often performs NAT, which lets many private devices share one public address. In your lab, the host-only network is a private street that exists only between your virtual machines.
DNS is the phone book of the internet. When you type example.com, your computer asks a resolver for the IP address behind that name. The answer is cached for a period called the TTL. If DNS is poisoned or spoofed, a user can be sent to the wrong server even though the address bar looks correct. That is why DNS logs are valuable evidence during an investigation.
A port is like an apartment number on a building. The IP address identifies the machine; the port identifies the service. Common examples are 22 for SSH, 80 for HTTP, 443 for HTTPS, and 53 for DNS. A client starts a connection from a random high-numbered source port and connects to a well-known destination port. Security work is often about which ports are listening, which should not be, and who can reach them.
ip -brief address # My interfaces and IP addressesip route # Where traffic goes by defaultcat /etc/resolv.conf # Which DNS resolver am I using?nslookup example.com # Ask DNS for an addressss -tulpn # Which services are listening on which ports?04The Web: URLs, HTTP, Cookies, and Sessions
A URL has several parts. In https://shop.example.com:443/account?id=42, https is the scheme, shop.example.com is the host, 443 is the port, /account is the path, and id=42 is the query string. The browser resolves the host with DNS, opens a connection to the port, and sends an HTTP request. The server returns a status code, headers, and a body. Common status codes are 200 for success, 301 for a redirect, 403 for forbidden, 404 for not found, and 500 for a server error.
HTTP is stateless: each request is independent. To remember that you are logged in, the server sets a cookie, a small piece of data that the browser sends back on later requests. A session cookie often contains a random session ID; the server looks up the ID to find your account. If an attacker steals that cookie, they may be able to act as you without knowing your password. That is why cookies are marked HttpOnly, Secure, and SameSite where possible.
HTTPS is HTTP carried inside TLS. TLS encrypts the connection and uses certificates to prove that you are talking to the server that owns the domain. TLS does not make a website trustworthy; it only protects the path and authenticates the endpoint. A phishing site can have a valid certificate. Security decisions still depend on what the site does, what data it asks for, and who operates it.
Browser request GET /account?id=42 HTTP/1.1 Host: shop.example.com Cookie: session=8f2c...Server response HTTP/1.1 200 OK Content-Type: text/html Set-Cookie: session=8f2c...; HttpOnly; Secure; SameSite=Lax Cache-Control: no-storeSecurity questions 1. Was the connection HTTPS and was the certificate valid? 2. Did the server check that session 8f2c belongs to user 42? 3. Was the response marked no-store so a shared browser cannot cache it?05Logs: The Security Camera of a Computer
A log is a record of something that happened. A typical line contains a timestamp, the host or service, the process, a user, a source address, an action, and a result. Logs are not automatically true; clocks drift, applications omit context, and attackers can delete or alter records if they gain enough access. Treat logs as evidence that must be preserved and corroborated, not as a perfect narrative.
Read a log line from left to right and ask: when did it happen, who or what caused it, from where, what did they try, and did it succeed? A failed login is not the same as a successful one. A successful login from a new country at 3 a.m. is a prompt for investigation, not proof of compromise. Context turns a field into a finding.
You will use logs in almost every later module: web server logs for SQL injection, authentication logs for password attacks, cloud audit logs for identity abuse, and endpoint logs for malware triage. Learn the reading habit now, while the examples are small.
2026-11-09T03:14:07Z lab-ubuntu sshd[2211]: Failed password for analyst from 10.10.10.10 port 51422 ssh22026-11-09T03:14:11Z lab-ubuntu sshd[2211]: Accepted password for analyst from 10.10.10.10 port 51426 ssh2Questions to ask Time: 03:14 UTC, outside normal lab hours. Actor: user analyst. Source: 10.10.10.10, the Kali lab host. Action: repeated failures followed by a success. Next check: Was this an authorised test? Which process opened the connection?The ideas worth keeping.
- Hardware, the operating system, files, processes, services, and users form the base of every security decision.
- IP addresses locate machines, DNS maps names to addresses, and ports identify services.
- HTTP is stateless; cookies and sessions create continuity, which makes them valuable to attackers.
- Logs are evidence to correlate, not a perfect story; read timestamps, actors, sources, actions, and results.
Make it yours.
Type and test your code right here in the interactive workspace. Run your solution, check the output, and compare with the worked guide when ready.
Exercise 1: Trace a request through every layer
You type https://shop.example.com/account into a browser. List at least seven stops the request makes from the keyboard to the rendered page. For each stop, name one security control or piece of evidence a defender could collect.
Explore a worked solution
1. Browser parses the URL and checks the scheme. Evidence: browser history and proxy logs. 2. DNS resolver returns the IP. Evidence: DNS logs and resolver cache. 3. The host routes packets to the gateway. Evidence: firewall and router logs. 4. TCP connects to port 443. Evidence: network flow records and packet capture. 5. TLS handshake authenticates the certificate. Evidence: certificate transparency and TLS logs. 6. HTTP request includes cookies and headers. Evidence: web server access logs and proxy logs. 7. Server checks the session and authorisation. Evidence: application logs and database audit records. 8. Response returns HTML, CSS, and JavaScript. Evidence: content security policy reports and browser console. Controls include DNS filtering, segmentation, TLS inspection where lawful, WAF rules, secure cookie flags, server-side authorisation, and logging.Tracing the path shows where different controls live. It also shows why one log source is rarely enough to prove what happened.
Exercise 2: Read a suspicious log line
Given this line, identify the timestamp, user, source, action, result, and two follow-up checks: '2026-11-09T02:41:19Z web-01 nginx: 10.10.10.10 - - [09/Nov/2026:02:41:19 +0000] "GET /admin HTTP/1.1" 403 512 "-" "sqlmap/1.7"'. Is it proof of a successful attack? Explain.
Explore a worked solution
Timestamp: 2026-11-09 02:41:19 UTC. User: anonymous, because the request has no authenticated user field. Source: 10.10.10.10. Action: GET /admin. Result: 403 Forbidden, with a 512-byte response. Follow-up checks: (1) search the same source and user agent across the full log for other paths and status codes; (2) check whether the application logged an authentication attempt, a WAF alert, or a later successful request from the same source. It is not proof of a successful attack: a 403 means the request was denied. It is evidence of probing and should be correlated with other sources.A single log line describes one event. Severity comes from context: the tool, the target, the response, repetition, and what happened next.
What stayed with you?
Check the ideas while they’re fresh. Your answers stay in this page and feedback appears as you go.
Keep exploring.
The official references behind this lesson, when you want a second angle or the full details.
One lesson closer.
Reading is a start. Trying it yourself makes the connection.