← Back to All Products
Experiments & Research · LLM SecurityResearch Prototype · Open Source
🛡️

LLM Hacking Lab · LLM_H4CK_101

OWASP LLM Top 10 Hands-on CTF · EXPLORE→LEARN→PROVE→REFLECT 4-Stage Loop

A CTF-style LLM security lab built on Kolb’s experiential learning cycle — hands-on practice against OWASP LLM Top 10, covering real exploits, flags and defenses for prompt leakage, direct / indirect prompt injection, and SSRF via model output. Each module follows the four-stage pedagogy EXPLORE (blind test) → LEARN (theory) → PROVE (guided exploit) → REFLECT (hardening), runs fully offline via Ollama, and lets security people sharpen AI-security and LLM-pentest skills in a safe environment.

Core Principles

Turning "studying LLM security" from reading docs into experiential training — break it open in an offline sandbox, then patch it yourself.

🧭

EXPLORE · Blind Test

EXPLORE

Read the briefing, launch the intentionally vulnerable chatbot, and blind-test for the flag with zero hints. Real understanding starts the moment you try it yourself.

📚

LEARN · Theory

LEARN

Study the vulnerability class: concepts, attack techniques, real-world incidents (data leaks, injection-driven exfiltration) and quizzes — figure out why it gets broken.

🎯

PROVE · Guided Exploit

PROVE

Follow the progressively hinted lab guide, extract FLAG{...} and submit it for SHA-256 verification — move from "knows" to "can do".

🛡️

REFLECT · Hardening

REFLECT

Learn defenses, then face the hardened variant of the same lab with protections applied. Can you still break it? Attack and defense in one loop.

Why a Hands-on Lab

The biggest LLM-security gap is between "read the OWASP doc" and "can actually break it open and patch it in a sandbox".

📖

Theory Detached from Practice

Security teams can read OWASP LLM Top 10 but rarely reproduce a prompt injection in a controlled environment — understanding stays conceptual.

🕳️

No Safe Practice Ground

Production systems cannot be used for practice, public ranges are scarce and mostly theoretical; there is no "intentionally vulnerable, safe-to-attack" offline sandbox.

🔓

Defense Without Baseline

Learning only attack leaves you unable to tell if hardening actually works; defenses easily stay on paper.

🌍

Real Incidents Hard to Reproduce

Injection-driven data exfiltration, poisoned-RAG privilege escalation — real-case details are rarely available; reproducible teaching samples are missing.

OWASP LLM Top 10 Coverage Map

How shipped and planned modules align to the OWASP Top-10 LLM risks (planned modules marked "planned").

OWASP RiskMapped Modules
LLM01 Prompt InjectionDirect Injection (02), Indirect Injection (03), Multi-turn Jailbreak (06·planned), Prompt Obfuscation (10·planned)Injection
LLM02 Insecure Output HandlingSSRF via Output (04), Output-Filter Bypass (09·planned), Multimodal Injection (12·planned)Output
LLM03 Training Data PoisoningRAG Poisoning (07·planned), Training Data Extraction (14·planned)Poison
LLM04 Model Denial of ServiceModel DoS (13·planned)DoS
LLM05 Supply ChainSupply-Chain / Plugin Attack (15·planned)Supply
LLM06 Sensitive Info DisclosurePrompt Leakage (01), Training Data Extraction (14·planned), Cross-Session Leak (16·planned)Leak
LLM07 Insecure Plugin DesignTool / Function Abuse (05·planned), Supply Chain (15·planned)Plugin
LLM08 Excessive AgencyTool Abuse (05·planned), Agent Hijacking (08·planned)Agency
LLM09 OverrelianceChained Exploits (17·planned), AI SOC Evasion (18·planned)Reliance
LLM10 Model TheftEmbedding / Similarity Attack (11·planned), Training Data Extraction (14·planned)Theft

Four Hands-on Modules

Every module is a full loop of "vulnerable lab + teaching + guided exploit + defense guide + automation script".

🔓

Module 01 · Prompt Leakage

System-prompt extraction. Through over-privileged questions and role-play, fish the hidden system prompt out of the model and understand the information-disclosure boundary. Vuln port 8001 / hardened 8010.

🎭

Module 02 · Direct Injection

User overrides bot behavior. Use a malicious instruction to override the model’s original setup and bypass role constraints, making the assistant do what the designer disallowed. Port 8002 / hardened 8003.

☣️

Module 03 · Indirect Injection

Contaminated data hijacks the LLM. Plant poisoned content in the retrieval / RAG context and indirectly steer model behavior through "external data". Port 8004 / hardened 8005.

🌐

Module 04 · SSRF via Output

SSRF through LLM output. Weaponize the model’s generation to trigger server-side requests against internal services, closing the "model output → internal-network probing" chain. Port 8006 / hardened 8007.

One Module, Four-Stage Loop

EXPLORE→LEARN→PROVE→REFLECT — every module completes "attack → learn → verify → defend".

30-Step Creation Flow
EXPLORE0/1
1
Blind-Test for Flag
Launch the vulnerable lab and try to bypass the system prompt / constraints with zero hints to find FLAG{...}.
LEARN0/1
2
Learn the Vulnerability
Read the class concepts, attack techniques, real incidents and quizzes; understand the attack surface and root cause.
PROVE0/1
3
Guided Exploit
Complete the exploit with progressive hints, extract the flag and submit it for SHA-256 verification (anti-spoiler).
REFLECT0/2
4
Defend + Re-attack
Study defenses, then face the hardened lab again; breaking it means the protection has gaps, only a fail means it is closed.
5
Walkthrough & Scripts
solution/ holds the full walkthrough and automation exploit, tests/ provides automated verification — turning experience into reusable attack chains.
Offline = Safe
All labs bind to 127.0.0.1; flags are synthetic CTF values using no real credentials — for local education only.
Attack + Defense in One
The same vulnerability ships both a vulnerable and a hardened version; defense effectiveness has a verifiable baseline.
Swap Models Freely
A unified adapter supports Ollama (local, free) / OpenAI / Gemini; the lab environment switches with compute and privacy needs.

Coverage & Roadmap

4 foundational modules shipped; roadmap spans 6 tiers and 28+ hands-on modules.

4
Modules Shipped
Leakage / Direct Injection / Indirect Injection / SSRF
10
OWASP LLM Map
Modules aligned to OWASP LLM Top 10
6
Skill Tiers
Progression from Foundations to Elite Labs
28+
Planned Modules
Tool abuse / jailbreak / RAG poison / Agent hijack …

Key Breakthroughs

The hard part is not a single bug, but engineering "LLM-security training" into a reproducible, attackable-and-defendable, offline experiential course.

🔁

Experiential 4-Stage Loop

EXPLORE→LEARN→PROVE→REFLECT turns "learning security" into a loop of breaking it open and patching it yourself — double reinforcement of memory and muscle memory.

🏠

Fully Offline, Safe to Attack

Bound to 127.0.0.1, flags stored as SHA-256 hashes to prevent spoilers, no real credentials — even aggressive attacks stay in the local sandbox.

🧩

Verifiable Attack/Defense Baseline

The same module ships vulnerable and hardened versions; defense effectiveness is verified by "can you still break it" — no more paper defenses.

🔌

Unified Multi-Provider Adapter

llm_backend.py abstracts Ollama / OpenAI / Gemini; the lab is decoupled from the model, switching freely between offline privacy and cloud compute.

Business Value

Convert technical capability into quantifiable, reusable business value.

Improvements Delivered
Upgrade "reading OWASP docs" to experiential training — break a prompt injection open in an offline sandbox, then patch the same bug; understanding leaves the conceptual layer.
Every module ships both a vulnerable and a hardened version; defense effectiveness is verified by "can you still break it" — attack and defense in one loop.
Fully offline, host-bound, flags are synthetic CTF values stored as SHA-256 hashes to prevent spoilers; even aggressive attacks stay local.
A unified LLM adapter supports Ollama / OpenAI / Gemini, decoupling the lab from the model; the roadmap spans 6 tiers and 28+ modules from Foundations to Elite.
Applicable Scenarios
A hands-on training ground for security teams / pentesters to get into LLM-app attack-and-defense (offline, no real risk).
A CTF range for red-teamers to sharpen AI-security and LLM-pentest skills.
For developers to understand "where my LLM app is most likely to be broken" and reverse-engineer safer design and defenses.
Reproducible lab material for universities / training orgs teaching LLM security courses.
📌

Content Under Active Update

Product content has been published based on internal materials. The following areas are planned for further development:

Live attack-and-defense recordings of each module (full EXPLORE→PROVE flow)
Hardened-lab defense code diffs and protection-principle explanations
More real-world LLM-security incident post-mortems mapped to modules
Shipping progress of tiers 2–6 (jailbreak / RAG poison / Agent hijack / Elite Labs)
Contact Us

Start AI Partnership

Whether in government, finance, manufacturing, consumer, or content, we can customize vertical AI agent solutions for you.

📍

Address

Xiamen, Fujian · Wuhan OPC (planned)

🌐

Xianma AI

Xiamen Xianma Intelligent Technology Co., Ltd.

© 2024-2026 Xiamen Xianma Intelligent Technology Co., Ltd. · AI Agent Solutions · www.xianma.top

Products: 15active projects