ShiroAttack2 is a security-testing tool for detecting and exploiting the Shiro-550 deserialization vulnerability in Apache Shiro applications. Authorized security testers use its command-line and JavaFX interfaces to test targets, validate keys, execute commands, and perform related post-exploitation actions. The catalogue entries include instructions, a plugin, and a skill for operating the tool.
Borrowing it
Nothing to install: this file belongs to SummerSec/ShiroAttack2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/SummerSec/ShiroAttack2/master/CLAUDE.mdgit clone --depth 1 https://github.com/SummerSec/ShiroAttack2Wrote 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.
[](https://agentmods.dev/instructions/summersec/shiroattack2/claude-md)<a href="https://agentmods.dev/instructions/summersec/shiroattack2/claude-md"><img src="https://agentmods.dev/badge/instructions/summersec/shiroattack2/claude-md/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.
<a href="https://agentmods.dev/instructions/summersec/shiroattack2/claude-md"><img src="https://agentmods.dev/badge/instructions/summersec/shiroattack2/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01128 | $0.01128 |
| Opus 5.5 | $0.00451 | $0.00451 |
| Sonnet 5.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 1mo 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.
- 1mo 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,634 stars, last pushed 4mo ago), licensed MIT. It adds 1,128 tokens to every session, about $0.0045 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.