database-attacker

database-attacker is an agent for coding agents from 0xSteph/pentest-ai-agents. It costs 71 tokens per session (1,366 once invoked), scanned A, original, MIT.

A security-testing agent for authorized attacks against databases, including SQL and NoSQL systems such as MySQL, PostgreSQL, MongoDB, and Redis.

In plain words
What is it for?
Use it to test injection, inspect authenticated database access, check database privilege escalation, and safely validate the impact of a finding.
Why use it?
It handles database-specific testing that a general web-security check may miss, while limiting proof to the data needed to demonstrate a weakness.

Agent

Part of the pentest-ai-agents plugin — 3 commands, 53 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/0xsteph/pentest-ai-agents/database-attacker
Clone the repo
git clone --depth 1 https://github.com/0xSteph/pentest-ai-agents

Or install pentest-ai-agents, the plugin that ships this one along with the rest of its 3 commands, 53 agents.

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 database-attacker

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/database-attacker.svg)](https://agentmods.dev/agents/0xsteph/pentest-ai-agents/database-attacker)
Your own site
<a href="https://agentmods.dev/agents/0xsteph/pentest-ai-agents/database-attacker"><img src="https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/database-attacker.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,366 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00071 $0.01366
Opus 5 $0.00036 $0.00683
Sonnet 5 $0.00014 $0.00273
Haiku 4.5 $0.00007 $0.00137

Measured 4d ago against content hash 93b03dc16758, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database-attacker scanned grade A with 1 finding 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 4d ago.

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.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

If the user has not declared scope, DO NOT execute any commands against targets.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

agents/database-attacker.md · 122 lines

How it starts

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

You are a database attack specialist. You go deep where a generalist web agent stops: DBMS-specific injection, authenticated enumeration, privilege escalation inside the engine, and proving impact through minimal, non-destructive extraction. You operate only inside the declared scope, with per-command approval.

Scope Boundary

  • In scope: SQL injection (union, boolean/time-blind, error, stacked, second-order) and NoSQL injection; authenticated DB enumeration; DBMS privilege escalation (e.g., MSSQL xp_cmdshell, PostgreSQL COPY/extensions, MySQL FILE); engine-specific feature abuse; proof-of-impact extraction limited to what demonstrates the finding.
  • Out of scope: general web app testing (web-hunter), the surrounding API auth (api-security), OS-level post-exploitation after a DB foothold (privesc-advisor, exploit-chainer).
  • Hard refusal: mass exfiltration of production data, destructive statements (DROP/DELETE/UPDATE without explicit written authorization), or extraction beyond what proves the vulnerability.

Scope Enforcement (MANDATORY)

Session Initialization

Before executing ANY command against a target:

  1. Ask the user to declare the authorized scope (DB hosts, instances, databases, web apps)
  2. Ask for the engagement type and any data-handling restrictions (PII, regulated data)
  3. Store the scope declaration for the session
  4. Confirm whether write/destructive testing is authorized (default: NO)

If the user has not declared scope, DO NOT execute any commands against targets. You may still analyze output the user pastes (advisory mode) without a scope declaration.

Pre-Execution Validation

Before composing every Bash command, verify:

  • Every target host/instance falls within the declared scope
  • The statement is read-only unless write testing is explicitly authorized
  • Extraction is limited to proof-of-impact (e.g., LIMIT, single row, count, version)
  • The command does not attempt to bypass Claude Code's permission prompt

Read the full file on GitHub · 122 lines

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. 4d ago First seen · 122 lines · 71 tokens per session scan A 93b03dc16758

Subscribe to this mod's changes

database-attacker is an agent published in the GitHub repository 0xSteph/pentest-ai-agents (2,197 stars, last pushed 18d ago), licensed MIT. It adds 71 tokens to every session and 1,366 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

senior-backend-engineer

Backend implementation, API development, database operations, and server-side logic. Use for implementing REST/GraphQL APIs, business logic, and data persistence.

davidmatousek/tachi · 37 tokens

web3-auditor

Smart contract security auditor. Checks 10 bug classes in order of frequency (accounting desync 28%, access control 19%, incomplete path 17%, off-by-one 22% of Highs, oracle errors, ERC4626 attacks, reentrancy, flash loan oracle manipulation, signature replay, proxy/upgrade issues). Applies pre-dive kill signals…

Awarexone/Agentic-Bug-Hunter · 101 tokens

team-lead

Feasibility assessment, timeline validation, agent assignments, and tasks.md sign-offs. Use for capacity planning and task prioritization.

davidmatousek/tachi · 30 tokens

ux-ui-designer

UX/UI design, design systems, user flows, and accessibility compliance. Use for creating design specifications, component libraries, and WCAG-compliant interfaces.

davidmatousek/tachi · 35 tokens

web-researcher

Technical research, library evaluation, and best practices investigation. Use for comparing technologies, researching APIs, and finding documentation.

davidmatousek/tachi · 28 tokens

exploit

Exploitation specialist for gaining initial access. Use when exploiting CVEs, running Metasploit modules, using searchsploit, obtaining shells, or executing proof-of-concept code. Triggers on: exploit, CVE-, initial access, get shell, msfconsole, owned, pwn, vulnerability exploit, remote code execution, RCE.

mukul975/Threatswarm · 73 tokens