re-tee

re-tee is a skill for Claude Code from dslsdzc/rev-skills. It costs 73 tokens per session (4,557 once invoked), scanned A, original, Apache-2.0.

A guide to reverse-engineering trusted execution environments, protected areas of a device that handle sensitive code and data separately from the main operating system. It focuses on TrustZone, OP-TEE, trusted applications, secure storage, and device keys.

In plain words
What is it for?
Use it to examine firmware containing a TEE, recover trusted-application command flows, study SMC and driver calls, and assess embedded-device trust boundaries.
Why use it?
Security-sensitive operations may be hidden behind calls between the normal and protected parts of a device. This guide helps trace those interfaces and understand how keys, storage, and trusted applications are protected.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to examine firmware containing a TEE, recover trusted-application command flows, study SMC and driver calls, and assess embedded-device trust boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dslsdzc/rev-skills/re-tee
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.

Any agent
npx skills add dslsdzc/rev-skills --skill re-tee
Clone the repo
git clone --depth 1 https://github.com/dslsdzc/rev-skills

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 re-tee

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-tee/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-tee)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-tee"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-tee/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 re-tee

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-tee"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-tee.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,557 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00073 $0.04557
Opus 5 $0.00036 $0.02278
Sonnet 5 $0.00015 $0.00911
Haiku 4.5 $0.00007 $0.00456

Measured 9d ago against content hash 4795ad063965, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

re-tee 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 9d 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/skills/re-tee/SKILL.md · 121 lines

How it starts

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

TEE / TrustZone 逆向(OP-TEE / Trusted App / secure storage)

何时使用 / 何时不用

  • 用:TrustZone/OP-TEE 类 TEE 分析——可信应用(Trusted App)逆向、命令分发表还原、secure storage(安全存储/设备密钥)对象与数据流
  • 用:设备密钥/信任根方向——DRM 硬件信任根([[re-drm]] 的 L1 类)、设备密钥提取与保护机制(授权研究)
  • 用:TEE 接口面——SMC 调用、主机侧 TEE 驱动 ioctl、client 库调用序列还原
  • 用:固件安全评估——评估目标设备 TEE 实现的接口暴露面、存储保护强度与信任根边界
  • 不用:普通 App 层(走 [[re-mobile]]);Windows 内核/驱动(走 [[re-kernel]],TEE 侧是 Linux/ARM 域)
  • 不用:纯固件提取解包(先走 [[re-fw-extract]],本技能在其后分析 TEE 组件)
  • 不用:目标只是普通加密数据(走 [[re-crypto-*]] 系列,无 TEE 组件时不必进本技能)
  • 不用:仅需判定「设备是否用了 TEE」(无镜像、无调用面可分析)——特征级证据即可,不进深度流程
  • 不用:EL2 hypervisor/虚拟化域(走 [[re-hypervisor]],TEE 是 EL1/EL3 域)
  • 注意:secure world 内动态调试通常不可行(见坑 3)——默认静态分析 + 主机侧观察;主机侧动态执行按 [[platform-tips]] 最高原则在沙箱内进行

工具准备

静态分析(镜像解析/反编译)免沙箱;主机侧动态(跑 client、hook ioctl)按 [[platform-tips]] 最高原则进沙箱;secure world 内动态不做(见坑 3),默认以静态 + 主机侧观察为主。

反编译工作台([[re-ghidra]] / [[re-ida]],ARM64)

  • [[re-ghidra]](默认):导入 TEE OS 镜像与 TA(.ta 需先切掉签名头,见步骤 2 与坑 5)
  • [[re-ida]]:备选;两者均需 ARM64 支持
  • 验证: 能反编译 ARM64 代码,定位 smc 指令调用点与 TA_InvokeCommandEntryPoint 类分发表

固件提取工具链([[re-fw-extract]])

  • binwalk/unblob、magic 扫描、字节序判断——从 bootrom/启动链/设备固件中定位并提取 TEE OS 与 TA 镜像
  • 验证: binwalk --version(安装命令见 [[re-fw-extract]]「工具准备」)

python3(二进制解析/脚本)

  • Linux: apt install python3 / dnf install python3 / pacman -S python;macOS: 自带;Windows: 官方安装器或 choco install python
  • 验证: python3 --version
  • 用途: 签名头/ELF 载荷切分解析、结构字段标注、解密还原脚本(衔接 [[re-crypto-decrypt]])

参考实现(OP-TEE 官方开源,理解结构用)

  • 官方仓库 optee_os / optee_client / optee_examples(与 qemu 仿真环境)提供 TEE 结构与调用序列的权威参照——分析目标与 OP-TEE 差异时按官方源码核对,不凭经验值
  • qemu 仿真环境可跑通 client → TA 全链路调用,用于对照调用序列与参数布局;仿真与真机的差异(真实驱动/中断/存储介质)以真机为准

frida / 主机侧观察([[re-frida]])

  • 主机侧动态:hook client 库调用序列与 ioctl 参数(frida 安装与沙箱原则见 [[re-frida]],动态执行默认沙箱)
  • 验证: frida --version

操作步骤

按顺序执行,每步产物(镜像定位、头结构标注、命令号表)记录证据路径 + sha256(见 [[re-triage]]),供报告引用。

  1. 架构定位(world 划分 / SMC / TEE OS 入口)
    • TrustZone 划分 normal world(普通世界,NS)与 secure world(安全世界,S);ARMv8-A 中 TEE OS 通常运行在 secure EL1,可信应用在 secure EL0,EL3 监控层(monitor)承载安全监控固件(如 ATF BL31 类启动固件,泛化)
    • SMC 指令是 normal world 进入 secure world 的通道:AArch64 为 smc #imm(AArch32 为 smc),从 EL1/EL2 执行即陷入 EL3 监控层,监控层再分发给 TEE OS;反编译中搜 smc 指令即调用面落点
    • SMC 参数约定(SMCCC):功能号在 w0(含服务/调用约定标识位),参数在 w1-w7(SMC32)或 x1-x17(SMC64),返回值从 w0 起——标注调用点按约定表读寄存器,不按普通 ABI 猜(见坑 4)
    • 特征侦查:版本字符串、导出 API 字符串表、SMC 功能号常量表先 grep 定位——字符串表往往直接给出 TEE OS 类型与版本,比逐个反编译快
    • 定位 TEE OS 加载入口:bootrom → 启动固件 → TEE OS 镜像(镜像头 magic、加载/验签代码)——沿启动链搜 TEE 镜像特征(镜像头魔数、版本字符串、导出 API 字符串表);TEE OS 也可内嵌于设备固件分区([[re-fw-extract]] 提取后定位)
    • 产物:world/EL 划分图 + TEE OS 镜像位置与加载入口

Read the full file on GitHub · 121 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 121 lines · 73 tokens per session scan A 4795ad063965

Subscribe to this mod's changes

re-tee is a skill published in the GitHub repository dslsdzc/rev-skills (54 stars, last pushed 14d ago), licensed Apache-2.0. It adds 73 tokens to every session and 4,557 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

Youngmaidainon/Agent-Level-Up · 95 tokens

reverse-engineering-arm-binaries

Reverse engineers ARM/AArch64 malware by identifying the architecture and instruction set state (ARM/Thumb), parsing ELF/Mach-O ARM headers, and orienting analysis around the ARM calling convention. Activates for requests to reverse ARM binaries, analyze AArch64 malware, or handle ARM/Thumb instruction-set decoding.

meltedinhex/analyst-ai-pack · 69 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

tradecatlabs/vibe-coding-cn · 95 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

mukul975/Anthropic-Cybersecurity-Skills · 95 tokens

Reverse Engineering & Binary Analysis

Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

ot-ics-attack

A guide to assessing operational technology and industrial control systems such as SCADA, DCS, and PLC environments. These systems monitor and control physical processes and often use specialized network protocols.

wgpsec/AboutSecurity · 81 tokens