cetfor / PaperMachete

A project that uses Binary Ninja and GRAKN.AI to perform static analysis on binary files with the goal of identifying bugs in software.
MIT License
57 stars 9 forks source link

Plugin mode request? #1

Open mozark24 opened 6 years ago

mozark24 commented 6 years ago

Hey, I just got around to trying PM but it appears it needs to run Binja in headless mode and I'm without that license. I'd like to play around with it though... I haven't looked into it much but here's a feature request: how hard would it be to get the JSON conversion working as a plugin?

mozark24 commented 6 years ago

I got the plugin working if you want to support a pull request

cetfor commented 6 years ago

Hey @mozark24, that sounds awesome. I'm starting to get around to working on this again and would love to accept a pull request on this.

mozark24 commented 6 years ago

Great! I think I still have it on my VM, if I didn't overwrite it on a project. I should be able to do it tomorrow. I have an MLIL version working, though the code is not nearly as clean as PM's. I JSON-ized all the instruction metadata and imported it into Neo4J, which I am more familiar with. Still working out the kinks but I'd like to experiment with taking the structure to a more "fully featured" graphic engine like D3 that can allow visual inspection and pattern snooping while maintaining global context.... Have a few ideas in mind to get out of the endless cycle of directed graphs. That's the plan anyways :)

cetfor commented 6 years ago

That sounds really cool! I'd love to stay in the loop on any progress you are able to make on that front. Are you sharing any of your research / updates on twitter / medium / blog etc? My email is cetfor-at-gmail.com if you don't care to share this publicly. Thanks.

jonjonLynch commented 6 years ago

@mozark24 Are you able to add a pull request for the plugin functionality?

mozark24 commented 6 years ago

@jonjonLynch Thanks for the reminder, this totally slipped my mind last quarter with classes. I just re-worked a change and forked an update.

@cetfor Fork currently awaiting your review for personal license versions of binja.

cetfor commented 5 years ago

@mozark24 @jonjonLynch - Hey guys I'm so sorry about missing this. I think I was waiting for a PR and completely dropped the ball. Feel free to call me out on this stuff!

We just updated to a new version of Grakn (1.4.2) and added Docker support (big thanks to @devtty1er). There have been no changes to pmanalyze.py so your pmanalyze_binja.py plugin analyzer should work fine. I'll give it a shot on my end today.

If you get a chance can you update your branch to only include pmanalyze_binja.py in the binaryninja folder and submit a PR so we can pull it in?

Let me know if you don't have the bandwidth for this and I'll help out. Thanks again for creating the plugin and sorry for dropping the ball on this!