What forensics is
Digital forensics is working out what happened on a system, in a way others can check and trust. A few ideas sit at its core:
- Timeline: put events in order. Most investigations are a story told in timestamps: when the machine started, who logged in, which files changed, which alerts fired.
- Order of volatility: collect the most fragile evidence first. RAM disappears at power-off (Computing Basics), network connections change every second, and files on disk last longest. Pulling the plug too early can destroy the best evidence.
- Integrity of evidence: hash every file you collect, right away (Lesson 3). A matching hash later proves nothing was changed.
- Chain of custody: write down who collected what, when, how, and who held it since. Without it, evidence can be challenged.
What you now know
- What security protects. Confidentiality, integrity, and availability, plus authentication, authorization, and accounting.
- Threat, vulnerability, risk. Risk is likelihood times impact. CVE names a bug, CVSS scores it in general, and exploited bugs come first.
- Crypto basics. Encoding hides nothing, hashing proves integrity, encryption protects confidentiality, and certificates prove a site’s identity.
- Ethics, law, recon. Permission first, in writing, with a scope. Report what you find by accident. Passive recon reads only what is public.
Hands-on: build a small timeline of your own computer
This exercise chains the track into one small investigation, on your own machine only. You will collect three kinds of events, save them as evidence files, hash them, and write a short custody note.
Go to your practice folder from Lesson 3 and make an evidence folder:
mkdir -p ~/security-concepts/evidence && cd ~/security-concepts/evidencemkdir -p ~/security-concepts/evidence && cd ~/security-concepts/evidenceNew-Item -ItemType Directory -Path "$HOME\security-concepts\evidence" -Force
Set-Location "$HOME\security-concepts\evidence"1. When did the machine last start, and who logged in?
sysctl -n kern.boottime > boot.txt
last | head -n 15 > logins.txt
cat boot.txt logins.txtuptime -s > boot.txt
last -n 15 > logins.txt
cat boot.txt logins.txt(Get-CimInstance Win32_OperatingSystem).LastBootUpTime | Out-File boot.txt
# Windows logs a system start (6005) and a clean shutdown (6006) in the System log
Get-WinEvent -FilterHashtable @{LogName='System'; Id=6005,6006} -MaxEvents 15 |
Select-Object TimeCreated, Id, Message | Out-File logins.txt
Get-Content boot.txt, logins.txtOn Linux inside WSL, last may show almost nothing, because WSL does not record logins the same way. That is fine: note it, which is exactly what an investigator would do.
2. Which files changed recently in your Downloads folder?
ls -lt ~/Downloads | head -n 10 > downloads.txt
cat downloads.txtls -lt ~/Downloads | head -n 10 > downloads.txt
cat downloads.txtGet-ChildItem "$HOME\Downloads" | Sort-Object LastWriteTime -Descending |
Select-Object -First 10 Name, LastWriteTime | Out-File downloads.txt
Get-Content downloads.txt3. Hash the evidence, right away
shasum -a 256 boot.txt logins.txt downloads.txt > hashes.txt
cat hashes.txtsha256sum boot.txt logins.txt downloads.txt > hashes.txt
cat hashes.txtGet-FileHash boot.txt, logins.txt, downloads.txt -Algorithm SHA256 | Out-File hashes.txt
Get-Content hashes.txt4. Write the timeline and a custody note
In a text file (or on paper), put the events in time order: the boot time, the logins, and the downloads with their times. Add a short custody note at the top: your name, the date and time you collected the files, the commands you used, and that the hashes are in hashes.txt.
You just did a tiny version of real incident response: collected evidence in order, protected its integrity with hashes, documented custody, and turned raw output into a timeline. All on a machine you own.
Where to go from here
This track was a first taste. Incident response, forensics, threat intelligence, and secure design are each full careers. You now have the vocabulary they all share.
Bring your questions to the community Discord with the Join Discord button at the top of the page. The question you write in the reflection below is a good first post.
Next steps from here:
- How the Web Really Works applies these ideas to websites: certificates, cookies, and sessions.
- Servers & Services gives you a lab server you own, where active techniques are fair game.
- How LLMs Actually Work covers the newest attack surface: AI features.