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.
npx agentmods add instructions/summersec/shiroattack2/claude-mdgit clone --depth 1 https://github.com/SummerSec/ShiroAttack2What 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01128 | $0.01128 |
| Opus 5 | $0.00564 | $0.00564 |
| Sonnet 5 | $0.00226 | $0.00226 |
| Haiku 4.5 | $0.00113 | $0.00113 |
Grade A, and why
ShiroAttack2 CLAUDE.md 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 3d 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.
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.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build & Run
# 前置步骤:安装本地 JAR 到 Maven(仅首次需要)
mvn install:install-file -Dfile=libs/jEG-Core-1.0.0.jar -DgroupId=jeg -DartifactId=jeg-core -Dversion=1.0.0 -Dpackaging=jar
mvn install:install-file -Dfile=libs/jmg-sdk-1.0.9.jar -DgroupId=jmg -DartifactId=jmg-sdk -Dversion=1.0.9 -Dpackaging=jar
# 打包为可执行 fat JAR(含所有依赖)
mvn clean package -DskipTests
# 产物路径: target/shiro_attack-5.1.1-all.jar
# 运行 CLI(命令行模式,无需 GUI)
java -cp target/shiro_attack-5.1.1-all.jar com.summersec.attack.CLI.MainCLI <command> [options]
# CLI 可用命令: detect | crack | exec | memshell | changekey | gui
# 详见 .claude/skills/shiro-attack-cli/SKILL.md
# 运行(需要 JavaFX 运行时,Java 8)
java -jar target/shiro_attack-5.1.1-all.jar
本项目无测试套件;仅有 GitHub Release CI(推送 tag 触发)。
插件市场
本项目同时也是 Claude Code 插件市场,通过 .claude-plugin/marketplace.json 注册了 shiro-attack-cli 技能。
# 安装(来源为 GitHub)
claude plugins add github:SummerSec/ShiroAttack2
支持平台:Claude Code (.claude-plugin/)、Codex CLI (.codex-plugin/)、Cursor (.cursor-plugin/)。skill 源文件在 skills/shiro-attack-cli/SKILL.md。
架构概述
ShiroAttack2 是一个利用 Apache Shiro rememberMe AES 反序列化漏洞(Shiro-550)的 JavaFX GUI 工具。
攻击流程
- 密钥爆破 —
deser/plugins/keytest/KeyEcho.java将SimplePrincipalCollection序列化后用候选密钥(resources/data/shiro_key.txt)逐一加密,通过响应判断有效密钥 - Gadget 链选择 — 用户在 UI 中选择适合目标 classpath 的
CommonsBeanutils变体(1.8.3 / 1.9.2 / AttrCompare) - 回显类型选择 — Tomcat / Spring / DFS-AllEcho / NoEcho / 反弹 Shell
- Payload 构造 —
deser/util/Gadgets.java用 Javassist 将回显类嵌入TemplatesImpltranslet,Gadget 链包装后序列化 - 加密发送 —
Encrypt/CbcEncrypt.java(AES-CBC)或Encrypt/GcmEncrypt.java(AES-GCM)加密后 Base64 编码,写入 rememberMe cookie 发送
主要包职责
| 包 | 职责 |
|---|---|
attack.UI |
JavaFX 入口 (Main) 和主窗口控制器 |
attack.core |
AttackService — 串联爆破、Gadget、加密、发送的编排层 |
attack.Encrypt |
AES-CBC / AES-GCM 加密;KeyGenerator 生成新密钥 |
attack.deser.payloads |
CommonsBeanutils gadget 链实现 |
attack.deser.echo |
各平台回显 Payload 生成(Tomcat/Spring/DFS/Reverse/NoEcho) |
attack.deser.plugins |
内存马注入(InjectMemTool)、密钥探测(KeyEcho) |
attack.deser.frame |
Shiro cookie 序列化/加密封装 |
attack.deser.util |
Gadgets(TemplatesImpl 构造)、反射工具、JavaVersion |
attack.utils |
HTTP 请求(Hutool)、AES 工具、控制台输出 |
attack.entity |
ControllersFactory(JavaFX 控制器注册表)、RequestInfo |
org.apache.shiro.* |
内嵌 Shiro 加密源码(AesCipherService 等),便于定制 |
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.
- 3d ago First seen · 73 lines · 1,128 tokens per session scan A 703d8284f1e5
ShiroAttack2 CLAUDE.md is an instructions file published in the GitHub repository SummerSec/ShiroAttack2 (2,622 stars, last pushed 3mo ago), licensed MIT. It adds 1,128 tokens to every session, about $0.0056 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-08-30.
Other instructions, from other repositories
liteflow CLAUDE.md
Instructions for dromara/liteflow, covering claude.md, 概述, 命令, 构建 and 构建整个项目(模块集由 jdk 版本自动选择 —— 见下方说明).
java_upgrade CLAUDE.md
Instructions for kousen/java_upgrade, covering project context for claude code, project structure, key features, recently added exercises and java features covered.
sivalabs-agent-skills AGENTS.md
Instructions for sivaprasadreddy/sivalabs-agent-skills, covering agent instructions, installation methods, method 1: claude code plugin installation, add the agent-skills marketplace and install plugins.
quarkus-agentic-scaffolding AGENTS.md
Instructions for eldermoraes/quarkus-agentic-scaffolding, covering quarkus + langchain4j + ai stack - project conventions, version: 0.21.0, 1. required tooling (mandatory), 2. java conventions and 3. quarkus conventions.
Flydb AGENTS.md
Instructions for zzxCoding/Flydb, covering flydb 仓库 agent 指引, 1. 开始工作前, 2. 仓库结构与版本边界, 3. 修改规则 and 4. 构建与验证.
recaf-mcp AGENTS.md
Instructions for tha23rd/recaf-mcp, covering project overview, architecture, build & test, release flow and key conventions.