• Stars
    star
    158
  • Rank 235,755 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Instructions tracing powered by frida

Hooah Trace

a simple yet powerful instruction tracing using frida stalker - supporting arm64 and x64

when you want to use this

when you need to trace at single instruction and perform additional operations or alter the code flow.

when you need to get a proper understanding of what's going on down there with obfuscations killing the party.

install

git clone https://github.com/iGio90/Hooah-Trace.git
npm install
npm link

try it out

cd example
npm link hooah-trace
npm install
npm run watch

# make your edits to index.ts
# inject the agent (quick att.py)

example code

import {HooahTrace} from "hooah-trace";

function onHookInstruction(context: CpuContext, instruction: Instruction) {
    // console.log(JSON.stringify(context));
    // console.log(JSON.stringify(instruction));
    // console.log('');
}

const target = Module.findExportByName(null, 'open');
if (target) {
    Interceptor.attach(target, function () {
        HooahTrace.trace({
            // print the execution blocks
            printBlocks: true,

            // -1 is endless
            count: -1,

            // do not trace jumps in excluded modules (i.e libc / libSystem)
            filterModules: ['libc.so'],

            // you can trace specific instructions with
            // instructions: ['svc', 'ldr']

            // style block prints
            printOptions: {
                // yes please
                colored: true,

                // custom space between blocks
                treeSpaces: 8,

                // include involved register values data
                details: true
            }
        }, onHookInstruction);
    });
}

example output

Alt text

example output with details

Alt text

Alt text


roadmap

  • add syscall map for syscall tracing
  • add medium-level decompilation
  • add asm relocation

changelog

2019.07.05

* arm64: parse W registers
* swap callback and options so that you can just define print options

2019.07.02

* added ability to filter for specific instructions
* fixed colored telescope in uncolored mode

2019.06.27

* refactored to be more flexible and tiny
* removed print() in favor of print blocks option
* added graph highlithing execution blocks
* various minor improvements

2019.06.24

* added rangeOnly option
* added excludedModules option
* make output colorized
* improve telescope, show symbols on jumps
* added back print() api with details, color and annotations
* some logic improvements

Copyright (c) 2019 Giovanni (iGio90) Rocca

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

Dwarf

Full featured multi arch/os debugger built on top of PyQt5 and frida
Python
1,242
star
2

frick

frick - aka the first debugger built on top of frida
Python
288
star
3

FridaAndroidInjector

Inject frida agents on local processes through an Android app
Java
255
star
4

uDdbg

A gdb like debugger that provide a runtime env to unicorn emulator and additionals features!
Python
190
star
5

FridaAndroidTracer

Android application tracer powered by Frida
Python
78
star
6

binja-secret

My binary ninja plugin that encapsulate frida, unicorn, capstone and keystone
Python
68
star
7

frida-onload

Frida module to hook module initializations on android
TypeScript
66
star
8

r2dwarf

r2 plugin for Dwarf
Python
29
star
9

frida-elf

A frida module to parse Elf headers in runtime
TypeScript
29
star
10

SNetKiller

InHouse safetynet killer
Java
28
star
11

frida-java-ext

Some 'one-line' frida api to avoid code recycling here and there
TypeScript
27
star
12

NetworkRequests

Dwarf script to collect network requests and display on data panel
JavaScript
19
star
13

supercell_sodium_core

Just the new Clash of Clans crypto core
Python
19
star
14

SPPWAG

Simple proto parser with a gui
Python
18
star
15

ucdwarf

Unicorn emulator plugin for Dwarf
Python
18
star
16

DirtyPipeZ

C
18
star
17

PokeMesh_Translations

16
star
18

DwarfCore

TypeScript
16
star
19

COC_2k18

A small effort to keep up the RE around SC. Merry Christmas!
Python
14
star
20

IntelliJ-OpenAI

Generate code, documentations and more. From comments, straight in the editor, just like codepilot
Java
14
star
21

frida-android-toggle

1 button app to kill and start frida server for all the lazynation
Java
13
star
22

Android-CrackMeS

Some crackme i built for Android
11
star
23

Dwarf-LKM

Dwarf kernel module to get some help in userland debugging from kernel
C
9
star
24

COCProxy

JavaScript
8
star
25

fridasec

My extended frida API for secRet
Python
8
star
26

InspireLauncher_translations

8
star
27

PyByteBuffer

A bytes manipulation library inspired by Java ByteBuffer
Python
8
star
28

WebRTC-Android

Android updated WebRTC library with precompiled binaries for all cpu types, java wrapper and apprtc demo. The library is built using pristineio scripts that uses many optimization flags for Android
Java
8
star
29

DUCKWARRIORS_Frida_Wars_1

challenge built for first frida wars
7
star
30

secRet_dBot

secRet community bot
Python
6
star
31

arm_utils

arm math instructions in py
Python
6
star
32

GDumper

SC packet dumper and proto parser + encryption
JavaScript
6
star
33

drdwarf

Android extension for Dwarf
Python
5
star
34

AndroidTweaker2_Translations

5
star
35

frida_cr_proxy

Yet another Clash Royale proxy using frida and python, skipping encryption/decryption (X86 only)
Python
5
star
36

hacking-stuff

Repository containing several useful security-oriented scripts
Python
5
star
37

frida-create-modules

5
star
38

DwarfScripts

A collection of scripts accessible from dwarf
4
star
39

sc-tweetnacl

JavaScript
4
star
40

SCKeys

SuperCell games public key dumps and utils
Java
4
star
41

FineMenu

A simple, clean and styleable menΓΉ/tabs for Android
Java
4
star
42

JREUtils

Just my java api for reversing android
Java
3
star
43

DwarfTypings

Typescript definition for Dwarf api
3
star
44

CRPrefsCrack

Christmas is close! enjoy
Java
3
star
45

android_packages_apps_Settings

JellyBam Settings app
Java
3
star
46

SC-FlyPatcher

3
star
47

packages_apps_ROMControl

ROMControl from aokp
Java
3
star
48

WebRTC

WebRTC sources
C++
2
star
49

spectrum_inspire_launcher_theme_sample

Shell
2
star
50

DwarfAgentTemplate

Dwarf agent template ready to be filled
TypeScript
2
star
51

packages_apps_Browser

Browser app
Java
1
star
52

fantom

Go
1
star
53

android_packages_providers_MediaProvider

Java
1
star
54

jellybam_vendor

vendor
Shell
1
star
55

platform_manifest

manifest
1
star
56

iGio90

1
star
57

jellybam

build script
Shell
1
star
58

packages_apps_CMFileManager

CyanogenMod file manager
Java
1
star
59

android_frameworks_base

jellybam framework
Java
1
star