Skip to content

About

A school for basic security testing, including lessons without prior knowledge, and a vulnerable app to experiment on. Translation framework available.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

School of Testing

A local web app for learning hands-on security testing. It runs two small sites on your machine:

  • School — lessons and guidance (default http://127.0.0.1:6902)
  • Field Notes — a deliberately flawed notebook app used in the exercises (default http://127.0.0.1:6901)

Both listen on 127.0.0.1 only (not reachable from other machines on the network).

Field Notes is intentionally vulnerable. The school lessons walk learners through finding each issue. A full list is at the end of this file under Planted vulnerabilities (spoilers) — skip it if you want to find them yourself.

Languages

The school (not Field Notes) can be translated. Learners pick a language in the school header. See LOCALIZATION.md for how translations, versions and updates work, and how to add a language (npm run i18n -- add <code> "<name>").

Reading copy

The lessons are also a single HTML file. Open it in a browser and read it offline. It contains the lesson text, the diagrams, the sample requests, and the questions. Field Notes and the exercises are left out.

Open reading/security-school-en.html in Chrome, Edge, Firefox, or Safari. The Swedish draft is reading/security-school-sv.html. Double-click the file, or drag it onto a browser window. Open “Check your thinking” after you have answered the question. To save a PDF, press Ctrl+P (Command+P on a Mac) and choose Save as PDF. The answers are included in the print.

Nothing in the file is saved or uploaded. A sentence may still mention a button or the page beside the text. Those steps describe what you would do in Field Notes, or on an application you were allowed to test.

The reading folder is produced by:

npm run reader

make-zip.ps1 runs the same command, so a packed archive already contains the files. Run npm run reader again after the lessons change. The HTML is generated from the same lesson source as the app. Send the files on their own to anyone who only wants to read.

Prerequisites

The full course, with Field Notes, needs:

  • Node.js 22 or newer. Check with node -v in a terminal.
    • Windows: download the LTS installer from nodejs.org and run it.
    • macOS: download the LTS .pkg installer from nodejs.org, or with Homebrew run brew install node.
    • Open a new terminal after installing so node and npm are found.
  • A modern browser (Chrome, Edge, Firefox or Safari).
  • An internet connection for the first npm install.

Get running

  1. Unzip the archive somewhere convenient (e.g. Documents). You get a SchoolOfTesting folder.

  2. Open a terminal in that folder:

    • Windows: right-click the folder in Explorer → Open in Terminal.
    • macOS: open Terminal (Applications → Utilities), type cd (with a space), drag the folder into the window, press Return.
  3. Install dependencies (once):

    npm install
  4. Start the server:

    npm start
  5. In the terminal output, open the School URL (usually http://127.0.0.1:6902) in your browser. Field Notes opens in an iframe during lessons; you can also open its URL directly when a lesson asks you to.

Next time, just repeat steps 2 and 4.

Stop the server

Stop the server when you are done.

In the same terminal where npm start is running, press Ctrl+C (on macOS too: Control+C, not Command).

Wait until the process exits and you get your shell prompt back. If you close the terminal window without stopping the process, the server may keep running in the background.

Port already in use

The app prefers ports 6901 (Field Notes) and 6902 (School). If either is taken, it tries the next free ports and prints a WARNING — lesson text may still refer to 6901/6902, so stop the old instance first.

Windows (PowerShell) — see what is listening:

netstat -ano | findstr ":6901 :6902"

Note the PID in the last column, then stop it (replace 12345 with that PID):

taskkill /PID 12345 /F

macOS / Linux:

lsof -i :6901 -i :6902
kill <PID>

Then run npm start again.

Tests

npm test

Runs the Node.js built-in test runner against the project tests in test/.

Project layout (short)

Path Purpose
src/ Server and app logic
public/school/ School UI
public/notes/ Field Notes UI
vendor/ Bundled jQuery (committed)
resources/ Images and other static assets
var/ Created at startup (not committed)
reading/ Reading copies from npm run reader (generated, not committed)

Bootstrap CSS is loaded from node_modules after npm install.

Planted vulnerabilities (spoilers)

The comparison page at /fixed fixes response headers only; every other planted bug remains on the main app.

Each row is one deliberate flaw in Field Notes. The Lesson column is the school lesson title (same order as in the app).

Lesson Planted vulnerability
Instructions to the browser Missing Content-Security-Policy, framing protection (X-Frame-Options / frame-ancestors), and X-Content-Type-Options; sends X-Powered-By: FieldNotes/0.1
The session cookie Session cookie fn_session set without HttpOnly, Secure, or SameSite (readable from page script)
What the sign-in tells you User enumeration: different error text for unknown username vs wrong password
What the sign-in tells you No sign-in rate limit: many failed attempts still allow a successful login
A session that outlives sign-out POST /logout clears the cookie in the browser but the server still accepts the old session value
A sign-in that sends you anywhere Open redirect: /login?next= (and the hidden next field on sign-in) is used as the Location without validation, e.g. next=https://example.com
A number is not a permission Broken access control: any signed-in user can read another user’s note by id (/notes/2, /api/notes/2); “Private” is not enforced
The screen is not the server maxlength on profile is browser-only; the server stores longer display names
The screen is not the server Profile save accepts a hidden role=admin field and grants the staff console
A request the form did not send Profile POST has no CSRF token; a save can be triggered from the school origin (same site, different port)
Text that becomes the page Reflected HTML/script in the search results heading (query echoed without encoding)
Text that waits for the next person Stored HTML in display names rendered unencoded on the Band page for other users
Text that becomes a query SQL injection in search: database errors leak the query; crafted input can return another user’s notes
More than the screen shows GET /api/notes returns every note (including private bodies), owner emails, and flags; the UI filters client-side only
More than the screen shows config.js exposes a demo apiKey (the notes API does not require it)
An old library and a loud crash jQuery 1.8.3 loaded on every page (outdated; no in-app exploit path for learner text)
An old library and a loud crash GET /api/notes/nope returns 500 with a stack trace (verbose error disclosure)
Next steps (hint only) Path traversal: /media/:name strips ../ once (non-recursively), so ....// still climbs out of resources/. Confined to the project folder; dotfiles are not served
Next steps (hint only) “Keep me signed in” cookie fn_keep is id.HMAC(key, id): never expires, is the same on every sign-in, and survives sign-out. The key is random per start and written to var/keep.key, so forging fn_keep for Ben requires the traversal first (chain: read key → forge cookie → signed in as Ben)

The probe list and tools pages do not add separate planted bugs. The Next steps page hints at the last two rows only, as a chain to hunt together with an AI assistant; the key is not in the source, so it cannot be solved by reading code alone. Each numbered lesson names its OWASP Top 10 (2025) category.

License

School of Testing is released under the MIT License.

Field Notes is deliberately vulnerable, and both servers listen on 127.0.0.1 only. Leave them there. The planted issues above are the coursework, not defects to report. Anything else goes in SECURITY.md.

jQuery 1.8.3 in vendor/ is third-party software. Its own MIT license is named in the banner at the top of that file. Bootstrap and Express are installed by npm and are MIT as well. package.json stays "private": true so this app is not published to the npm registry; the MIT license is what makes the source open.

The rehearsal-room photograph is a generated image. Created with Grok. The demo recording resources/in_a_rocknroll_band.mp3 is an original track from 2007, included under the same license.

About

A school for basic security testing, including lessons without prior knowledge, and a vulnerable app to experiment on. Translation framework available.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages