Microsoft Unveils RIFT: A New Open-Source Tool for Analyzing Rust-Based Malware

In response to the escalating use of Rust in malware development, Microsoft has introduced RIFT (Rust Identification and Function Tagging), an open-source tool designed to enhance the analysis of Rust binaries. This initiative addresses the unique challenges posed by Rust’s architecture, which complicates traditional malware analysis methods.

The Rise of Rust in Malware Development

Over the past five years, the cybersecurity landscape has observed a notable shift towards Rust-based malware. Rust’s attributes—such as memory safety, type safety, and concurrency—make it appealing for legitimate software development. However, these same features have been exploited by cybercriminals to create sophisticated and resilient malware.

Notable instances include:

– BlackCat Ransomware (December 2021): One of the first significant ransomware families written in Rust, showcasing the language’s potential for malicious use.

– Hive Ransomware (June 2022): Originally developed in another language, Hive was rewritten in Rust to enhance its capabilities and evade detection.

– AsyncRAT and RALord Ransomware: More recent examples of malware families adopting Rust, indicating a growing trend among threat actors.

Challenges in Analyzing Rust Binaries

Rust’s compilation process results in statically linked binaries that incorporate extensive library code. This leads to executables that can exceed 3MB in size and contain nearly 10,000 functions. In contrast, traditional C++ programs might have fewer than 100 functions and sizes under 20KB. This complexity makes it difficult for analysts to distinguish between benign library functions and malicious code, thereby hindering efficient malware analysis.

Introducing RIFT: A Three-Component Solution

To address these challenges, Microsoft developed RIFT, which integrates seamlessly with IDA Pro, a widely used disassembler and debugger. RIFT comprises three main components:

1. RIFT Static Analyzer: This IDA Pro plugin extracts vital metadata from Rust binaries, including the Rust compiler commit hash, embedded dependencies, target architecture, and operating system information. This data provides analysts with a comprehensive overview of the binary’s composition.

2. RIFT Generator: Automating complex processes, the RIFT Generator facilitates FLIRT (Fast Library Identification and Recognition Technology) signature generation and binary diffing. It acts as a wrapper around essential tools such as Cargo (Rust’s package manager), Hexray’s FLAIR tools (sigmake.exe and pcf.exe), IDA’s command-line interface (idat.exe), and the open-source Diaphora tool. This automation streamlines the extraction and processing of COFF files and RLIB files, Rust-specific archive formats.

3. RIFT Diff Applier: This component offers an interactive interface for applying binary diffing results. It operates in both interactive and auto-rename modes, with configurable similarity thresholds, allowing analysts to efficiently identify and label functions within the binary.

Field Testing and Effectiveness

RIFT has been tested on real-world threats, including the RALord ransomware and the SPICA backdoor. These tests demonstrated significant improvements in analysis efficiency. The tool effectively differentiates between attacker-written code and standard library functions, enabling analysts to concentrate on malicious logic without the distraction of benign code.

The dual approach of FLIRT signatures and binary diffing ensures comprehensive analysis capabilities. FLIRT signatures provide reliable annotations with low false-positive rates, while binary diffing offers broader coverage for cases where strict signature matching may fail. This combination ensures that analysts can effectively dissect and understand Rust-based malware, regardless of the specific compilation scenarios.

Open-Sourcing RIFT: A Collaborative Effort

By releasing RIFT as an open-source tool, Microsoft aims to bolster global cybersecurity defenses against the rising threat of Rust-based malware. This initiative encourages collaboration and innovation within the security community, providing analysts with the necessary tools to combat increasingly sophisticated cyber threats.

The development of RIFT underscores Microsoft’s commitment to enhancing cybersecurity measures and equipping professionals with advanced tools to address evolving challenges. As Rust continues to gain popularity among developers and threat actors alike, tools like RIFT are essential in maintaining robust defense mechanisms against emerging threats.

Conclusion

The introduction of RIFT marks a significant advancement in malware analysis, particularly concerning Rust binaries. By addressing the unique challenges posed by Rust’s architecture, RIFT empowers analysts to efficiently dissect and understand complex malware, ultimately strengthening the cybersecurity landscape. Microsoft’s open-sourcing of RIFT reflects a broader commitment to collaborative defense strategies, ensuring that the security community remains equipped to tackle the ever-evolving threat environment.