injection-vulns
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "injection-vulns" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-10bad9ef1f053609b0ede946595d3398126f7af7ceb5120d2122c3d313f81880. Verify the upstream source and version against https://github.com/zhaji2333/CkSKILLS before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Invoke when parameter-concatenated SQL, dynamic sorting/filtering, controllable JSON query conditions, template rendering, command execution points, or search/stat/autocomplete interfaces are detected to perform deep digging for SQL/NoSQL/command/SSTI/expression injection; applicable to scenarios like search boxes, sort parameters, login bypasses, export conditions, filename parameters, template/report generation, and crawler URL parameters.
Introduction source: third_party · zhaji2333 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: injection-vulns
description: 当发现参数拼接SQL、动态排序/筛选、JSON查询条件可控、模板渲染、命令执行点、搜索/统计/自动补全接口时调用,进行SQL/NoSQL/命令/SSTI/表达式注入的深度挖掘。命中场景:搜索框、排序参数、登录绕过、导出条件、文件名参数、模板/报表生成、爬虫URL参数。injection-vulns — 注入类漏洞专项深度挖掘
何时调用(触发条件)
- 参数直接拼接到 SQL / NoSQL 查询(搜索、筛选、排序、分页、导出条件)
- JSON 查询条件可控(
{"$gt":0}等 MongoDB 风格) - 用户输入进入 shell 命令(exec/system/ProcessBuilder、ping/curl/文件名拼接)
- 用户输入进入模板引擎(Jinja2/Velocity/Freemarker/Thymeleaf)
- 用户输入进入表达式解释器(SpEL/OGNL/EL/MVEL)
- 危险函数出现在代码审计结果中(见
source-code-audit)
一、漏洞类型全景
| 类型 | 危险函数/场景 | 挖掘要点 |
|---|---|---|
| C1. SQL注入 | 拼接SQL、动态排序 | 响应差异验证(错误/延迟/条数) |
| C2. NoSQL注入 | JSON查询条件可控 | 类型替换、全量查询 |
| C3. 命令注入 | exec/system/ProcessBuilder | shell拼接、管道符 |
| C4. 模板注入(SSTI) | Jinja2/Velocity/Freemarker | 用户输入进入模板渲染 |
| C5. 表达式注入 | SpEL/OGNL/EL | 可控片段进入解释器 |
二、常见场景清单(搜索/查询类)
| 场景 | 漏洞类型 | 挖掘要点 |
|---|---|---|
| 站内搜索 | SQL注入/XSS/信息泄露 | 搜索词拼接、搜索结果反射 |
| 高级筛选/排序 | SQL注入/NoSQL注入 | order by注入、筛选条件可控 |
| 自动补全/联想 | 信息泄露/用户枚举 | 补全接口泄露敏感数据 |
| 数据统计/图表 | SQL注入/越权 | 统计维度可控、跨权限聚合 |
| ES/Solr搜索 | 查询注入/未授权 | DSL注入、搜索接口暴露 |
三、接口 Fuzz 技巧(参数污染与类型混淆)
参数污染:
?id=1&id=2 → 看哪个生效
?id[]=1&id[]=2 → 数组化
?id=1,2,3 → 批量查询
类型混淆:
id=1 → id="1" → id={"$gt":0} → id[]=1
编码绕过:
Unicode: \u002e\u002e/ (../)
双重URL编码: %252e%252e%252f
隐藏参数:
debug=1 / test=1 / admin=1
_method=PUT / X-HTTP-Method-Override
批量操作:
ids=1,2,3,4,5 一次查多个
page=-1 / limit=99999 绕过分页
四、SQL 注入绕过技术
大小写:SeLeCt / 双写:selselectect
注释:/**/、/*!*/、--+、#
编码:URL编码、十六进制、Unicode
等价函数:substr→mid、ascii→ord
五、命令注入绕过技术
分隔符:| / || / & / && / ; / %0a
空格:${IFS} / $IFS$9 / %09 / {cat,/etc/passwd}
通配符:/???/??t /etc/passwd
六、验证要点
- 响应差异对比:基线请求 vs 注入请求的状态码/响应大小/错误信息/响应时间
- 时间盲注:
SLEEP(5)/pg_sleep(5)/WAITFOR DELAY '0:0:5'验证 - 报错注入:
updatexml/extractvalue/ 类型转换错误 - NoSQL:
{"$ne":null}、{"$where":"1==1"}、数组/类型替换 - SSTI:
{{7*7}}、${7*7}、<%= 7*7 %>探测 - 命令注入:
id、whoami、DNSLog 外带 - 所有注入点至少尝试到 Level 4 绕过(见 CLAUDE.md 1.1 第五节)
七、修复建议
- SQL:预编译/参数化查询,动态排序用白名单映射
- NoSQL:禁止
$运算符进入查询条件,类型强校验 - 命令:白名单命令 + 参数数组传递,禁止 shell 拼接
- SSTI:模板引擎关闭危险特性(Jinja2 禁用
__class__链) - 表达式:禁止用户可控片段进入 SpEL/OGNL/EL 解释器
八、输出与报告要点
- 完整 PoC(curl 命令),标注注入点参数与 payload
- 差异对比证据(基线响应 vs 注入响应)
- 影响面:可读取的库表、可执行的命令、可拿到的数据量
- 根因分析:输入点 → 传播链 → Sink
Version history
-
v2.1.0
GitHub ↗
Original release notes
## 一句话 新增 **`kb/` 结构化数据层**(664 CVE / 237 字典 / 69 载荷)与 **内网/域技能包 `internal-network`**(10 块),`cloud-infra` 扩充 10 块;全局路由、纪律、索引同步接线,并修掉 7 个超限知识块与存量死链。 ## 新增 - **数据层 `kb/`**:`vuln/` 664 条 CVE(ai/cloud/middleware/network/web)、`dict/` 237 个字典(368 万行)、`payload/` 69 个载荷;4 个自动索引 + `tools/kb_index.py`(`--check` 做一致性闸,不参与默认加载) - **`internal-network`(内网/域)**:域侦察与决策树、Kerberos、委派/ACL/ADCS、凭据/中继/投毒、横向移动、隧道多跳、后渗透提权、持久化、内网基础设施(Exchange/SCCM/OA/DB/中间件)、工具投递 - **`kb-security-data`**:CVE / 字典 / payload 检索入口(30 秒分诊 + 证据纪律) - **`cloud-infra` +10 块**:多云概览、AWS IAM 提权、Azure/GCP、国内云、云凭据/IAM/元数据、K8s 逃逸与集群、K8s 组件/网络/存储、容器运行时、对象存储/Serverless、CI-CD/供应链/IaC - **战法索引-08-内网与域**(22 行首枪表)、`rules/55-kb-usage.md`、`templates/SEEDS.template.md` - **`docs/CHANGELOG.md`**:v2.1 完整更新记录 ## 变更 - `AGENTS.md`(10 秒决策 + 文件地图)、`rules/70`、`docs/TRIGGER-MATRIX.md`、`ck-router`(分诊/索引/进站决策)、`README.md`、`docs/ARCHITECTURE.md`(六层结构)全部接线 - 技能包 16 → **18**,知识块 **501**,规则 11 → **12** ## 修复 - 7 个超过 12KB 的知识块按「索引 + 分段」拆分(原文件名保留,新增 `-b` 分段) - 存量死链、kb 相对路径、索引兜底计数、CTF 导向表述清理 ## 验收 - 单块 ≤12KB:0 超限;SKILL.md 全部达标;死链 0 - `python3 tools/kb_index.py --check` → OK(664 / 237 / 69) - 常驻层 `AGENTS.md` 5.4KB(限 6.5KB) ## 升级方式 更新仓库后运行 `python3 tools/kb_index.py --check` 确认索引一致;用法见 `docs/CHANGELOG.md` 第 5 节与 `README.md`「数据层 kb/」小节。
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 覆盖 SQL/NoSQL/命令/SSTI/表达式注入等主流高危漏洞类型
- 提供详细的 Fuzz 技巧和绕过技术
- 适用于高频场景的深度挖掘
Highlights
- 触发条件清晰,覆盖多种变体
- 命中场景具体,边界清晰
Highlights
- 结构完整,Phase/步骤清晰
- 包含端到端示例和修复建议
- frontmatter 完整
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常情况
- 不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.