This course is coming soon — content and pricing shown below may change before launch.
Coming SoonIntroductoryFree6h of content · 1 guided lab200 XP

Python for Cybersecurity

Python from zero for people who want to work in security. Every exercise is a real analyst task: read a log, count failed logins, pull the indicators out of a JSON event, decode an obfuscated command. You write and run the code right in the browser — nothing to install. Free, no programming background assumed.

Free forever. No card, no trial, no expiry.

Preview the student experience

No login · Free interactive demo

Try demo →

1

Guided lab

Real VM with the 24 € Pro unlock

6h

Of content

Labs + practice + exams + simulations

5

Modules

Progressive difficulty

2–4h

Per lab session

Unlimited restarts

HTKWhat's included
  • The full course: written lessons with diagrams
  • Per-module exams to check what stuck
  • Guided walkthrough of a real phishing email
  • Submit the final assignment
  • Lifetime access, no card required
  • Isolated lab VM and graded certificate: 24 € unlock
0 €

No card required

Notify me

Lab tools you will use

Python 3Lab toolreLab tooljsonLab toolPython 3Lab toolreLab tooljsonLab tool
csvLab toolhashlibLab toolbase64Lab toolcsvLab toolhashlibLab toolbase64Lab tool

Before you start — quick answers

The course is free: every lesson, the in-browser exercises, the module quizzes and the flags. You need an account, but no card. Two things are paid: the HTK Python Lab — a full editor with larger datasets and graded challenges — and the instructor review of your final script. That unlock is 24 €, once.

No. The course starts from zero: it assumes you have never written a line of code. What it does assume is that you are interested in security, because every example comes from there.

No. The code runs inside your browser, isolated from your computer and from our servers. Any recent browser will do. If you want to install Python on your machine later, the course explains how, but you do not need it to finish.

Yes. Your code runs in an isolated area of the browser with no access to your files or your other tabs, and it cannot connect to other websites. The worst an exercise can do is get stuck, and the environment stops it after a few seconds.

Course Syllabus

5 modules · 6h of content

Each phase maps to a module in this course. Scroll to see how the curriculum builds, module by module.

1

Module 1

Introductory

First steps

  • •What Python is and why analysts use it
  • •Variables and types, explained with the data you will actually handle
  • •print, strings and the methods that clean them up
  • •Exercise: normalise a list of indicators of compromise
  • •Module quiz and flag
2

Module 2

Introductory

Deciding and repeating

  • •if, elif and else: turning a rule into code
  • •Lists and the for loop
  • •while, and how to avoid an infinite loop
  • •Exercise: walk an authentication log line by line
  • •Module quiz and flag
3

Module 3

Introductory

Dictionaries and functions

  • •Dictionaries: counting things by key
  • •Top-N: which IP address tried the most
  • •Functions you can reuse from one case to the next
  • •hashlib: computing the hash of a sample
  • •Pro: HTK Python Lab with graded challenges
  • •Module quiz and flag
4

Module 4

Introductory

Files and the standard library

  • •Opening and reading files
  • •csv and json: the formats security tools export
  • •Regular expressions with re to extract IPs, domains and hashes
  • •datetime: putting events in order
  • •Module quiz and flag
5

Module 5

Introductory

Automating the analyst's work

  • •base64 and decoding an obfuscated command
  • •From loose lines of code to a script you can reuse
  • •Good habits: names, comments and errors that explain themselves
  • •Final assignment: a triage script that summarises an incident
  • •Module quiz and flag

What you will learn

  • Write and run Python without installing anything, and read the error when it fails
  • Turn a rule like "more than five failed logins" into an if and a loop
  • Count events by key with a dictionary and find the top offenders
  • Read logs, CSV and JSON files and pull indicators out of them with regular expressions
  • Compute the hash of a sample and decode an obfuscated base64 command
  • Package what you wrote into a script you can reuse on the next case

Hands-on Lab

Every lesson has short exercises you run in the browser and a flag that only comes out if your code is right. The Pro unlock adds the HTK Python Lab: a full editor with several files, larger datasets — thousands of log lines, EDR events in JSON — and six challenges with automatic tests, plus a final triage script that an instructor reviews.

1⬡ 1 guided lab
2–4hSession window
UnlimitedRestarts
AutoFlag validation
Experience a lab preview →

Requirements

  • ·No programming background — the course assumes you have never written code
  • ·A computer with a recent browser. Nothing to install: Python runs inside the browser
  • ·Around six hours

What's free, and what the 24 € unlock adds

Said plainly here so nothing surprises you halfway through the course.

Free, with an account

  • ✓Every lesson and module, start to finish
  • ✓Per-module exams, with unlimited retries
  • ✓The guided analysis walkthroughs
  • ✓You can submit the final assignment

Pro unlock

24 €
  • +The HTK Python Lab: a full editor with several files, larger datasets and six challenges with automatic tests
  • +An instructor personally reviews and grades your final triage script
  • +The HTK certificate, which depends on that review being passed

One payment, no subscription. The unlock is per free course: this one covers this course only, so you pay for the course you are actually taking. And if you later buy any paid HTK course — Beginner (119 €), Intermediate (159 €) or a complete Learning Path (199 €) — all three unlocks come included, one for each free course: 72 € of value at no extra cost. You never pay twice for the same thing.

Frequently Asked Questions

Complete answers about this course, labs, certificates, and refunds

The course is free: every lesson, the in-browser exercises, the module quizzes and the flags. You need an account, but no card. Two things are paid: the HTK Python Lab — a full editor with larger datasets and graded challenges — and the instructor review of your final script. That unlock is 24 €, once.

No. The course starts from zero: it assumes you have never written a line of code. What it does assume is that you are interested in security, because every example comes from there.

No. The code runs inside your browser, isolated from your computer and from our servers. Any recent browser will do. If you want to install Python on your machine later, the course explains how, but you do not need it to finish.

Yes. Your code runs in an isolated area of the browser with no access to your files or your other tabs, and it cannot connect to other websites. The worst an exercise can do is get stuck, and the environment stops it after a few seconds.

Only with the 24 € unlock. The certificate depends on an instructor reviewing and passing your final triage script, and that review is the paid part. Writing and submitting the script is free.

No. Any paid HTK course purchase includes the Pro unlock of every free course.

After this course

Then pick the specialism that fits you

This course exists to help you choose with some basis instead of guessing. Once you know which side of the field appeals to you, each learning path takes you from beginner to intermediate with the labs to match.

Explore learning paths →
Ready to level up?

Start learning cybersecurity today

Three hours, no prior knowledge, and a real phishing email to take apart. Create an account and begin.

FreeNo card required
No card requiredLifetime accessStart in under a minute