Coder Social home page Coder Social logo

frida-reflection-stalker's Introduction

Frida reflection stalker

Best solution to avoid wasting time on static analysis while our target function is large and heavily obfuscated.

Example usage:

Let's say we want to hook a function protection that is heavily obfuscated and jadx can't decompile it. We can use frida to hook the function and get execution chain.

image

Simple view:

image

We can see many invokation using reflection. We can use this script to hook the function and get the execution chain.

First we need to write simple hook to function, in this case we will hook protection function. Best way to do this is to use jadx built in script creator. Just open jadx, open the class that contains the function, right click on the function and select Copy as frida snipset.

image

Paste the code into frida_reflection_stalker.js That's how it should look like:

image

Now you need to mark the moment when function starts and ends execution. You must insert intercept = true before the function starts execution and intercept = false after the function ends execution.

Example: image

And that's it. Now you can run the script and get the execution chain.

frida -U -f com.package.name -l frida_reflection_stalker.js --no-pause

image

Boom! We got the execution chain. Our test function checks if the device is rooted.

Of course, you can use this script to hook any function, not only the one that is heavily obfuscated.

frida-reflection-stalker's People

Contributors

kaspek2480 avatar

Stargazers

Aicken avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.