Lesson 02 of 16 · Why and what
The vocabulary of security
The words used in every security conversation and how they differ: asset, threat, vulnerability, risk and exploit; CVE and CVSS scores; authentication versus authorisation; and the three things people mix up most often: encoding, encryption and hashing.
Threat, vulnerability, risk
These words are often used as if they mean the same thing. They do not:
THREAT uses a VULNERABILITY against an ASSET
(burglar) ───────────────────► (unlocked window) ───────────► (your laptop)
│
EXPLOIT = the way it's done (climb in through the window)
RISK = how likely × how bad ("likely, and expensive")
| Word | Server example |
|---|---|
| Asset | Customer database |
| Threat | Automated bots looking for open databases |
| Vulnerability | Database port 5432 open to the internet with a weak password |
| Exploit | Script that tries common passwords, then dumps tables |
| Risk | High likelihood × severe impact = fix today |
You reduce risk by removing the vulnerability (close the port), reducing impact (encrypt the data, keep backups) or making the attack harder (strong authentication, monitoring).
Your bike is the asset. A thief is the threat. Leaving it unlocked is the vulnerability. Riding off with it is the exploit. Risk is how likely it gets stolen and how upset you'll be. A lock lowers the risk; a cheap old bike lowers the impact.
CVE, CVSS and zero-days
- A CVE (Common Vulnerabilities and Exposures) is a public ID for a known vulnerability, such as CVE-2024-6387 ("regreSSHion", a remote code execution bug in OpenSSH's server).
- CVSS scores severity from 0 to 10 (9.0+ critical). It is a starting point; your risk also depends on whether the vulnerable part is exposed.
- A zero-day is a vulnerability being used before a fix exists. Most real attacks use old, already-fixed vulnerabilities on unpatched systems, which is why patching matters so much (lesson 15).
Authentication, authorisation, accounting
"Who are you?" → AUTHENTICATION password, SSH key, certificate, MFA
"What may you do?" → AUTHORISATION file permissions, sudo rules, roles
"What did you do?" → ACCOUNTING logs, audit trail
People shorten them to authN and authZ. Mixing them up leads to real bugs: a system that checks who you are but forgets to check whether you may see a particular record lets any logged-in user read everyone's data.
Encoding, encryption, hashing
The most common confusion in security:
| Reversible? | Needs a secret? | Purpose | Example | |
|---|---|---|---|---|
| Encoding | Yes, by anyone | No | Change format so data can be transported | base64, URL encoding |
| Encryption | Yes, with the key | Yes | Keep data secret | AES, TLS |
| Hashing | No | No (but see salt) | Fingerprint; check integrity; store passwords | SHA-256, bcrypt |
$ echo -n 'hello' | base64
aGVsbG8=
$ echo 'aGVsbG8=' | base64 -d
hello
$ echo -n 'hello' | sha256sum
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 -
Base64 is not protection: anyone can decode it. A hash cannot be turned back into "hello", but anyone can hash "hello" and compare, which is why passwords need special slow hashes (lesson 14).
Recap
- Threat uses a vulnerability against an asset; the method is the exploit; risk = likelihood × impact.
- CVE = ID of a known bug, CVSS = its severity; most attacks use old, unpatched bugs.
- Authentication = who you are; authorisation = what you may do; accounting = the record.
- Encoding is not security; encryption is reversible with a key; hashing is one-way.
This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.