Task 1: Introduction
A black-box tester sees a login form and a handful of endpoints. A white-box tester sees the function behind the login form, the query it builds, and the line where it forgets to escape an input. Grey-box testing sits between the two: we work with partial inside knowledge, valid credentials or a slice of the source, but not the full picture, which is the position we take for this room's practical. When source code is on the table, we stop guessing where the bugs might be and start reading where they are, and bugs that would take hours of fuzzing to surface become visible in minutes once we know what to look for and where to look.
This room walks through code review from the ground up: how to orient in a codebase we have never seen, how to map its attack surface from routing and configuration, how to trace user input from where it enters to where it causes damage, and how to triage hundreds of files in minutes with grep and Semgrep. By the end, we will audit a purpose-built vulnerable Flask application using the exact workflow a penetration tester follows when handed source on an engagement.
This is the code review entry in the Web Frameworks series. Every code sample and the practical lab here are Python and Flask, chosen because Python puts the least boilerplate between a route and a bug. The method is what transfers: the same reading order and source-to-sink thinking apply to any framework, Spring Boot, ASP.NET Core, Express. The syntax changes but the approach does not.
Learning Objectives
- Distinguish black-box, grey-box, and white-box testing, and recognise when source access changes the approach
- Orient quickly in an unfamiliar codebase using a fixed reading order
- Map the attack surface from routing and configuration without running the application
- Trace user-controlled input from source to sink in Python web code
- Triage a codebase with grep, ripgrep, and Semgrep
- Recognise SQL injection, command injection, Server-Side Template Injection (SSTI), insecure deserialisation, path traversal, broken access control, and hardcoded secrets in source
- Apply the full method to a purpose-built vulnerable Flask application
Prerequisites
- OWASP Top 10 (2025): The web bug classes we will learn to spot in source
- Burp Suite: The Basics: Black-box web testing, the counterpart to the white-box approach here
- SQL Injection: One of the sink types we will trace from source to a working exploit
- Content Discovery: Finding the files and endpoints that source review then explains
Machine Access
Deploy the machine with the Start Machine button and give it a few minutes to boot. It hosts three surfaces we use together: a browser-based source viewer at http://MACHINE_IP that shows the application's code beside the running app, the Vaultkeeper web app itself at http://MACHINE_IP:8080 (the app binds port 5000 inside its container and is published on 8080, so the source shows port=5000 while we reach it on 8080), and an SSH review account where grep, ripgrep, and Semgrep are already installed with the source ready to scan. The pattern for the whole room is that simple: read the code in the viewer, run the tools over SSH. Leave the machine running so the source and tools are ready when we reach the practical.
Credentials
Answer the questions below
I am ready to start learning!