McGill-DMaS / Kam1n0-Community

The Kam1n0 Assembly Analysis Platform
Apache License 2.0
615 stars 127 forks source link

What is the Radare2 support status? #24

Open E3V3A opened 5 years ago

E3V3A commented 5 years ago

First off, WOW! This is a very cool project.

Second, since most people can't afford to get an IDA Pro licesnse, we rather support FOSS projects like Radare2. It was mentioned in an old issue #12 that support could be easy to implement. I'd love to see this, but perhaps it has already been done?

@steven-hh-ding

Basically Kam1n0 just calls a script to disassemble; and the whole user interface for IDA Pro plugin can run without IDA by changing Manager and IDA-utils

Relevant links has changed:

So what exactly need to be done to add this support?

@XVilka Do you know?

steven-hh-ding commented 5 years ago

Hi! Thank you for your interests! We haven't managed to add the support for the other disassembler yet, since we are still intensively improving the backend server. The IDA plugin has been updated. We provide a standalone client that support any disassembler if you can extract certain information as jsons.

Support a new disassembler on the client side:

This script extracts information from the IDB file as JSON objects. https://github.com/McGill-DMaS/Kam1n0-Community/blob/master2.x/kam1n0-clients/ida-plugin/Kam1n0/IDAUtils.py

The extracted JSON data structure is here (will be parsed by the server): https://github.com/McGill-DMaS/Kam1n0-Community/blob/master2.x/kam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/kam1n0/framework/disassembly/BinarySurrogate.java

Then the JSON objects are fed to a connector: https://github.com/McGill-DMaS/Kam1n0-Community/blob/master2.x/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py

The connector already includes every thing (web UI, submitting query, shows progress and rendering result)

Supporting a new disassembler on the server side: (not necessary if the user submits query using the client but not the web UI)

This IDA script is called by the server with IDA command line options to extract information as JSON objects from an IDB file: https://github.com/McGill-DMaS/Kam1n0-Community/blob/master2.x/kam1n0/kam1n0-resources/bin/ExtractBinaryViaIDA.py

The extracted JSON data structure is here (same as above): https://github.com/McGill-DMaS/Kam1n0-Community/blob/master2.x/kam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/kam1n0/framework/disassembly/BinarySurrogate.java

We will need to implement another class for the disassembler as well: https://github.com/McGill-DMaS/Kam1n0-Community/blob/master2.x/kam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/kam1n0/impl/disassembly/DisassemblyFactoryIDA.java

If you have the script and command line option, we can implement the java class.