Development environment for BinNavi - with a package manager (Windows)

Tags: #<Tag:0x00007f76fce0d2b8> #<Tag:0x00007f76fce0d060>

OpenSource ReverseEngineering - kind of

For now let’s focus on BinNavi and ignore the IDA dependency.

As a Windows package manager I use Chocolatey. It’s a bitter-sweet NuGet style way to run scripted installations. It’s useful for Windows throw-away environments in conjunction with Vagrant. Just in case you need a lab environment and you have some resources for VMs.

Navi install

For BinNavi we need (besides IDA Pro):

  • a PostgreSQL DBMS instance. I prefer a local one for Navi in the same VM. But you can use an external (cloud) DB. In case you have got long-term studies :wink:
  • JDK 8 x86 (if you ask me)
  • Git
  • Ant and Maven

10 minute BinNavi install (for development)

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

choco install postgresql
choco install jdk
choco install maven
choco install ant
choco install git
choco install gradle

Leave the Administrator shell.

git clone https://github.com/google/binnavi.git
mvn dependency:copy-dependencies
ant build-binnavi-fat-jar

It should end with:

build-binnavi-fat-jar:
[mkdir] Created dir: C:\Users\Marius\Source\binnavi\target\staging
[jar] Building jar: C:\Users\Marius\Source\binnavi\target\binnavi-all.jar

BUILD SUCCESSFUL
Total time: 48 seconds

Now start it with java -jar target/binnavi-all.jar

Take a heart and change the DB user password with the admin tool.:wink: Because you can.

Yes, you need binexport. Really!

From the Readme:

Put the binaries of the BinExport IDA Pro plugin into this directory:

  • Linux: zynamics_binexport_9.plx, zynamics_binexport_9.plx64
  • OS X: zynamics_binexport_9.pmc, zynamics_binexport_9.pmc64
  • Windows: zynamics_binexport_9.plw, zynamics_binexport_9.p64

You can download those from the GitHub “Releases” page.

Ref: https://github.com/google/binnavi/releases

Drop them in your IDA plugins directory (manually).

You also need the remote debugger client to really use Navi. At that point you might be tempted to simply spin up another guest machine via Vagrant.

Binexport has been open.sourced recently. Check it out. It’s not easy to build though because you need a lot of dependencies. I hope that someone automates some steps of it.

Get the source in IntelliJ IDEA via Gradle - nope

gradlew.bat idea

Fails for me due to yfileswrap-obfuscated issues… yay. Anyways you can import it manually. I also prefer using a packaged gradle anyways. It’s FIXME[tm] already.

Check check

Done.