# Tiny Tracer API 调用跟踪工具

> hasherezade 开发的 Intel Pin 插桩工具，在 Windows 或 Linux 上跟踪运行中的 32 位或 64 位程序，记录 API 调用（对监视的函数还会记录参数和返回值）、指定的本地函数和静态链接库函数、内联系统调用、RDTSC、CPUID 和 INT 指令，以及被跟踪模块各节区之间的跳转，有助于找到加壳模块的原始入口点。它可以继续跟踪模块解包到新内存中的代码，对选定范围进行反汇编，并可在 Windows 上标记样本执行的反调试和反虚拟机检查。每次运行都会生成由“RVA;事件”行组成的 .tag 文件，PE-bear 可直接读取，Wiki 还演示了将其导入 IDA Pro、Binary Ninja、x64dbg、Ghidra 和 Cutter 以标注代码。

- 类型：工具
- 目标：二进制
- 类别：调试与动态分析
- 关联：基础工具
- 来源复核于：2026-10-20
- 收录于：2026-11-02
- 原始资源：<https://github.com/hasherezade/tiny_tracer>
- 一手来源：<https://github.com/hasherezade/tiny_tracer/blob/99618fc0569a4a06b7955e507e1707792ad1bef5/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/tiny-tracer/>
- 记录 JSON：<https://awesomerea.org/resources/tiny-tracer/record.json>
- 英文版：[English](https://awesomerea.org/resources/tiny-tracer/index.md)

## 使用条件与局限

- 审阅时的版本为 4.0，发布于 2026-05-28，已针对 Intel Pin 4.x 重构；所审阅的 master 提交比该版本多两个提交。发布版本只提供源码，因为发布说明和安装指南指出，Pin 的许可不允许分发编译好的 Pin 工具。使用者需自行下载 Pin，并在 Pin 的 source/tools 目录下构建本工具；README 称已测试的版本为 Pin 4.2，Pin 4.0 以前的版本需使用 4.0 之前的发布版本及其旧版构建方式，Windows 8 以前的系统同样需要旧版构建。
- Windows 构建使用 MSYS2 的 make 和 clang-cl，Visual Studio 2019 及以上版本可选用作编辑器；Linux 构建使用 g++ 和 make。两种构建脚本都会在 install32_64 中生成 32 位和 64 位版本，该目录还包含配合右键菜单 .reg 文件使用的 run_me.bat、用于附加到运行中进程的 pin_attach.bat、Linux 上使用的 tiny_runner.sh，以及 TinyTracer.ini、params.txt 和 excluded.txt 配置文件。README 指出必须禁用内核调试，Pin 才能正常工作。
- install32_64 中还提交了作者预编译的 Windows 辅助程序 dll_load32.exe、dll_load64.exe、kdb_check.exe、pe_check.exe 和 syscall_extract.exe，其源码位于独立的 hasherezade/pe_utils 仓库；README 提到 Windows Defender 有时会将 kdb_check.exe 误报为恶意软件，这是已知的误报。反调试与反虚拟机模式仅支持 Windows，文档称深度反调试模式可能产生误报。被跟踪的程序由分析人员自行提供，并在 Pin 下原生执行。
- LICENSE.txt 采用 GPL-2.0；Intel Pin 沿用其自身许可。跟踪结果只覆盖本次运行中实际执行的代码。

## 一手来源

1. <https://github.com/hasherezade/tiny_tracer/blob/99618fc0569a4a06b7955e507e1707792ad1bef5/README.md>
2. <https://github.com/hasherezade/tiny_tracer/wiki/Installation/bfcee7fad835f06437b3a6c2410cc38d276b855b>
3. <https://github.com/hasherezade/tiny_tracer/wiki/The-INI-file/e48e12d46454008e8d2a1b55a247329c554cc4b7>
4. <https://github.com/hasherezade/tiny_tracer/wiki/Using-the-TAGs-with-disassemblers-and-debuggers/215f7cae78a12ffdc1f646000e216fdb517658cd>
5. <https://github.com/hasherezade/tiny_tracer/wiki/Tracing-shellcodes/4f8169a1a84f11f773b148f65913fdc486e5c1b9>
6. <https://github.com/hasherezade/tiny_tracer/blob/99618fc0569a4a06b7955e507e1707792ad1bef5/install32_64/README.md>
7. <https://github.com/hasherezade/tiny_tracer/tree/99618fc0569a4a06b7955e507e1707792ad1bef5/install32_64>
8. <https://github.com/hasherezade/tiny_tracer/blob/99618fc0569a4a06b7955e507e1707792ad1bef5/LICENSE.txt>
9. <https://github.com/hasherezade/tiny_tracer/releases/tag/4.0>

## 同分区更多条目：原生二进制

- [Ponce IDA 符号执行与污点分析插件](https://awesomerea.org/zh/resources/ponce/index.md) · 工具
- [DRAKVUF Sandbox 虚拟机监控器级恶意软件分析沙箱](https://awesomerea.org/zh/resources/drakvuf-sandbox/index.md) · 工具
- [HexRaysPyTools 结构体重建插件](https://awesomerea.org/zh/resources/hexrayspytools/index.md) · 工具
- [CAPEv2 恶意软件沙箱](https://awesomerea.org/zh/resources/capev2/index.md) · 工具
- [LuaDec：Lua 字节码反编译器](https://awesomerea.org/zh/resources/luadec/index.md) · 工具
- [xpcspy XPC 消息拦截工具](https://awesomerea.org/zh/resources/xpcspy/index.md) · 工具

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
