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.
npx skills add dslsdzc/rev-skills --skill re-emulationgit clone --depth 1 https://github.com/dslsdzc/rev-skillsWrote 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/skills/dslsdzc/rev-skills/re-emulation)<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-emulation"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-emulation/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/skills/dslsdzc/rev-skills/re-emulation"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-emulation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00036 | $0.03186 |
| Opus 5 | $0.00018 | $0.01593 |
| Sonnet 5 | $0.00007 | $0.00637 |
| Haiku 4.5 | $0.00004 | $0.00319 |
Grade A, and why
re-emulation 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.
How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
模拟执行(Unicorn / Qiling)
何时使用 / 何时不用
- 用:目标无法在本机运行(架构/OS 不匹配、无硬件、依赖缺失);脱壳辅助(把壳内解密例程摘出来模拟执行拿明文);反调试绕过(模拟器无调试器标记,见坑 2 的例外);单函数/单代码段隔离执行验证
- 用:不需要完整 OS 语义(无进程/线程/网络栈依赖)的确定性任务
- 不用:需要完整 OS 环境(多线程、网络栈、完整 API 语义)→ 用 QEMU 全系统([[re-fw-emulate]])或沙箱实跑([[re-sandbox]])
- 不用:只需动态调试([[re-gdb]] / [[re-x64dbg]] / [[re-windbg]])
- 不用:目标在本机就能跑——沙箱内直接跑更真实([[platform-tips]] 最高原则),模拟留给出不来环境的场景
工具准备
模拟执行属动态执行,默认沙箱 + 网络隔离([[platform-tips]] 最高原则);本技能三件套均为 pip 包,Linux/macOS/Windows 通用,WSL 内可直接用([[platform-tips]] WSL 分支)。
unicorn
- 安装:
pip install unicorn(Python 3) - 验证:
python3 -c "import unicorn; print(unicorn.__version__)" - 版本: 2.x 为当前线(2.1.4 于 2025-09);2.x 钩子回调签名与 1.x 一致(
(uc, address, size, user_data)),pip 默认装 2.x;1.x→2.x 差异见 [[gotchas]]
qiling(依赖 unicorn / capstone / pefile,自动装)
- 安装:
pip install qiling(当前 1.4.x) - 验证:
python3 -c "import qiling; print(qiling.__version__)"(纯 import 验证,零依赖;pip wheel 不含 examples/ 与 rootfs,跑示例需 git clone 官方仓库获取)
capstone(反汇编/解码输出用)
- 安装:
pip install capstone - 验证:
python3 -c "import capstone; print(capstone.__version__)"
操作步骤
按顺序执行,每步记下结果;模拟产物(内存快照/明文段)sha256 存档([[re-triage]] 存证思路)。
-
场景判断:
- 目标是什么、模拟解决什么问题——脱壳辅助(壳的解密例程是单函数,模拟执行该例程即可得明文,不用完整跑壳)?反调试绕过(样本检测调试器但可能不检测模拟器,见坑 2)?无环境运行(架构不匹配/缺 OS)?
- 选工具: 只跑代码段/单函数 → Unicorn(最小、可控);要文件/系统调用语义 → Qiling(自动处理系统调用);要完整 OS → 转 [[re-fw-emulate]]
-
Unicorn 最小框架:
from unicorn import * from unicorn.x86_const import * CODE = bytes.fromhex("b8 2a 00 00 00 c3") # mov eax, 0x2a; ret mu = Uc(UC_ARCH_X86, UC_MODE_32) mu.mem_map(0x1000, 0x1000) # 先映射一页(地址页对齐) mu.mem_write(0x1000, CODE) mu.reg_write(UC_X86_REG_ESP, 0x2000) # 设好栈(不设 ESP 会崩) mu.emu_start(0x1000, 0x1000 + len(CODE)) # 执行到结束地址 print(hex(mu.reg_read(UC_X86_REG_EAX))) # 0x2a要点: 内存必须
mem_map(页对齐)再mem_write;栈寄存器必须设;emu_start(begin, until)的 until 要覆盖代码结束地址,否则跑到非法地址 -
Qiling 全系统模拟:
from qiling import Qiling ql = Qiling(["rootfs/x8664_linux/bin/x8664_hello"], "rootfs/x8664_linux") # 文件名以实际 rootfs 为准;examples/ 与 rootfs 需 git clone 官方仓库获取(pip 不含) ql.run()- rootfs: pip 不含 examples/ 与 rootfs,需 git clone qiling 官方仓库后取
qiling/examples/rootfs/(x8664_linux、arm_linux、x86_windows 等);自制 rootfs 时拷贝目标程序的 libc/ld-linux 与运行期文件进去 - 文件/系统调用由 Qiling 接管(open/read/write 映射到 rootfs),比 Unicorn 省心(坑 1 的对策)
- Windows 程序:
Qiling(["sample.exe"], "rootfs/x86_windows")(该 rootfs 含 wine 基础环境,较重但可用)
- rootfs: pip 不含 examples/ 与 rootfs,需 git clone qiling 官方仓库后取
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.
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.
- 9d ago First seen · 114 lines · 36 tokens per session scan A 09925f0a52a4
re-emulation is a skill published in the GitHub repository dslsdzc/rev-skills (50 stars, last pushed 11d ago), licensed Apache-2.0. It adds 36 tokens to every session and 3,186 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
Reverse Engineering & Binary Analysis
Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.
deobfuscating-powershell-obfuscated-malware
Systematically deobfuscates multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure. Use during incident response or malware analysis when a PowerShell script is obfuscated with encoding, string manipulation, or…
conducting-malware-incident-response
Respond to malware infections across enterprise endpoints by identifying the malware family, determining infection vectors, assessing spread, and executing containment, analysis, eradication, and recovery procedures aligned to MITRE ATT&CK. Use when responding to a confirmed or suspected malware infection, including…
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…
analyzing-network-covert-channels-in-malware
Detect and analyze covert communication channels used by malware, including DNS tunneling, ICMP exfiltration, steganographic HTTP, and other protocol abuse used for C2 and data exfiltration. Use when investigating suspicious DNS/ICMP/HTTP traffic patterns, hunting for hidden C2 channels in network captures, or…
analyzing-golang-malware-with-ghidra
Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.