Security lab
NoSQL Injection
A login form builds a NoSQL query from user input without sanitization. Inject Mongo-style operators to bypass authentication as administrator.
Lab objective
Log in as the administrator using NoSQL injection. The flag is stored in the admin account's secret field.
Tools you will use
- browser
- Burp Suite
- curl
What this lab teaches
This lab is a self-contained exercise hosted in an isolated, per-user sandbox. You are given a clear objective, the tools typically used for the technique, and a guided set of hints. Because every sandbox is disposable and network-isolated, you can experiment freely, make mistakes, and reset the environment without affecting any real system.
Hints & approach
- 01The login accepts JSON bodies - try sending the username as an object instead of a string.
- 02Operator payload: {"username":{"$ne":null},"password":{"$ne":null}} with Content-Type: application/json.
- 03Classic string variant also works: admin' || '1'=='1 - then check the profile page for the flag.
How the sandbox works
When you start the lab, Vulnarex provisions an isolated, per-user environment and opens it in a new tab. Each session has its own target and state, so nothing you do here can affect another learner or any external system. You can reset the environment at any time and re-approach the challenge from a clean slate.