Package: binsync
BinSyncBinSync is a decompiler collaboration tool built on the Git versioning system to enable fined-grained reverse
engineering collaboration regardless of decompiler. BinSync is built bymahaloz,
theangrteam, and theSEFCOMresearch lab. It's also due
in large part to its use by theShellphishhacking team.All good decompilers share common objects called Reverse Engineering Artifacts (REAs). These REAs are the
center of BinSync's syncing ability. Here are the supported REAs:Function headers (symbol, args, type)Stack Variables (symbol, type)StructsEnumsCommentsNote: all types support user-created types like structs.Join our discord below for more online help:Quick StartFor all installs, it's best to use our two-part installer with Python:pip3installbinsync&&binsync--installBinSync is also available in the Binary Ninja plugin manager.If you plan on using BS with Ghidra, you need to also dopip3 install binsync[ghidra].
If you plan on using extra BS features, like the ChatGPT User, install the package like this:pip3 install binsync[extras], which will install extra packages for support.
For full install information, please read ourquickstart docs.If you are planning on installing the package to be editable (-e), like in a developer install, make surepip>=23.0.0.Supported PlatformsIDA Pro:>= 7.3Binary Ninja:>= 2.4angr-management:>= 9.0Ghidra:>= 10.1All versions requirePython >= 3.4andGitinstalled on your system. Ghidra support is still very much in early stage, so only expect the minimal features like artifact name syncing and comments.Decompiler Support ProgressAlthough we support the decompilers in the earlier section, not every decompiler is supported at the same level of syncing.
To understand the difference between artifact support, pull, push, and auto push, read ourdecompiler use introduction.IDA ProOperationsFunction HeadersStack VarsGlobal VarsStructsEnumsCommentsSymbols:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Types:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Pull:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Push:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Auto Push:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Binary NinjaOperationsFunction HeadersStack VarsGlobal VarsStructsEnumsCommentsSymbols:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Types:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Pull:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Push:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Auto Push:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:GhidraOperationsFunction HeadersStack VarsGlobal VarsStructsEnumsCommentsSymbols:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Types:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Pull:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Push:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::x:Auto Push:x::x::x::x::x::x:angr-managementOperationsFunction HeadersStack VarsGlobal VarsStructsEnumsCommentsSymbols:white_check_mark::white_check_mark::x::x::x::white_check_mark:Types:white_check_mark::white_check_mark::x::x::x::white_check_mark:Pull:white_check_mark::white_check_mark::x::x::x::white_check_mark:Push:white_check_mark::white_check_mark::x::x::x::white_check_mark:Auto Push:white_check_mark::white_check_mark::x::x::x::white_check_mark:ScriptingSince BinSync needs to lift (and lower) most artifact components, BinSync offers a generic API to work with decompilers
that BinSync supports. Currently, this API only works with read-only operations, but hasworkin the pipeline to get write support as well.The below script runs in any decompiler that BinSync supports:frombinsync.apiimportload_decompiler_controllercontroller=load_decompiler_controller()structs=controller.structs()foraddrincontroller.functions():function=controller.function(addr)for_,arginfunction.args.items():ifarg.typeinstructs:print(f"Argument{arg}is a struct type:{structs[arg.type]}")print(f"Analyzed function (lifted form):{controller.lift_artifact(function)}")Here is a snippet of the output in Binja (which looks very similar in IDA and angr):...Analyzedfunction(liftedform):<Function:voidframe_dummy(args=0);@0x400640vars=2len=0x22>Analyzedfunction(liftedform):<Function:longauthenticate(args=2);@0x400664vars=7len=0x89>Analyzedfunction(liftedform):<Function:longaccepted(args=0);@0x4006edvars=2len=0x10>Analyzedfunction(liftedform):<Function:longrejected(args=0);@0x4006fdvars=2len=0x20>Analyzedfunction(liftedform):<Function:intmain(args=3);@0x40071dvars=9len=0xb8>...To understand what is available, it's best to look at thecontrollercode, as well as what data is available in
artifacts you care about.