Install Validation
Although every decompiler has a slightly different implementation for BinSync, the instructions below should work almost the same for all decompilers. This is because we use a unified GUI made to work in a variety of QT versions.
In this tutorial, you will validate your BinSync install can:
- Use Git to connect to a BinSync project
- Read data from the remote BinSync project
- Set the read data into your decompiler.
For this tutorial, we will use the example binsync repo that is a part of the BinSync project.
Sync Validation
- Copy down a local version of the binary fauxware from the example repo:
wget https://github.com/binsync/example.bsproj/raw/data/fauxware
- Open the fauxware binary in your decompiler, verify it has loaded in the decompiler terminal
[BinSync] X.X.X loaded
Or check your plugin menu. For example, if you are using IDA, you should see this option:
If neither show, it means the plugin is not in the plugins folder.
- Open the BinSync Config Pane
- You can hit
Ctrl+Shift+B
orCtrl+Alt+Shift+B
to open it, OR - You can click your decompiler menu:
Edit -> Plugins -> Binsync: Configure...
. On Binja it’s underPlugins
. On Ghidra underTools
- You can hit
- Give a username and enter
https://github.com/binsync/example.bsproj.git
in the remote, click ok
If you already had the repo cloned down locally, you can instead select that folder from you filesystem.
- Verify your terminal says (with your username):
[BinSync]: Client has connected to sync repo with user: <username>.
- You should now see an Info Panel. Click on
Activity
, you can see other user’s activities. You should also notice your username on the bottom right of the panel to be green (online).
Congrats, your BinSync seems to connect to a repo, and recognize you as a user. Let’s test pulling to verify you can actually do stuff with your install.
-
In your decompiler, click anywhere in the function
main
once. After a second or two you should notice on the Info Panel that the words on the bottom left saymain@0x40071d
. This is your context. -
Now click on the
Context
tab, and right click on the usermahaloz
. Click theSync
popup. -
If everything works out, your decompilation should’ve changed for
main
. Now the function should be namedmahaloz_main
, and it should look something like:
// ***
// This is a large function comment.
// Thanks for using BinSync!
//
// <3 mahaloz
// ***
__int64 __fastcall mahaloz_main(int a1, char **a2, char **a3)
{
int ret_val; // [rsp+1Ch] [rbp-24h] BYREF
mahaloz_struct special_var; // [rsp+20h] [rbp-20h] BYREF
char buf[16]; // [rsp+30h] [rbp-10h] BYREF
buf[8] = 0;
LOBYTE(special_var.field_8) = 0;
puts("Username: "); // probs some username thing!
read(0, buf, 8uLL);
read(0, &ret_val, 1uLL);
puts("Password: ");
read(0, &special_var, 8uLL);
read(0, &ret_val, 1uLL);
ret_val = sub_400664(buf, &special_var);
if ( !ret_val )
sub_4006FD(buf);
return sub_4006ED(buf);
}
Take note of the variable names & types, and the comments. This will look different per-decompiler, but the symbols and types should line up for the most part.
For more general use, tips, and advice, see our Use Guide for full help.
- Previous
- Next