shiro-exploitation
Apache Shiro安全框架深度利用专业技能v3.0:rememberMe Cookie AES-CBC/CBC-GCM双模式深挖、密钥爆破方法论升级(Padding Oracle深度解密原理/工具选型/并行加速)、Gadget链版本兼容矩阵、Shiro-550/721、认证绕过全系列(CVE-2020-1957…
Skill by langbyyi
Chalk Labs
Need help deploying shiro-exploitation?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/langbyyi-shiro-exploitation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/shiro-exploitation
What's inside
- Skill name
shiro-exploitation- Description
- Apache Shiro安全框架深度利用专业技能v3.0:rememberMe Cookie AES-CBC/CBC-GCM双模式深挖、密钥爆破方法论升级(Padding Oracle深度解密原理/工具选型/并行加速)、Gadget链版本兼容矩阵、Shiro-550/721、认证绕过全系列(CVE-2020-1957至CVE-2026-56091)、Tomcat内存马/错链回显、Shiro+Fastjson/Log4j组合链、Spring Boot生态实战面、AI大模型辅助攻击载荷生成与配置审计、从指纹识别到RCE完整攻击链
- License
- Apache-2.0
- Metadata
- version: 3.0.0
- Instructions
- 1,101 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 1101 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Apache Shiro反序列化漏洞深度利用技能(v3.0.0) > **AI LOAD INSTRUCTION**: Apache Shiro 深度利用专家打法。按已知前提:Java 反序列化与 AES 基础。聚焦 rememberMe 模式判定→key 爆破→gadget 链兼容选型→出网/不出网/回显/内存马,含认证绕过 CVE 系列路由(CVE-2020-1957 → CVE-2026-56091)。 ## 概述 Apache Shiro是Java领域使用最广泛的安全框架之一,其`rememberMe`功能通过AES加密将用户身份序列化数据存储在Cookie中。当使用硬编码密钥(Hardcoded Key)时,攻击者可构造恶意rememberMe Cookie实现**反序列化RCE**;即使密钥不可知,CBC模式下的**Padding Oracle攻击**(Shiro-721)也可在无需密钥的情况下构造恶意密文。本技能站在资深攻防专家视角,系统化覆盖**精确指纹识别→加密模式判定→密钥爆破→Gadget链选择→认证绕过→组合链利用→内存马/回显→WAF绕过→RCE**完整攻击链,并深度融合**AI大模型辅助攻击**与**2025-2026最新漏洞情报**。 ### 核心概念 - `rememberMe` Cookie:Base64编码的AES加密Java序列化数据,本质是"可被伪造的身份凭证" - **CBC模式**:Shiro <1.4.2默认使用AES/CBC/PKCS5Padding,**IV固定为密钥本身的前16字节**(CVE-2016-4437根因之一) - **GCM模式**:Shiro >=1.4.2默认使用AES/GCM/NoPadding,每次随机IV(更安全的默认模式) - Key:16字节(128位)AES密钥,Base64编码存储 - 默认Key:`kPH+bIxk5D2deZiIxcaaaA==`(Shiro 1.2.4及之前硬编码在源码`AbstractRememberMeManager.DEFAULT_CIPHER_KEY_BYTES`,大量项目沿用至今) - **认证绕过 ≠ 反序列化**:Shiro还有一整套URL路径解析差异导致的认证绕过家族,可与反序列化RCE叠加打出"未授权直达RCE" - **版本生命周期**:Shiro v1已于2024-02-28被v2取代,v2于2026-06-29被v3取代(v3.0.0修复2026年新披露CVE) ### 安全演进时间线 | 时间 | 编号 | 类型 | 影响/修复 | 突破/防御要点 | |------|------|------|----------|--------------| | 2016-06 | CVE-2016-4437 (Shiro-550) | 反序列化RCE | <1.2.5,修复:随机Key | 硬编码Key `kPH+bIxk5D2deZiIxcaaaA==`,至今仍是最大入口 | | 2019-08 | CVE-2019-12422 (Shiro-721) | Padding Oracle | <1.4.2,修复:默认GCM | CBC+固定IV,无需Key即可构造密文,需合法Cookie+海量请求 | | 2020-03 | CVE-2020-1957 | 认证绕过 | <1.5.2,`/xxx/..;/admin/` | Shiro与Spring对分号/路径规范化处理差异 | | 2020-05 | CVE-2020-11989 | 认证绕过 | <1.5.3 | `%2F`双编码斜杠绕过 | | 2020-06 | CVE-2020-11988 | 认证绕过 | 1957修复不彻底变体 | 分号/路径解析差异族 | | 2020-08 | CVE-2020-13933 | 认证绕过 | <1.6.0 | `%3B`编码分号绕过 | | 2020-11 | CVE-2020-17510 | 认证绕过 | <1.7.0 | `%2e`点号编码绕过 | | 2020-12 | CVE-2020-17523 | 认证绕过 | <1.7.1 | 路径末尾空格绕过 | | 2021-08 | CVE-2021-41303 | 认证绕过 | <1.8.0 | AntPathMatcher匹配差异(星号/多段) | | 2023-01 | CVE-2023-22602 | 认证绕过 | Spring AntPathMatcher配置差异 | `?`通配符与路径规范化 | | 2023-07 | CVE-2023-34478 | 路径遍历→认证绕过 | <1.12.0,CVSS 9.8 | 与API/非标准化路由框架组合 | | 2023-11 | CVE-2023-46749 | 路径穿越→认证绕过 | <1.13.0,需`blockSemicolon=false`+path rewriting | `/file/anonUser/..%3b` | | 2023-11 | CVE-2023-46750 | 开放重定向 | <1.13.0,form认证 | 登录跳转URL校验缺失 | | 2026-02 | CVE-2026-23901 | 用户名枚举(时间侧信道) | 1.x全部、2.x<2.0.7 | 用户不存在/存在时密码哈希耗时差异 | | 2026-02 | CVE-2026-23903 | 认证绕过(大小写) | <2.0.7,仅静态文件+大小写不敏感文件系统 | 请求路径大小写变化绕过小写filter | | 2026-02 | CVE-2026-23903同批 | 认证绕过 | 2.x系列 | 需跟踪官方公告 | | 2026-06 | CVE-2026-56091 | 认证绕过(guice模块) | 全部2.x及3.0.0-alpha-1,修复3.0.0 | 类似CVE-2020-1957但影响`shiro-guice` | | 2026-06 | CVE-2026-56130 | RememberMe Cookie重放 | 1.2.4~2.x及3.0.0-alpha-1 | **服务端不校验Cookie年龄**,过期Cookie可无限重放 | | 2026-06 | CVE-2026-49268/48589/44598/43827/43828 | 2026新披露系列 | 修复于2.x后续版本 | 关注`shiro.apache.org/security-reports`更新 | ## 一、Shiro指纹精确识别与版本判定 ### 1.1 基础指纹确认 | 指纹特征 | 检测方法 | |---------|---------| | `rememberMe` Cookie | 登录勾选"记住我"后观察响应Set-Cookie | | `deleteMe` Cookie | 发送无效rememberMe值,响应出现`Set-Cookie: rememberMe=deleteMe`即确认Shiro(**Shiro 1.x遇到非法Cookie必回deleteMe**) | | `JSESSIONID` | Shiro通常与JSESSIONID配合使用 | | 错误页面特征 | Shiro默认错误页面/登录跳转特征 | ```bash # 快速探测(ShiroAttack2 CLI) java -cp shiro_attack-5.1.1-all.jar com.summersec.attack.CLI.MainCLI detect -u http://target ``` ### 1.2 加密模式判定(CBC vs GCM) ``` # 发送deleteMe探测 GET / HTTP/1.1 Cookie: rememberMe=1 # 观察响应: # 如果rememberMe=deleteMe → 存在Shiro # Cookie长度固定(相同payload每次相同)→ CBC模式 # Cookie长度每次变化(随机IV)→ GCM模式 ``` | 特征 | CBC模式 | GCM模式 | |------|--------|--------| | Shiro版本 | <1.4.2 | >=1.4.2 | | 加密算法 | AES/CBC/PKCS5Padding | AES/GCM/NoPadding | | IV来源 | 密钥的前16字节 | 每次加密随机生成 | | Cookie长度 | 固定(相同payload) | 每次不同(随机IV) | | Cookie结构 | IV(16)+Ciphertext | IV(16)+Ciphertext+AuthTag(16) | | Padding | PKCS5Padding | NoPadding | | 解密错误 | `BadPaddingException` | `AEADBadTagException` | | 反序列化入口 | 均可触发`ObjectInputStream.readObject()` | 同左 | ### 1.3 多版本精确区分(进阶) 仅靠CBC/GCM只能粗分1.4.2前后,实战中需要更精确的版本定位: | 判定维度 | 方法 | 版本含义 | |---------|------|---------| | Cookie长度 | 有效rememberMe Cookie长度固定模式 | CBC模式 → <1.4.2 | | 认证绕过Payload回显 | 试各CVE payload(见第七章) | 定位1.5.2/1.5.3/1.6.0/1.7.0/1.8.0/1.13.0边界 | | 错误信息差异 | 触发反序列化错误观察异常类名/堆栈 | 可泄露精确版本号 | | 响应头差异 | 不同版本deleteMe Set-Cookie细节 | 经验特征 | | 依赖扫描 | Maven/Gradle依赖树、War包lib目录 | 最精确(白盒) | | JNDI探测 | 特定Gadget链是否命中 | 推断依赖版本(如CB1命中=存在commons-beanutils) | ```bash # 白盒/半白盒精确版本 mvn dependency:tree | grep shiro # 或直接查看War包 unzip -l app.war | grep -i shiro ``` ### 1.4 环境信息收集 - **JDK版本**:决定JNDI注入是否可行(RMI <=8u121,LDAP <=8u191;更高版本需Rogue-JNDI/tomcat EL);决定Jdk7u21链可用性;决定内存马注入方式 - **中间件类型**:Tomcat/Jetty/Undertow/Spring Boot内嵌,决定回显与内存马技术路线(Tomcat Filter/Valve、Spring Interceptor/HandlerMethod) - **启动方式**:Spring Boot FatJar(`java -jar`)→ LaunchedURLClassLoader;War部署→Tomcat容器ClassLoader(影响JNDI与BCEL链) - **第三方依赖**:commons-beanutils(Shiro自带,CB1链核心)/commons-collections3/4/c3p0等,决定Gadget链选择 - **网络出口**:决定出网(DNS/HTTP/JNDI外带)还是不出网(回显/内存马/写WebShell)利用路线 - **过滤器链配置**:shiro.ini或Spring Boot配置中`/**=authc`规则,同时是认证绕过利用的输入面 - **`blockSemicolon`状态**:默认开启,关闭时可配合CVE-2023-46749利用 ## 二、RememberMe机制与AES加密深度原理 ### 2.1 完整数据流(理解漏洞前提) ``` 登录成功(勾选rememberMe) → Subject身份信息(PrincipalCollection) Java序列化 → byte[] → AES加密(CBC: IV=Key[:16];GCM: 随机IV) → byte[] → Base64编码 → 写入rememberMe Cookie
From langbyyi/CyberStrikeAI-SRC, Apache-2.0.
More from langbyyi/CyberStrikeAI-SRC
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
csrf-cross-site-request-forgery
langbyyi
CSRF testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
clickjacking
langbyyi
Clickjacking playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
crlf-injection
langbyyi
CRLF injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cors-cross-origin-misconfiguration
langbyyi
CORS misconfiguration testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cmdi-command-injection
langbyyi
Command injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
dependency-confusion
langbyyi
Supply-chain testing via package-manager dependency confusion.
SkillAFreshness: A★ 131Claude Code +9
Signals
- Stars
- 131
- Forks
- 11
- Open issues
- 0
- Last commit (this folder)
- Sep 9, 2026 (1 month ago)
- Last release
- Oct 16, 2026 (15 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 3.0.0
- License
- Apache-2.0
- Repository
- github.com/langbyyi/CyberStrikeAI-SRC
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from langbyyi
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get shiro-exploitation running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
shiro-exploitation skill. Agent Mart. https://agentmart.dev/skills/langbyyi-shiro-exploitation (last updated 2026-10-24)