Code Monkey home page Code Monkey logo

analyzecrypt.py's Introduction

analyzecrypt.py

Python application used to monitor function calls (C or Java) on Android via Frida.

Setup

  • Get an own env for your python project (run in the repo folder)
$ virtualenv-2.7 --distribute --no-site-packages venv
$ source venv/bin/activate
(venv) $ pip install pwn frida pycparser

Configuration (C calls)

  • Add needed modules to config/modules.json
  • Add functions which you monitor in functions look at given files as examples
    • Or use get_functions.py with C code you wish to analyse.

Configuration (Java method calls)

  • Add classes to trace to config/java.json.
  • The analyse_java.py script will trace all methods of the given classes: methods are automatically discovered

Documentation

The code is enough, it's just some lines.

Using the code

Run analyze.py to trace C function calls using Frida. Run analyze_java.py to trace Java method calls using Frida. Use eval_results.py to get information about the logged calls

TODO:

  • Integration of C and Java tracer into one tool: trace C and Java calls at the same time
  • C: More monitoring options:
    • read content from addresses not only strings
      • support structs like functions
    • interconnections between functions(lengths etc.)
      • support return value of calls (onLeave e.g.)
  • Monitor memory accesses (blocked by Frida: MemoryAccessMonitor is only available on Windows for now)
    • could be done on function calls if same address is given check for content changes
  • Support multiple platforms (should be really easy - Frida supports it)
  • Get information directly from C/Java code (Use pycparser/a java code analyzer for example)
    • done for C headers, see get_functions.py
      • still needs improvement for more complex headers, like socket.h
  • Analyse the results
    • done for really simple analysis, still needs improvement
      • double warning if multiple usages across calls
      • infomation lacks quality
      • should also work over multiple function
  • Automated module search (No need to set them manually in the config, can already be done but is really slow)
  • Fix string representation in results to show hex code instead of unicode
  • Java: allow to select methods to trace using regex instead of hooking all methods by default

analyzecrypt.py's People

Contributors

sigttou avatar ylikx 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.