Skip to content

A great data flow tracking plug-in in IDA from Unicorn engine

Notifications You must be signed in to change notification settings

liyansong2018/unitracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unitracer

demo

Usage

1.Hook basic block in unicorn script

Python

def uc_debug_block(uc, address, size, user_data):
    # Our tool uses "addr =" to track the data flow
    print("Basic Block: addr=0x{0:016x}, size=0x{1:016x}".format(address, size))
    
uc.hook_add(UC_HOOK_BLOCK, uc_debug_block)

C

void uc_debug_block(uc_engine *uc, int addr, int size, void *user_data) {
    print("Basic Block: addr=0x%x, size=0x%x", addr, size);
}

hook_add(uc, &hook2, UC_HOOK_BLOCK, uc_debug_block, NULL, 1, 0);

2.Export instruction simulation record

python3 task_fibonacci.py > trace.txt 

3.Load the plug-in and open address-record

output: call stack

>>> ----- start tracking function ----- >>>
>>> cgc_do_sample
>>> cgc_receive_packet
>>> cgc_simple_checksum16
>>> cgc_receive_packet

output: set color (basic block)

4.Use the shortcut Ctrl + H to clear the color setting of the basic block

About

A great data flow tracking plug-in in IDA from Unicorn engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages