chenxvb/Unicorn-Trace
À propos
基于 Unicorn 引擎的轻量级 ARM64 动态追踪模拟工具。支持 IDA Pro、生成 Tenet 日志、本地代码模拟、内存转储、寄存器状态追踪和指令级日志记录。
Sécurité et confidentialitéProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalUnicorn ARM64 Tracer (IDA + Offline)

Lightweight ARM64 tracing workflow based on Unicorn.
dyn_trace_ida.py: IDA plugin (interactive dump + trace)local_emu.py: offline replay / continuous replaysingle_script/dynamic_dump.py: single-file fallback script for IDA
Install
pip install unicorn capstone
Copy to IDA plugin directory:
dyn_trace_ida.pyunicorn_trace/
IDA Plugin (Current Behavior)
Open with Ctrl-Alt-U (Unicorn ARM64 Tracer).
The plugin window is a non-modal popup and stays on top.
Parameters
END addr: hex; relative to image base by defaultTPIDR: optionalBound start / Bound end: custom run rangeOutput path: output directoryenable Tenet: emit tenet logsend addr absolute: treat END as absolute address
Important UI Logic
- Auto range is from current PC executable segment.
Refresh Rangewill overwriteBound start/endwith current auto range.- Custom bound is always enabled (no extra toggle).
- A runtime log popup is available (
Show Log/Clear Log) and updates live during execution.
Input/Output Cache
Per-IDB cache is stored under user IDA directory (~/.idapro/...).
It restores last inputs and last output paths when reopening the plugin.
Usage Paths (Both Require Plugin Installation)
Both paths require dyn_trace_ida.py + unicorn_trace/ in IDA plugins.
Path A: Plugin GUI
- Press
Ctrl-Alt-Uin IDA. - Fill parameters in popup.
- Click
Run Tracer.
Path B: IDA Script
Run inside IDA Python:
# Option 1: execute script file directly in IDA
# File -> Script file... -> select dyn_trace_ida.py
# Option 2: import and call
import dyn_trace_ida
dyn_trace_ida.uni_trace_main(
endaddr_input=0x1234, # relative by default
tpidr_value_input=None,
enable_tenet=False,
user_path=".",
end_addr_absolute=False,
use_custom_bound=True,
bound_start=0x100000000,
bound_end=0x100010000,
)
Output Files
Under Output path:
uc_combine_<timestamp>.logdump_<timestamp>/regs.jsondump_<timestamp>/uc.logdump_<timestamp>/tenet.log(when Tenet enabled)tenet_combine_<timestamp>.log(when Tenet enabled)
Offline Replay
Use local_emu.py for replaying dumped data.

Common entry points:
run_once(...): replay one dump folderrun_all_continuous(...): replay multipledump_*folders in time order and merge logs
Quick example:
from local_emu import run_all_continuous
run_all_continuous(
dump_path="./tmp/report_list",
debug_switch=True,
)
See example.py for a hook-based example.
Workflow (Visual)

Notes
- The plugin still relies on
ida_dbg.run_to(...)in recovery paths; debugger events may switch IDA view/focus. - Disable unrelated breakpoints when tracing to reduce interference.
- If a run fails midway, previous dump folders remain usable.
References
- Tenet (official): https://github.com/gaasedelen/tenet
- Tenet-IDA9.0: https://github.com/jiqiu2022/Tenet-IDA9.0
Repo Layout (Current)
.
├── dyn_trace_ida.py
├── local_emu.py
├── example.py
├── unicorn_trace/
│ ├── __init__.py
│ └── unicorn_class.py
├── single_script/
│ ├── dynamic_dump.py
│ └── dump_single.py
├── README.md
└── README_zh.md
Explorer des projets similaires
Chargement…