Lobotomy v2.0.0

Overview

I've finally made some headway into completely [re] building Lobotomy, and I would like to briefly cover some its changes and new features. For those who are unfamiliar with this project, Lobotomy is a command-line based tool written in Python that helps automate tasks for reverse engineering Android applications. Lobotomy provides a console environment that allows you to perform numerous reverse engineering operations on your target Android application, without ever needing to close the tool. Lobotomy attempts to remove as many manual steps as possible in your reverse engineering workflow.

Changes & Features

Here is a brief list of changes in Lobotomy v2.0.0:

  • Command auto-completion
  • Enhanced exception handling
  • [re] designed surgical module
  • [re] designed attacksurface module

Here is a brief list of new features in Lobotomy v2.0.0:

  • Interact module
  • Terminal based user interface
  • Binary Ninja plugin
  • Strings module
  • Macro module

A full list of Lobotomy's capabilities can be found on the project's GitHub

Surgical

The surgical module allows you to search for specific Android API usage within the target Android application. The surgical module now comes as its own console environment.

(lobotomy) surgical
(surgical) modules list


    --> zip
    --> intent
    --> socket
    --> system


(surgical)

I also attempted to make it easier to add your own API support modules within surgical.

https://github.com/rotlogix/lobotomy/tree/master/core/brains/surgical/modules

You can copy the intent.py support module as a starting template.

class IntentModel:  
    values = {
        "android.content.Intent": [
            "parseUri",
            "getAction",
            "getBundleExtra",
            "getClipData",
            "getComponent",
            "getData",
            "getDataString",
            "getExtras",
            "getIntent",
            "getPackage",
            "getScheme",
            "getSelector",
        ]
    }


class IntentModule(object):  
    def __init__(self):
        self.name = "intent"
        self.model = IntentModel()

Then add it accordingly.

https://github.com/rotlogix/lobotomy/blob/master/core/cli/surgical.py

class Run(SurgicalCmd):  
    def __init__(self, vm, vmx):
        SurgicalCmd.__init__(self)
        self.logger = Logger()
        self.t = Terminal()
        self.u = Util()
        self.vm = vm
        self.vmx = vmx
        self.methods = self.vm.get_methods()
        self.intent = IntentModule()
        self.zip = ZipModule()
        self.socket = SocketModule()
        self.system = SystemModule()
        self.modules = [m for m in self.zip,
                        self.intent,
                        self.socket,
                        self.system]
        self.target_module = None
        self.methods_api_usage = list()

You can find documentation for the surgical module here.

https://github.com/rotlogix/lobotomy/blob/master/docs/surgical.md

Interact

The interact module was meant to provide users the ability to interact with target Application's loaded and analyzed DEX.

(lobotomy) interact

In [1]: dir(self)  
Out[1]:  
['__class__',
 '__delattr__',
 '__dict__',
 '__doc__',
 '__format__',
 '__getattribute__',
 '__hash__',
 '__init__',
 '__module__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__weakref__',
 'config',
 'find_class',
 'get_classes',
 'print_class_tree',
 'print_methods',
 'run',
 't',
 'vm',
 'vmx']
In [3]: self.print_class_tree()  
...
..
.
    --> class : Lretrofit/http/PATCH;
            --> method : value


    --> class : Lretrofit/http/POST;
            --> method : value


    --> class : Lretrofit/http/PUT;
            --> method : value


    --> class : Lretrofit/http/Part;

You can find more information about the interact module here.

https://github.com/rotlogix/lobotomy/blob/master/docs/interact.md

UI

Lobotomy also has a new terminal based user interface. To be honest with you, it kind of sucks and needs a lot of work. Use a your own discretion.

Conclusion

I've only covered a few of Lobotomy's features. If you are interested in everything that Lobotomy does, check out its documentation and source code.

Everything in Lobotomy is still in development and very much BETA. I will continue to provide updates as new features are completed.