Week 2 · Phase 1: Foundations

Web security & OWASP Top 10

See how websites get hacked, because AI apps are websites too.

Time this week: 6–8 hours

Goal for this week
By Sunday you can name the OWASP Top 10:2025 risks and explain SQL injection, because prompt injection works on the same idea.
Why it matters for AI security
Prompt injection, the number one AI risk, is the cousin of SQL injection: mixing trusted instructions with untrusted user input. Learn the old version first and the new one will click.

Start here: this week's labs

SQL Injection Lab: break it, then fix it
Log in to a fake shop without a password, watch the SQL query change live, then switch on the fix.
Open lab

The same mistake, twice

Trusted instructionsSQL query / system prompt
+ untrusted inputadmin'-- / 'ignore your rules'
Glued togetherno wall between code and data
Attacker controls itlogin bypass / bot hijack

Key ideas

OWASP

A free, non-profit community that publishes security guides. Their 'Top 10' lists are used everywhere.

Injection

When user input is treated as a command. Example: typing SQL code in a login box and the database runs it.

Broken access control

#1 on the 2025 list. A user can see or change things they should not, like another person's account.

Security misconfiguration

#2 on the list. Default passwords, open storage buckets, debug mode left on.

Supply chain failures

#3 on the list. A library or package you depend on is hacked or out of date. AI models and plugins are part of the supply chain too.

Input vs instructions

The core lesson: never let data from a user become instructions for the system. Keep them separate.

Day-by-day plan

Tick each day when you finish it. Your ticks are saved in this browser.

Mini game: OWASP Top 10:2025 sorting game

Practice outside this course (free)

OWASP Top 10:2025
The official list. Read the intro and the names.
PortSwigger Web Security Academy
Free labs. Start with SQL injection.
TryHackMe: OWASP Top 10 room
Search for the OWASP Top 10 room.

These links need the internet. Everything else on this page works offline.

Exercises & worksheet

Exercise deck (PPTX) Worksheet (DOCX)

Weekly quiz

Finished the week?
Mark it done to fill your progress bar on the course home.
← Week 1: Networks & Linux basics Week 3: Identity (IAM) & cloud →