SQL Injection in 12 Slides
This outline turns SQL injection into a short, friendly talk for beginners. Each slide has a title and speaker notes. Build the slides yourself in any tool; nothing here depends on a particular deck file.
Slide 1: "A login form"
Notes: show a simple form with a user name and password box. Ask: what happens to the text after you press Log in? Most people say "it's checked". The interesting part is *how*.
Slide 2: "The query behind the form"
Notes: show a query an app might build: SELECT * FROM users WHERE name = '...' AND password_hash = '...'. Explain the gaps are filled with what the user typed.
Slide 3: "Gluing text into SQL"
Notes: show the dangerous code pattern, joining strings with +. Point out that the user's text becomes part of the SQL sentence.
Slide 4: "A quote mark changes everything"
Notes: show what happens if someone types ' OR '1'='1. The quote closes the text early; the rest becomes a condition that is always true. Keep it conceptual; do not demonstrate on real systems.
Slide 5: "This is SQL injection"
Notes: define it: user input being run as part of a database command. It can expose or change data the user should never reach.
Slide 6: "It is not only login forms"
Notes: search boxes, URL numbers like /post/42, filters and uploaded files can all carry input into queries.
Slide 7: "The fix: placeholders"
Notes: show SELECT * FROM users WHERE name = ? with the value passed separately. Use the "two envelopes" picture: instructions in one, data in the other.
Slide 8: "Same idea, every language"
Notes: show placeholders in two languages, for example ? in Python's sqlite3 and $1 in Node.js with pg. The symbol differs; the idea does not.
Slide 9: "What placeholders cannot do"
Notes: table and column names cannot be placeholders. For a "sort by" option, use an allow-list of known column names.
Slide 10: "Weaker advice to avoid"
Notes: hand-written escaping and hoping input is "clean" are fragile. ORMs are safe until someone uses raw SQL with glued strings.
Slide 11: "Check your own app"
Notes: list every input, list every query, and confirm each value goes through a placeholder. Point to the printable planner for making a small app injection-proof.
Slide 12: "Practise responsibly"
Notes: only test your own practice apps. Testing other people's sites without permission is wrong and can be illegal. Mention that the OWASP project publishes trusted guidance.
Tips for presenting
- Spend the most time on slides 4 and 7; they carry the main idea.
- Invite the audience to spot the glued string on slide 3 before you point it out.
- Keep code samples to one or two lines so they are readable on a projector.
- Allow about fifteen to twenty minutes including questions.
Follow-up for your audience
Suggest Breaking and Fixing a Tiny Login Form as homework. Doing the fix with their own hands is what makes the lesson stick.
A free learning page for beginners. Practise on a test database, never on real customer data, and check the official documentation for your database version.
This page is a free outline. No downloadable files, paid content, courses or certificates are offered on this site.