Giter Club home page Giter Club logo

misc-code's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @cryptax
  • ๐Ÿ‘€ Iโ€™m interested in research on Android or IoT malware
  • ๐ŸŒฑ I'm the lead organizer of Ph0wn CTF

misc-code's People

Contributors

cryptax avatar p0r0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

misc-code's Issues

jeb2frida Uses Function Alias Instead of Native Function Name

If I rename a function or class in JEB and use the jeb2frida script to generate a Frida hook, the alias I used when renaming the function/class is included in the jeb2frida output instead of the actual class/function name in the APK. Clearly, the Frida runtime will be unable to hook routines that I've renamed with JEB since the app runtime uses the native names. This also occurs with obfuscated code using unicode function/class names outside of the printable range of characters.

Example, JEB tells me a function is defined as this when I hover my cursor over it

Class: class:Lum/\u1ADC\u1ADD;
  Method: method:um.\u1ADC\u1ADD.\u1ADD

However, JEB auto generated names for this class for me (otherwise the names where []). When I use the jeb2frida script I received this:

Java.perform(function() {
  var jeb2frida_class_MTH50910 = Java.use('um.CLS711');
  var jeb2frida_method_MTH50910 = jeb2frida_class_MTH50910.MTH50910;
  jeb2frida_method_MTH50910.implementation = function() {
    console.log('[MTH50910] Hooking um.CLS711.MTH50910(  ):);
    var ret = this.MTH50910();
    console.log('[MTH50910] returns '+ret);
    return ret;
  };
});

In this particular case, I think I needed

Java.perform(function() {
  var jeb2frida_class_MTH50910 = Java.use('um/\u1ADC\u1ADD');
  var jeb2frida_method_MTH50910 = jeb2frida_class_MTH50910['\u1ADD'];
  jeb2frida_method_MTH50910.implementation = function() {
    var ret = this['\u1ADD']();
    return ret;
  };
});

This is reproducible by simply renaming a function in JEB and using the jeb2frida script on that function. The produced code uses the new function name instead of the natural one (which is required for Frida to successfully hook it).

Can the jeb2frida script be updated to use the native names of functions/classes?

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.