Foundations Pro Subscription Required

Security Fundamentals in Practice: Defend With Data and Python

Learn security fundamentals by measuring a company's real-looking weaknesses in Python, in your browser. Test a password policy and see why length wins, measure a stolen password table and learn what salt and slow hashing really do, check a download against its checksums and an HMAC, read the real destination of phishing links, rank a risk register, decide which patch comes first, review who can do what, catch certificates before they expire, and build the quarterly report. The data is generated for you alone, and the functions you write also run on data you cannot see.

5-7 hours of study Builds toward: Junior Cybersecurity Analyst 9 modules

Practise on your own computer

The labs in the lessons run in your browser. To repeat them, go further and try the capstone on your own machine, set up the environment with these free guides:

Security is not a list of things to fear. It is a set of questions that you can answer from data: how weak are our passwords, what would the thief of that table learn, is this file the file that was published, where does this link really go, which risk matters most, which patch first, who still has access, which certificate is about to expire. People who can answer those questions with a few lines of code are the ones whose organisations are safer, because they find the problem before the attacker does.

This is the seventh season of Sabi Logistics’ story, told from the security office. Halima, Zainab, Tunde, Musa and Chidi bring you questions. Every case gives you the company’s data, invented and generated for you alone, a starter script, and checks that read what your Python leaves behind. Functions you write are also run on hidden data, so a solution that only fits the sample fails.

You need nothing installed. Everything uses the Python standard library (csv, json, hashlib, hmac, urllib.parse, datetime), and it runs in your browser (about 10 MB the first time; the stolen-table case loads one more small package). All accounts, passwords, hashes and messages are invented: never use real ones, and never test anything you do not own or have written permission to test.

What you need first

The case files use Python (it runs in your browser, nothing to install). You should be comfortable with variables, lists, dictionaries, loops and functions. If you are not yet, read the Python primer for the case files first (it takes about an hour), or take the free course Python for Case Files, which teaches the same ideas with nine small hands-on jobs.

Every lab starts with a how to do this lab panel: the steps, what each answer must look like (its shape, never its value), and the first lines of your own files. A wrong answer comes with a hint, and when every answer is right you can see one good way to write it. These labs teach the rules and edge cases behind the real tools, and how to automate an audit with a script. Each lesson ends with a box of the real commands that you would type on a real system.

What you will learn

  1. Judge passwords honestly: rules as code, reasons that add up, and entropy in bits: why length beats clever symbols.
  2. Measure a stolen password table: shared passwords visible without cracking, what a word list breaks, what salt changes and what it does not, and PBKDF2.
  3. Prove a file and a message are genuine: checksums, what they do not prove, HMAC and a comparison that cannot be timed.
  4. Read a link like an attacker: the real host, look-alikes, suffix tricks, user names before the at sign, IP addresses and punycode.
  5. Rank risks: likelihood times impact, inherent against residual, totals by asset.
  6. Choose the patch order: CVSS plus exploitation, exposure and value; bands; exact whole-number arithmetic.
  7. Review access: dormant accounts, leavers, administrators outside IT and shared accounts, with the date taken from the request.
  8. Stop certificate outages: expiry, weak keys, mismatches and what a wildcard really covers.
  9. Report honestly: four counts, the worst area, “none” when nothing is wrong, and a page that proves that it looked.

How it works

Each case is a call from someone at Sabi Logistics, a short brief, a lab with a starter script, a twist and a debrief that says what a senior security engineer would do next. Write the Python, run it, press Check my answers, and fix what the checker tells you. When every check passes you get a case reference to submit, and a short write-up to practise explaining the work to the person who asked for it.

The capstone asks you to measure the security of a small organisation of your own choosing, with data you are allowed to use, and to report honestly what you found and what you could not see.