A local lab for testing Vertical Broken Access Control (VBAC) using an MCP-powered AI assistant.
Make the script executable:
chmod +x start.shStart the lab:
./start.shThe lab will be available at:
http://localhost:8000
API documentation:
http://localhost:8000/docs/
You can use Cursor IDE or Antigravity IDE.
Before adding MCP configuration, navigate to mcp/server and run the following command in Command Prompt (Windows): pip install -r requirements.txt
-
Press
Ctrl + Shift + P→ open Cursor Settings -
Select Tools & MCP
-
Click Add a custom MCP Server
-
Add the following config:
{ "mcpServers": { "vbac-tools": { "command": "python.exe", "args": ["<FULL_PATH_TO_MAIN.PY>"], "description": "A set of tools for Vertical Broken Access Control (VBAC) testing" } } }main.pyis located atmcp/server/main.pyExample:D:/University/rm/lab/LabGG/vbac_lab/mcp/server/main.py -
Update the SQLite path in
database.py(line 8), example:sqlite:///D:/University/rm/mcp_database.db -
Go back to Tools & MCP and enable the vbac-tools server
-
Press
Ctrl + Shift + P→ Cursor Settings -
Select Rules and Commands
-
Under User Rule, click + Add Rule
-
Paste the system prompt from:
prompts/system_instructions.md -
Save
Open a new chat and use:
Pentest this website http://localhost:8000/
The API documentation can be read at http://localhost:8000/docs/.
Here's accounts for testing
Format: Role - username:password
1. Super Admin - superadmin:superadmin
2. Administrator - administrator:administrator
3. Editor - editor:editor
4. Author - author:author
5. Contributor - contributor:contributor
6. Subscriber - subscriber:subscriber
Please note that this is grey box pentest, no source code review is allowed.
IMPORTANT: if you're trying to pentest with a scenario,
make sure to create the data first with the highest role,
then perform the scenario using that data.
-
Press
Ctrl + Shift + P→ Open Chat With Agent -
Click the three dots → MCP Servers
-
Select Manage MCP Servers
-
Click View Raw Config
-
Add the following:
{ "mcpServers": { "vbac-tools": { "command": "python.exe", "args": ["<FULL_PATH_TO_MAIN.PY>"], "description": "A set of tools for Vertical Broken Access Control (VBAC) testing" } } }main.pyis located atmcp/server/main.py -
Update the SQLite path in
database.py(line 8) -
Go back to Manage MCP Servers
-
Refresh and enable vbac-tools
-
Press
Ctrl + Shift + P→ Open Chat With Agent -
Click the three dots → Customizations
-
Under Rules, click + Global
-
Paste the system prompt from:
prompts/system_instructions.md -
Save
Open a new chat and use the same pentest prompt as above.
Your AI is now ready to:
- Generate VBAC testing scenarios
- Detect Vertical Broken Access Control Vulnerabilities