数据库安全
NetVar13372026-10-26查看 1187复制 786
用于经授权的数据库安全评估,涵盖 PostgreSQL/MySQL/MSSQL/Mongo/Redis 暴露、授权、UDF/命令路径以及错误配置审查。
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md2065 chars
--- name: database-security description: "Use for authorized database security assessment covering PostgreSQL/MySQL/MSSQL/Mongo/Redis exposure, authz, UDF/command paths, and misconfiguration review." version: 1.0.0 license: MIT metadata: package: unleash-skills author: NetVar1337/unleash category: reverse-skill upstream: https://github.com/zhaoxuya520/reverse-skill --- > Bundled with Unleash skills pack. Upstream: https://github.com/zhaoxuya520/reverse-skill # Database Security Assessment ## ACTION REQUIRED (execute immediately after reading) 1. `NOW`: read precedent-pentest; **destructive statements against production databases are forbidden** unless explicitly allowed 2. `NOW`: write scope clearly: instances, account permissions, whether writes/deletes are allowed 3. `NEXT`: client tool paths 4. `ACT`: exposure surface → authentication → authorization → configuration → (safe) exploit-chain verification ## Applicable Scenarios - Unauthenticated databases/weak passwords/wrongly bound 0.0.0.0 - Excessive privileges, dangerous features (xp_cmdshell, COPY PROGRAM, UDF) - Lateral movement: from app account to DBA - NoSQL injection and Redis file writes etc. (authorized environments) ## Workflow ```text □ Network exposure and TLS □ Account roles and grantees □ Sensitive table access controls □ Dangerous configuration: file_priv, xp_cmdshell, load_file □ Whether audit logging is enabled □ Backup and snapshot permissions ``` ## Toolchain | Tool | Purpose | |------|------| | Official CLIs | Connection and enumeration | | sqlmap | Injection verification (authorized) | | nuclei | Known exposure templates | | Cloud RDS console audit | Configuration | ## References - `references/db-misconfig-checklist.md` - `../pentest-tools/` `../cloud-k8s/` ## Routing Context **Upstream**: MASTER R35 **Downstream**: OS command obtained → attack-chain; cloud-managed → cloud-k8s ## Task Completion Self-Check - [ ] Avoided unauthorized writes/deletes? - [ ] Distinguished configuration issues from exploitable chains? - [ ] Checklist?