Binary Ninja Blog

5.0 Gallifrey

Council of Time Lords style drawing with the Binary Ninja team instead of Doctor Who characters >

Not enough time to reverse engineer everything you want? The Time Lords are here to help in Binary Ninja 5.0 Gallifrey! With major features across the board from huge analysis improvements, fantastic iOS support, many new firmware-specific features, and more, this major version has something for everyone.

iOS

Better support for reverse engineering iOS has been a major focus of the 5.0 release. Between major improvements to DYLD Shared Cache integration, architecture/lifting fixes, and the new Kernel Shared Cache support, Binary Ninja 5.0 is a great choice for all your iOS reverse engineering needs.

DYLD Shared Cache

Thanks to the efforts of both the team at Vector 35 and a number of incredibly helpful community members, the DYLD Shared Cache integration has seen some major improvements. We’re pleased that, after all this work, DYLD Shared Cache support is no longer considered in an alpha state, but is now a first-class feature!

The most noticeable improvement is the performance. On hardware that previously took four and a half minutes to do initial analysis in Binary Ninja 4.2, it now only takes fifteen seconds in 5.0!

  • The UI has been improved
    • The image and symbols lists can be sorted
    • You can select “Load Selected Image and Dependencies” from the context menu in the Images tab, and skip manually walking dependency trees
    • DYLD Shared Caches can now be loaded from a Project
  • Analysis has been improved
    • iOS 16 Symbol Cache files are now processed and many more symbol names are now displayed
    • Objective-C support is better, with more objc_msgSend calls being processed
    • Symbol names are demangled with LLVM
    • Pointers to not-yet-loaded regions are resolved automatically now
  • Stability has been improved with a substantial rewrite of the model logic
  • The documentation was given a refresh.
Dyld Shared Cache Triage Images
Dyld Shared Cache Triage Symbols
Dyld Shared Cache Mappings and Regions

Kernel Cache

New to Binary Ninja 5.0 is support for the Kernel Cache from iOS and macOS. While newer than the DYLD Shared Cache support, this capability is also open source and quickly improving. Similar features enable you to choose images to load into a shared virtual memory space for cross-image analysis. Named KSCView in the UI, the Kernel Cache view supports both image loading and symbol lookup.

Dyld Shared Cache Triage Images
Dyld Shared Cache Triage Symbols

Firmware

There are many improvements in this release for those doing firmware analysis. These include Firmware Ninja (available only in the Ultimate edition), the text format loaders (available in all paid editions), and SVD file loading (available in all editions).

Firmware Ninja (Ultimate Only)

Firmware Ninja

Firmware Ninja includes a number of features designed specifically to enhance analysis of firmware. We recently wrote up a detailed blog post covering these features, but here is a quick summary:

  • Entropy based analysis for segments/sections
  • Memory insights for identifying patterns unique to firmware, such as loads/stores to external memory, MMIO usage, and others
  • A board description database with built-in support for over 1000 microprocessor memory maps, including automatic detection/matching based on memory accesses from memory insights
  • Relationship mapping that uses the Project API to automatically associate related endpoints between different binaries (for example, an I2C bus send function in one binary and the receive function in another)

IHEX/TI-TXT/SREC Loader (All paid editions)

Hex File Loader

Previously a plugin, we’ve re-implemented and integrated support for these various text-encodings commonly seen when dealing with firmware. You should be able to automatically open them and analyze their contents just like any other binary.

In the above screenshot, you can see how loading a .hex file is not only handled, but Binary Ninja also correctly identified the architecture using its automatic architecture prediction!

SVD Loader (All editions)

Yet another open source 🦀 plugin, a loader for SVD files is included by default in Binary Ninja. The new first-party feature lets you use the Load SVD file option in the Plugins menu to specify an SVD file containing information about MMIO regions, peripherals, registers, etc. These files can be incredibly useful when reverse engineering software for CPUs that have them.

Binary Ninja even supports loading structures and comments from SVD files!

SVD Comments

Analysis

Decompilation and analysis weren’t just improved for iOS and Firmware– Binary Ninja 5.0 contains many improvements to decompilation in general. The two most notable improvements include automatic stack array/structure detection and support for union types. The new Itanium RTTI support is also valuable for those doing C++ reverse engineering on non-Windows platforms.

Array and Structure Detection and Propagation

Several of our highest priority feature requests were implemented in Binary Ninja 5.0. One is automatic stack-array creation. When Binary Ninja detects stack array or structure access patterns, it will automatically create appropriate types for the relevant local variables. Prior to 5.0 stack buffers would just show up as void type stack variables. In 5.0 these buffers now show up as arrays and where possible we recover the type of the array as well.

Next, 5.0 also adds the ability to backward type propagate from call sites to the stack variable where they were allocated. The impact of this can’t be understated–its a real game changer especially when coupled a platform that has a nice set of type libraries like Windows.

Since this feature is still new, there may still be patterns that aren’t correctly identified. Feel free to let us know if you find samples where we can improve.

Union Type Support

As helpful as support for automatic array and structure creation is, our highest-voted open feature request before Binary Ninja 5.0 was support for union types, and we’re happy to say we’ve added that as well! In fact, this wasn’t just the highest ranked feature request of this release, but the highest ranked feature of all time– a fitting contribution to the 5.0 major version bump!

While there are many contexts in which you may end up working with union types, this is especially helpful for Windows kernel driver reverse engineering as union types are quite common there.

When a union type is applied in analysis, you can choose the appropriate member at each usage by using the Field Resolution right-click context menu. Decompilation from that point forward will use your chosen union member, and you can always switch to another union member for later uses. You can find a longer demonstration of this feature in the documentation.

Union Field Resolution

Itanium RTTI

Wait–why would you care about a discontinued CPU? Well, you might care a lot because it turns out that both GCC and Clang use the RTTI format specified in the Itanium ABI for C++ class metadata. While we added support for MSVC RTTI in 4.2, now in 5.0 we support Itanium RTTI as well. Check out the difference this makes in the analysis:

Debugger

The debugger has had a number of improvements during the 5.0 development cycle. We’ve reworked how the adapter settings system works, added multiple new debugger backends, and improved performance by leveraging some new core APIs!

Adapter Settings

The new Adapter Settings window has a cleaned-up display of all the parameters you have when launching processes in the debugger in Binary Ninja 5.0. Based on our existing Settings page, and opening when you launch a process, this updated window should make it easier than ever to configure your debugging sessions.

Debugger Adapter Settings

Pause During Analysis

We have long been aware that running analysis during debugging may be unnecessary and could seriously drag down performance. In 5.0, we are rolling out a feature that reduces the scope of automatic analysis during debugging. This will limit analysis updates to just the current function, instead of all functions, bringing major performance improvements if you are debugging a large binary. You can control this new behavior with the debugger.holdAnalysis setting.

Analysis Hold

GDB RSP and More TTD

As big believers in the power of Time-Travel Debugging (TTD), in 5.0 we’ve added support for rr TTD through the newly added GDB RSP debug adapter:

GDB RSP

Meanwhile, the GDB RSP adapter brings better support for GDB servers/stubs, including those from QEMU, VMWare, Qiling, etc.

Corellium

If you analyze mobile apps and use Corellium in your workflow, you can now debug a virtual device using the Correlium debug adapter. This debug adapter understands Corellium’s extensions to the GDB RSP protocol, providing lower latency and a better remote debugging experience, especially when you debug over higher-latency connections.

Corellium Adapter

Shellcode Compiler Open Sourced

For 5.0, we’ve open sourced one of the oldest components in Binary Ninja: the Shellcode Compiler (SCC)! Responsible for the Compile C Source dialog box, SCC supports a surprising number of architectures and platforms. Unfortunately, we haven’t maintained it much recently, and we felt the best thing to do was to release it to the community as open source. In the future, we are considering replacing SCC as the built-in compiler in Binary Ninja with LLVM, given that its ability to create small position-independent shellcode has improved significantly in the last 10 years. Since we are already including LLVM for both the debugger and Clang integration, utilizing it for other features is “cheap” from an install size perspective.

SCC

New Architectures

We’ve added several new architectures with this release! MIPS3 was added to all paid editions and C-SKY ABIv1 was added to Ultimate.

C-Sky Support

As an added bonus, it turns out that C-SKY ABIv1 is essentially the same architecture as M-CORE (but NOTHING like C-SKY v2 as it happens), so Ultimate users got a two-for-one deal!

Enterprise Browser Improvements

The Enterprise Project Browser got a refresh with a number of new improvements:

  • Search filtering includes descriptions (this feature also works in the Commercial edition on local projects!)
  • Download status (easily tell which files are already downloaded locally)
  • Bulk download

Download Missing

These quality of life features are already in heavy use internally at Vector 35, so we’re sure our enterprise customers will appreciate them too!

Sidekick 3.1

Sidekick 3.1 was recently released as well! While we haven’t done a full blog post on it yet, it includes key stability improvements and expanded scripting capabilities. In use of decompilation, we fixed errors related to structure recovery, function name formatting, and compatibility with older package dependencies. Name suggestions for data variables and functions are now generated more reliably and persist correctly across sessions, including compatibility fixes for BNDBs saved with older versions of Sidekick.

On the automation side, users can now import/export scripts, run BNQL queries, and orchestrate tool execution within scripts. We have also published a few example Automation Workbench scripts that support file indexing and CVE database search.

Other Notables

Sometimes it’s hard to pick which items make the major feature list in the blog post, and we often end up with features that might not be quite headliners but are still important enough to highlight.

Updated URL handler

One under-appreciated feature of Binary Ninja is its ability to load files with a url handler. While this has enabled opening files at fixed file paths and websites (and you can even include offsets and expressions to automatically navigate to!), prior to 5.0 it wasn’t possible to create URLs for files on Binary Ninja Enterprise servers. In 5.0, when opening a file from an Enterprise project, you can right-click anywhere and use the Copy Location as URL context menu item to create a link that can be used by any other user on the same server to navigate to the same location.

Line Wrapping

It’s hidden away here in the “other” section, but for some people, this might be their favorite change! Very early in the 5.0 release cycle we landed an improvement to how long lines are wrapped in the UI. Ironically, with previous improvements to control flow recovery, type information, and other analysis improvements, the need for this feature has decreased. However, it’s still quite helpful when working on a smaller screen, as the wrapping adapts to your available space much more intelligently.

Line Wrapping

This wrapping is implemented on top of the new line formatter API. The current implementation supports both C and Rust and is open source.

Render Layers

The new Render Layer API opens up many new possibilities to plugin authors. At its core, it is a callback API that allows a plugin to modify how decompilation, disassembly, and ILs are rendered in the UI. This enables a number of useful capabilities:

  • Ephemeral Highlighting: The debugger is already using this feature, and other plugins like Lighthouse have long requested this to replace our less-performant highlight APIs.
  • Custom Annotations: Want to have your plugin add additional information at any point in analysis? You can now add whatever custom text or lines you like.

An example plugin is included to demonstrate how you can use Render Layers. The example is built and shipped with paid editions of Binary Ninja and can be accessed in the Render Layers submenu in the hamburger menu in the upper-right corner of any graph or linear view.

Render Layer Menu

Customer Portal

Our new customer portal makes working with your Binary Ninja licenses so much easier. The portal currently allows you to:

  • Download current and old installers (even after your support has expired!)
  • Download copies of your license files
  • Create teams to manage and assign licenses
  • Modify your own license email by claiming your license and updating your account
  • Upload sample files for support requests (documented in the updated issue template)
  • Get more information about releases, trainings, and more from one convenient location

Coming soon, we also plan to add support for co-terming, purchasing, and renewing existing licenses.

Customer Portal

Open Source Contributions

This has been the most collaborative release yet! Thanks so much to the many open-source contributors who submitted pull requests during this release. This was the most active release in terms of contributions from the community by a large margin! The following following open source contributors had PRs merged in this release in particular:

We appreciate your work!

Everything Else

With those more visible features out of the way, here’s a more detailed list of other features, improvements, and fixes included with 5.0:

UI

Analysis / Core

Binary View

Shared Cache

Architecture / Platforms

API

Debugger

Enterprise

Documentation / Misc

…plus all of the usual “additional” changes and fixes included in the full list of closed issues! 5.0 contained almost 300 closed issues, our largest release in terms of fixes, improvements and features by a huge margin!