cspshivam/playground

CSPSHIVAM // security playground

Learn web & AI security by breaking things — safely.

A hands-on lab environment for students and enthusiasts. Practice real attacks — SQL injection, SSRF, modern web bugs, CSRF, open redirects, XSS, and AI/ML exploits — in isolated, intentionally-vulnerable sandboxes. No setup. Each lab nudges you toward the technique — and, for server-side bugs, where to point your proxy — but never the payload. Capture the flag, then read the walkthrough to understand exactly why it worked.

58 labs
7 attack tracks
0 solved by you
SQLi

SQL Injection

Bend query logic through untrusted input — auth bypass, extraction and blind inference. The injectable channel is off the visible form: bring a proxy.

0 / 6

✓ Injection Operator earned

LVL 01 Easy

Credential Gate Bypass

A staff console authenticates against the users table. Walk in as the administrator without ever knowing the password.

Not solved Open →
LVL 02 Medium

Column Harvesting (UNION)

A catalogue endpoint returns product rows. Splice a second query onto it and lift data from a table you were never meant to read.

Not solved Open →
LVL 03 Medium

Verbose-Error Extraction

A lookup surfaces raw database errors to the page. Turn those errors into a data-exfiltration channel.

Not solved Open →
LVL 04 Hard

Boolean Inference

The endpoint answers with nothing but "match" or "no match". Interrogate the database one true/false question at a time.

Not solved Open →
LVL 05 Hard

Timing Inference

No body change, no error — only latency. Read the database purely by how long each response takes.

Not solved Open →
LVL 06 Hard

Keyword-Filter Evasion

A blocklist scrubs the obvious SQL keywords before the query runs. Reconstruct your injection past it.

Not solved Open →
SSRF

Server-Side Request Forgery

Coerce the server into fetching internal-only resources. The fetch target lives in a request element the UI pins — you override it in the proxy.

0 / 6

✓ SSRF Operator earned

LVL 01 Easy

Reach the Intranet

A link-preview service fetches whatever address it is handed. Steer it at an internal-only panel the box can see but you cannot.

Not solved Open →
LVL 02 Medium

Harvest Instance Creds

The fetcher runs on a cloud instance. Make it read the instance metadata service and hand you its credentials.

Not solved Open →
LVL 03 Hard

Loopback Blocklist Evasion

Literal localhost and 127.0.0.1 are refused. Reach the loopback service through a spelling the filter never anticipated.

Not solved Open →
LVL 04 Hard

Redirect-Chained Fetch

Internal hosts are rejected up front, but redirects are followed blindly. Bounce the fetch inward through an allowed origin.

Not solved Open →
LVL 05 Hard

Blind Callback Proof

The response body is swallowed. Prove the server reached your target by driving it to a unique out-of-band host.

Not solved Open →
LVL 06 Medium

Internal Port Sweep

The fetcher reports reachability. Use it to map which services listen on the internal host and read what one of them leaks.

Not solved Open →
Modern

Modern Web Attacks

Access control, SSTI, JWT, uploads, host-header and reset-flow abuse, response tampering. The advanced track — nearly all of it is proxy-driven.

0 / 14

✓ Web Exploitation Operator earned

LVL 01 Medium

Object-Reference Abuse (IDOR)

A billing portal keys invoices by opaque reference and never checks who owns them, while a sibling API quietly lists them. Open an invoice that is not yours.

Not solved Open →
LVL 02 Medium

OS Command Injection

A diagnostics tool shells out to probe a host. Ride the command it builds and run your own.

Not solved Open →
LVL 03 Medium

Directory Traversal (LFI)

A document viewer resolves pages by name inside a base folder with no containment. Escape it and read a file outside.

Not solved Open →
LVL 04 Hard

Template Injection (SSTI)

A personalised banner is rendered from a template that splices in a request value as source, not data. Make the engine evaluate your expression.

Not solved Open →
LVL 05 Hard

JWT Forgery (alg abuse)

The session is a JSON Web Token the server trusts to describe your role. Mint one that promotes you.

Not solved Open →
LVL 06 Hard

Executable Upload

An avatar uploader screens for the obvious extension only. Slip through a file the server still runs as code.

Not solved Open →
LVL 07 Hard

XML External Entity (XXE)

A feedback endpoint parses XML you submit with entity resolution left on. Coerce the parser into reading a local file.

Not solved Open →
LVL 08 Medium

Over-Trusting Mass Assignment

A profile form claims to edit only your name and bio, but the save endpoint trusts every field the read API over-shares. Assign yourself a role you should not have.

Not solved Open →
LVL 09 Hard

Reset-Link Poisoning

A "forgot password" flow builds the emailed reset link from the incoming request. Make the link point at infrastructure you control so the victim's token lands in your lap.

Not solved Open →
LVL 10 Hard

Reset-Token Takeover

The password-reset confirmation trusts a token and a user reference carried in the request — and the token is not unguessable. Complete a reset for an account that is not yours.

Not solved Open →
LVL 11 Hard

API Login Bypass (SQLi)

The web login is hardened, but a JSON authentication API behind it still stitches your input into the query. Authenticate as an operator through the API.

Not solved Open →
LVL 12 Medium

Host-Header Injection

A page caches and links itself using the Host the request arrives with. Poison what it emits by controlling that header.

Not solved Open →
LVL 13 Medium

Response Tampering

An entitlement check runs client-side against a verdict the server already sent. Rewrite the verdict on its way back and unlock the gated resource.

Not solved Open →
LVL 14 Medium

Undocumented POST Field

A form submits a tidy set of fields, but the handler honours one more that never appears on the page. Discover it and send it.

Not solved Open →
CSRF

Cross-Site Request Forgery

Ride a victim session to force state-changing actions. Read the genuine request in a proxy, then build the cross-origin forgery that reproduces it.

0 / 6

✓ Session Forgery Operator earned

LVL 01 Easy

Unguarded Email Change

A signed-in account can swap its email with no anti-forgery token. Drive that change from a request the user never intended.

Not solved Open →
LVL 02 Easy

State Change over GET

A sensitive action fires on a bare GET. Trigger it without the victim lifting a finger.

Not solved Open →
LVL 03 Medium

Guessable Token

A token exists, but it is derived from public data. Reproduce it and push the request through.

Not solved Open →
LVL 04 Medium

Sloppy Referer Gate

The server sniffs the Referer header — and does it badly. Satisfy the check from a host you own.

Not solved Open →
LVL 05 Medium

Login CSRF

Instead of hijacking the victim, plant them inside an account you control. Forge the sign-in.

Not solved Open →
LVL 06 Hard

Session-Unbound Token

Tokens are checked for shape but never tied to a session. Reuse one across users.

Not solved Open →
Redirect

Open Redirect

Abuse trust in redirect targets to bounce a victim to an origin you control. URL-driven — solvable straight from the browser.

0 / 6

✓ Redirect Operator earned

LVL 01 Easy

Raw url Parameter

A "continue" link forwards to whatever a parameter says. Bounce a visitor to an origin you control.

Not solved Open →
LVL 02 Medium

Prefix-Check Escape

The guard insists the target starts with the trusted host. Grow a URL that begins with it and ends somewhere else.

Not solved Open →
LVL 03 Medium

Client-Side Redirect

The forward is performed in the browser. Own the destination anyway.

Not solved Open →
LVL 04 Hard

Parser-Confusion Bypass

An allowlist inspects the wrong slice of the URL. Exploit the gap between what it reads and where the browser goes.

Not solved Open →
LVL 05 Hard

Fragment Token Leak

A freshly issued token rides along in the URL fragment. Redirect the flow so it spills onto your page.

Not solved Open →
LVL 06 Medium

Suffix-Match Loophole

Only cspshivam.com and its subdomains are meant to pass. Register something that ends in those characters yet is entirely yours.

Not solved Open →
XSS

Cross-Site Scripting

Land script execution in another user's browser: reflected, stored, DOM and sink-specific contexts. In-browser — no proxy needed.

0 / 10

✓ Client-Side Operator earned

LVL 01 Easy

Reflected — Body Context

A search box drops your query straight into the page body. Turn that echo into script execution.

Not solved Open →
LVL 02 Easy

Reflected — Attribute Break

Your value lands inside an HTML attribute. Break out of it and run code.

Not solved Open →
LVL 03 Medium

Reflected — Script String

Your input is embedded inside an inline script string. Terminate the string and execute.

Not solved Open →
LVL 04 Medium

Stored — Public Wall

Notes you leave are persisted and replayed to every visitor. Plant one that runs on view.

Not solved Open →
LVL 05 Medium

DOM — Fragment Sink

Browser-side code copies the URL fragment into the DOM. No server ever sees the payload.

Not solved Open →
LVL 06 Medium

Filter — Tag Stripping

The app deletes the script tag. Execute without ever using it.

Not solved Open →
LVL 07 Hard

Filter — Case & Encoding

A shallow keyword filter blocks a few words. Reshape your payload so it slips by.

Not solved Open →
LVL 08 Medium

Sink — javascript: URI

Your input becomes a link target. Convert the navigation into execution.

Not solved Open →
LVL 09 Medium

Sink — Event Handlers

Angle brackets survive but "script" is banned. Fire a handler that runs on its own.

Not solved Open →
LVL 10 Hard

Context — JSON under CSP

Your input is reflected into a JSON blob served under a lax policy. Achieve execution regardless.

Not solved Open →
AI Sec

AI / ML Security

Prompt injection, jailbreaks, system-prompt leakage, unsafe output handling and over-broad agency in LLM apps. Chat-driven — no proxy needed.

0 / 10

✓ AI Security Operator earned

LVL 01 Easy

Direct Prompt Injection

A support bot is told to guard a secret. Talk it out of it.

Not solved Open →
LVL 02 Medium

Indirect Prompt Injection

The assistant summarises a document you hand it. Smuggle instructions inside the text.

Not solved Open →
LVL 03 Medium

System-Prompt Disclosure

Recover the hidden system prompt the assistant runs under.

Not solved Open →
LVL 04 Medium

Guardrail Jailbreak

The model declines restricted asks. Reframe until it complies.

Not solved Open →
LVL 05 Hard

Unsafe Output Rendering

Replies are painted into the page as HTML. Turn one into cross-site script.

Not solved Open →
LVL 06 Hard

Tool Abuse via Injection

The agent wields tools. Coax it into calling one it must not.

Not solved Open →
LVL 07 Medium

Memorised-Data Extraction

A sensitive record sits in the model's context. Pull it out verbatim.

Not solved Open →
LVL 08 Hard

Excessive Agency — SSRF

The agent can fetch URLs. Aim it at the internal metadata service.

Not solved Open →
LVL 09 Medium

Classifier Evasion

A toxicity gate blocks certain messages. Get a blocked one through intact.

Not solved Open →
LVL 10 Hard

Feedback-Loop Poisoning

A spam filter learns from user labels. Teach it the wrong lesson.

Not solved Open →

About the playground

Built to be attacked — in the right places only.

CSPSHIVAM Playground is a self-contained training ground. Each lab is an isolated, deliberately vulnerable mini-app. The platform around it — this site, your progress, the walkthroughs — is hardened and holds no real accounts or data, so there is nothing here worth stealing. Attack the labs; the playground itself stays out of scope.

01 — Capture flags

Exploit, don't guess

Every lab hides a flag like CSPSHIVAM{…} that only appears once you actually pull off the attack. Submit it on the lab page to mark it solved.

02 — Earn badges

Clear a whole track

Finish every level in a category and you'll be prompted for a name and a downloadable badge — Injection Operator, AI Security Operator, and more. Share it and tag #CSPSHIVAMPlayground.

03 — Understand it

Hints point, they don't solve

Each lab nudges you toward the technique — and, for proxy labs, which header or parameter to intercept — but never the payload. When you're ready, the Walkthroughs tab explains each bug end-to-end, with the working exploit and how to fix it.

04 — Stay safe

Sandboxed by design

Dangerous primitives (SSRF, command execution, file reads) run against bundled mocks — never the real host or network — so nothing you do here can escape the sandbox.

Progress is stored only in this browser. Reset my progress.