FLOSS for Gophers and Crabs: Extracting Strings from Go and Rust Executables

To support the static analysis of Go and Rust executables, FLOSS now extracts program strings using enhanced algorithms.
Where traditional extraction algorithms provide compound and confusing string output FLOSS recovers the individual Go and Rust strings as they are used in a program.
Analysts who have inspected Go or Rust samples know how confusing the traditional strings.
This problem arises because Rust and Go compilers do not NULL-terminate strings.
Using FLOSS to extract Go and Rust strings Figure 2 shows an example of running FLOSS version 3.0 on a Rust executable.
String deobfuscation may be inaccurate or take a long time for Go and Rust executables because they are often large and have many and/or complex functions to analyze.
To only focus on the static strings of Go and Rust programs you can use the -only/-no arguments to enable or disable the extraction of a string type, e.g., static or decoded.
Go and Rust strings are part of the static string extraction.
The language-specific strings are listed in a section named FLOSS GO STRINGS or FLOSS RUST STRINGS. This section follows the output of the regular ASCII and UTF16-LE encoded strings.
To identify Rust compilers FLOSS searches common Rust string patterns, including those related to error handling.
Extracting Strings from Go Binaries Go strings are generally UTF-8 encoded this isn't guaranteed.
In compiled Go binaries the most interesting strings for analysts are commonly stored without a NULL terminator.
Extracting Go Strings from Windows PE files FLOSS identifies String structures and code references in Go programs to extract individual strings with corresponding lengths.
Our algorithm relies on the Go linker storing strings in one consecutive range in length-sorted order, from shortest to longest.
Extracting Strings from Rust Binaries Strings in Rust are guaranteed to be valid UTF-8 sequences.
FLOSS focuses on these and doesn't specifically handle other string types which may contain non-UTF-8 characters such as OsStrings or byte strings.
For Windows PE files Rust strings commonly reside in the binary's.
Extracting Rust Strings from Windows PE files To extract strings from programs created using the Rust compiler, FLOSS reuses many of the ideas and functions used for the Go string extraction.
Conclusion The newest release of FLOSS extracts strings from Windows binaries written in Go and Rust.
To try out FLOSS' new functionality download a standalone binary from the Release page or use pip to install the tool from PyPI. You can then run the tool against any Windows PE Go or Rust sample to extract language-specific strings.


This Cyber News was published on www.mandiant.com. Publication date: Wed, 13 Dec 2023 21:43:04 +0000


Cyber News related to FLOSS for Gophers and Crabs: Extracting Strings from Go and Rust Executables

FLOSS for Gophers and Crabs: Extracting Strings from Go and Rust Executables - To support the static analysis of Go and Rust executables, FLOSS now extracts program strings using enhanced algorithms. Where traditional extraction algorithms provide compound and confusing string output FLOSS recovers the individual Go and Rust ...
1 year ago Mandiant.com
New Linux Kernel Code Written In Rust To Eliminate Memory Safety Bugs - Since Rust was officially merged into the Linux kernel in October 2022, development teams have been steadily working to implement Rust-based drivers and components that inherently prevent common memory-related security issues. The Linux kernel has ...
3 months ago Cybersecuritynews.com
Critical Rust Flaw Poses Exploit Threat in Specific Windows Use Cases - The Rust Project has issued an update for its standard library, after a vulnerability researcher discovered a specific function used to execute batch files on Windows systems could be exploited using an injection flaw. The set of common functions ...
1 year ago Darkreading.com CVE-2024-24576
Google Contributes $1 Million to Rust, Says It Prevented Hundreds of Android Vulnerabilities - Google today announced a grant of $1 million to the Rust Foundation, meant to help improve the interoperability between Rust and C++ code. The internet giant joined the Rust Foundation in 2021, for the same reason, and has adopted the memory-safe ...
1 year ago Securityweek.com
CVE-2019-16760 - Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration key. Usage of the `package` key to rename dependencies in `Cargo.toml` is ignored in Rust 1.25.0 and prior. When Rust 1.25.0 and ...
5 years ago
Google throws $1m at Rust Foundation to build C++ bridges The Register - Google on Monday donated $1 million to the Rust Foundation specifically to improve interoperability between the language and C++. C++, a popular general purpose programming language, has arguably fallen out of fashion due to concerns over safety. ...
1 year ago Go.theregister.com
CVE-2023-30624 - Wasmtime is a standalone runtime for WebAssembly. Prior to versions 6.0.2, 7.0.1, and 8.0.1, Wasmtime's implementation of managing per-instance state, such as tables and memories, contains LLVM-level undefined behavior. This undefined behavior ...
2 years ago
CVE-2025-38033 - In the Linux kernel, the following vulnerability has been resolved: ...
5 days ago
CVE-2018-5392 - mingw-w64 version 5.0.4 by default produces executables that opt in to ASLR, but are not compatible with ASLR. ASLR is an exploit mitigation technique used by modern Windows platforms. For ASLR to function, Windows executables must contain a ...
5 years ago
Hamas-Linked APT Wields New SysJoker Backdoor Against Israel - Attackers linked to the Palestinian militant group Hamas are using a revamped version of the SysJoker multi-platform backdoor to attack targets in Israel as the current conflict between the two continues despite a current pause in the fighting. An ...
1 year ago Darkreading.com
Google Pushes Software Security Via Rust, AI-Based Fuzzing - Google is making moves to help developers ensure that their code is secure. The IT giant this week said it is donating $1 million to the Rust Foundation to improve interoperability between the Rust programming language and legacy C++ codebase in ...
1 year ago Securityboulevard.com
Lazarus Group bang on trend with memory-safe Dlang malware The Register - Research into Lazarus Group's attacks using Log4Shell has revealed novel malware strains written in an atypical programming language. DLang is among the newer breed of memory-safe languages being endorsed by Western security agencies over the past ...
1 year ago Go.theregister.com Andariel Lazarus Group
Researchers Compared Malware Development in Rust vs C & C++ Languages - A comprehensive analysis conducted in 2023 by the Rochester Institute of Technology aimed to assess whether malware developed in Rust truly presents greater challenges to security analysts than traditional C/C++ implementations. The investigation ...
2 months ago Cybersecuritynews.com
Multi-layer Malware Sold on The Dark Web - Threat actors make use of fast-evolving multi-layer malware for their complexity and sophistication, as they offer the ability to rapidly adapt and change their code. To make analysis and countermeasures more difficult, this sophisticated type of ...
1 year ago Cybersecuritynews.com
CVE-2023-40030 - Cargo downloads a Rust project’s dependencies and compiles the project. Starting in Rust 1.60.0 and prior to 1.72, Cargo did not escape Cargo feature names when including them in the report generated by `cargo build --timings`. A malicious package ...
1 year ago
CVE-2024-47763 - Wasmtime is an open source runtime for WebAssembly. Wasmtime's implementation of WebAssembly tail calls combined with stack traces can result in a runtime crash in certain WebAssembly modules. The runtime crash may be undefined behavior if ...
8 months ago
Hackers Weaponizing Certificates & Stolen Private Keys to Infiltrate Organizations - This emerging attack vector exploits the inherent trust placed in digitally signed code and certificates, allowing malicious actors to bypass traditional security controls that typically flag unsigned executables. When executed, the malware inherits ...
2 months ago Cybersecuritynews.com
CVE-2022-21658 - Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. The Rust Security Response WG was notified that the `std::fs::remove_dir_all` standard library function is vulnerable a ...
2 years ago
CVE-2022-36113 - Cargo is a package manager for the rust programming language. After a package is downloaded, Cargo extracts its source code in the ~/.cargo folder on disk, making it available to the Rust projects it builds. To record when an extraction is ...
1 year ago
New DarkCloud Stealer Uses AutoIt to Evade Detection & Steal Login Credentials - A new variant of the DarkCloud information-stealing malware has emerged, leveraging the AutoIt scripting language to bypass security tools and harvest sensitive credentials from infected systems. According to researchers at Palo Alto Networks’ Unit ...
1 month ago Cybersecuritynews.com
CVE-2023-38497 - Cargo downloads the Rust project’s dependencies and compiles the project. Cargo prior to version 0.72.2, bundled with Rust prior to version 1.71.1, did not respect the umask when extracting crate archives on UNIX-like systems. If the user ...
1 year ago
Signing Executables With Azure DevOps - This signing tool is compatible with all major executable files and works impeccably with all OV and EV code signing certificates. It's mostly used with Azure DevOps due to the benefit of Azure Key Vault. Here, you will undergo the complete procedure ...
1 year ago Feeds.dzone.com
CVE-2024-24828 - pkg is tool design to bundle Node.js projects into an executables. Any native code packages built by `pkg` are written to a hardcoded directory. On unix systems, this is `/tmp/pkg/*` which is a shared directory for all users on the same local system. ...
1 year ago
CVE-2020-10733 - The Windows installer for PostgreSQL 9.5 - 12 invokes system-provided executables that do not have fully-qualified paths. Executables in the directory where the installer loads or the current working directory take precedence over the intended ...
3 years ago
New macOS Malware 'ReaderUpdate' Upgraded Arsenal With Nim and Rust Variants - A sophisticated macOS malware loader platform known as “ReaderUpdate” has significantly evolved its capabilities, with researchers identifying new variants written in Nim and Rust programming languages. Initially distributed as a compiled ...
2 months ago Cybersecuritynews.com