ShiroAttack2: Instructions file for Claude Code

CLAUDE.md

ShiroAttack2 CLAUDE.md is an instructions file for Claude Code from SummerSec/ShiroAttack2. It costs 1,128 tokens per session, scanned A, original, MIT.

A project instruction file for ShiroAttack2, a Java security tool that can run from the command line or with a graphical interface. It documents how to install local libraries, build the executable JAR, and run its commands.

In plain words
What is it for?
It is for building and running ShiroAttack2, using commands such as detection, password cracking, execution, memory-shell operations, and key changes, as well as managing its plugin entries.
Why use it?
It gives agents the project-specific setup and build commands needed to work with software that has local Maven dependencies and no test suite.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions CLAUDE.md.

This is SummerSec/ShiroAttack2's own configuration. It tells Claude Code how to work on ShiroAttack2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ShiroAttack2 configures →

About the project

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.

SummerSec/ShiroAttack2 · 2,634 stars · on GitHub

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/SummerSec/ShiroAttack2/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/SummerSec/ShiroAttack2

Made for: Claude Code.

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 ShiroAttack2 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/summersec/shiroattack2/claude-md/github.svg)](https://agentmods.dev/instructions/summersec/shiroattack2/claude-md)
Your own site
<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.

agentmods 80×15 button for ShiroAttack2 CLAUDE.md

Your own site · 80×15
<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>
Per session 1,128 This file is loaded in full into every session.
When invoked 1,128 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.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

Measured 1mo ago against content hash 703d8284f1e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

CLAUDE.md · 73 lines

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 工具。

攻击流程

  1. 密钥爆破 — deser/plugins/keytest/KeyEcho.java 将 SimplePrincipalCollection 序列化后用候选密钥(resources/data/shiro_key.txt)逐一加密,通过响应判断有效密钥
  2. Gadget 链选择 — 用户在 UI 中选择适合目标 classpath 的 CommonsBeanutils 变体(1.8.3 / 1.9.2 / AttrCompare)
  3. 回显类型选择 — Tomcat / Spring / DFS-AllEcho / NoEcho / 反弹 Shell
  4. Payload 构造 — deser/util/Gadgets.java 用 Javassist 将回显类嵌入 TemplatesImpl translet,Gadget 链包装后序列化
  5. 加密发送 — 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 等),便于定制

Read the full file on GitHub · 73 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. 1mo ago First seen · 73 lines · 1,128 tokens per session scan A 703d8284f1e5

Subscribe to this mod's changes

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.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,786 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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).

microsoft/vscode · 2,731 tokens

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.

denoland/deno · 3,077 tokens