Code Monkey home page Code Monkey logo

botanist's Introduction

Botanist

APK toolchain fingerprinting and clustering program

WORK IN PROGRESS

About

Botanist is a program to determine the tools that were used to produce an Android Application Package binary. These include IDE's, packers, compilers, and libraries. The program is split into two parts: creating a set of signatures for a given apk and then integrating that data into the stored collection.

The name Botanist was chosen for several attributes.

  1. Brevity
  2. Relevance to categorization
  3. Homage to growing software

Ideally, these clusters will be graphically displayed and tools can be viewed along with variations that exist in the wild. The main function takes in an APK and says what tools were used, if previously seen. This project assumes data on several instances and the ability to store instances for future reference.

Dependencies

Botanist uses:

  • Androguard, currently using stable release v2.0 aka version 3.0, for apk/dex analysis
  • radare2 python bindings for elf analysis
  • MySQL for non-volatile storage of clusters
  • python-mysql for interaction with past instances and storing purposes

Components

API

  1. APKInfo - contains apk name, architecture, shared object files, and the library signatures
  2. SOFile - contains information on the shared object file
  3. ToolSig - contains a signature of a particular dynamic library, the name of that library, and the name of the APK
  4. Controller.py - adds signatures to the db if doesn't already exist and assigns a cluster

Scripts

  1. Tagging - creates the set of signatures. A simple dex signature can be made using DexTagger.py. However, this does not capture as much information as the first method called in the dynamically-loaded library. ElfTagger.py continues by dumping the .so files, finding the first call into the library after the System.loadLibrary call, and creates a signature based on the first 40 opcodes of the initializing method.
  2. Classifying - provides the interface between the Tagger and Controller

Tested Architectures

ARM | ARM64 | x86 | x64 | MIPS

initial test | | | |

Setup

  1. sudo python setup.py install
  2. python bottools/tag/ElfTagger.py -f test/Xamarin/com.revengdroid.XamarinHelloWorld.apk | python bottools/classify/Classifier.py -u {USERNAME} -p {PASSWORD}

botanist's People

Contributors

cpruce avatar

Watchers

James Cloos avatar  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.