Chasing the White Whale of Malware
Daniel Kapellmann Zafra (Mandiant), Rushikesh Nandedkar (Mandiant)
BruCON 0x0D · Day 2
Overview
In the realm of cybersecurity, a particularly elusive and dangerous category of threats exists: malware designed specifically for Operational Technology (OT) and Industrial Control Systems (ICS). Often dubbed the "white whale of malware," these sophisticated tools are exceedingly rare, requiring immense resources and expertise to develop, yet possess the potential to cause catastrophic physical damage. This talk, presented by Mandiant's Daniel Kapellmann Zafra and Rushikesh Nandedkar, delves into the formidable challenge of identifying such bespoke malware and outlines a novel methodology applied by their team to hunt for these digital ghosts.

Key moments
- 0:00 Introduction to the 'White Whale' of OT malware
- 4:00 Common characteristics of advanced ICS/OT malware
- 8:00 Challenges in defining and obtaining OT binaries
- 20:00 Technical approach: Identifying functions of interest (APIs)
- 36:00 Advanced techniques: Fuzzy hashing, API sequences, device probes
- 42:00 Detecting network device probes and OT protocols
- 48:00 YARA rules: utility and managing noise
- 53:00 Conclusion and open challenge for future research
Chasing the White Whale of Malware
Speakers: Daniel Kapellmann Zafra (Mandiant), Rushikesh Nandedkar (Mandiant)
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=33aftkLmWS4
Overview
In the realm of cybersecurity, a particularly elusive and dangerous category of threats exists: malware designed specifically for Operational Technology (OT) and Industrial Control Systems (ICS). Often dubbed the "white whale of malware," these sophisticated tools are exceedingly rare, requiring immense resources and expertise to develop, yet possess the potential to cause catastrophic physical damage. This talk, presented by Mandiant's Daniel Kapellmann Zafra and Rushikesh Nandedkar, delves into the formidable challenge of identifying such bespoke malware and outlines a novel methodology applied by their team to hunt for these digital ghosts.
The presentation highlights that traditional security measures and analysis techniques are largely ineffective against OT-specific threats, which often mimic legitimate industrial processes or target proprietary hardware and protocols. Mandiant's research aims to equip the security community with practical tools and approaches to begin chasing these "white whales," transforming what was once an almost impossible task into a more systematic and achievable endeavor. By sharing their "tests of deduction," the speakers provide a framework for filtering through the vast noise of conventional malware samples to pinpoint those truly relevant to cyber-physical systems.
Background
▶ Watch: Introduction to the 'White Whale' of OT malware (0:00)
The urgency to find OT-specific malware is underscored by historical incidents that demonstrate its devastating potential. The speakers recount the 2017 TRITON (also known as TRISIS) incident, where Mandiant consultants responded to a customer experiencing process failures and plant flooding. Analysis revealed a highly sophisticated attack that had not only breached corporate and industrial networks but also deployed malware specifically engineered to target Schneider Electric Triconex safety instrumented systems (SIS) using a proprietary UDP protocol called Tristation. This attack, estimated to have taken three to four years to develop, represented one of the few documented instances of malware designed to cause direct physical impact rather than merely targeting IT infrastructure.
TRITON is not an isolated case but part of a small, elite group of publicly known OT malware. Other notable examples include:
- Stuxnet: Discovered in 2010, targeting Siemens PLCs to disrupt uranium enrichment centrifuges in Iran.
- Industroyer/CrashOverride: Responsible for blackouts in Ukraine in 2016, targeting electric power substations.
- BlackEnergy/Havoc: Caused another blackout in Ukraine in 2015, also targeting energy infrastructure.
- A Mandiant Proof-of-Concept (POC): An internally discovered sample, believed to target Siemens equipment, designed to replay traffic.
Common threads unite these "white whales": they are almost always discovered after an attack has already occurred, pose a physical danger, and embed specific keywords, protocols, or functions related to industrial or OT equipment (e.g., "Schneider," "Siemens," specific OT protocols).
The challenge in detecting this malware is multi-faceted. First, conventional security tools like antivirus (AV) and malware analysis sandboxes often fail to identify OT malware, sometimes even flagging legitimate OT files as malicious because they interact with hardware in unusual ways or are not designed for a typical IT environment. Second, visibility in OT environments is historically low, making it difficult to monitor network traffic or endpoint behavior effectively. Finally, the development of such malware demands significant resources, motivation, and specialized knowledge, typically associated with nation-state actors or highly sophisticated groups.
Mandiant’s approach focuses on "intermediary systems": the software that bridges IT and OT, interacting with PLCs (Programmable Logic Controllers), collecting sensor data, and displaying it for operators. These systems, while critical, are often obscure, with little public documentation, closed-source development, and proprietary components, making it difficult to even obtain legitimate binaries for analysis.
To overcome these hurdles, the team identifies four primary sources for collecting OT binaries:
- In-house collection: From organizations running ICS/OT systems.
- Manufacturers: Directly obtaining software from vendors (though challenging due to proprietary nature).
- Discussion forums: Open-source components or engineer discussions on specialized forums.
- Malware analysis platforms: Public repositories like VirusTotal or ANY.RUN. A newer, promising source is Adolus, which aims to be a repository for valid industrial firmware.
Initial hunting efforts often involve Yara rules and Snort rules, but these frequently generate an overwhelming amount of noise, necessitating a more refined filtering mechanism.
Key Findings
▶ Watch: Challenges in defining and obtaining OT binaries (8:00)
The primary contribution of this research is a structured methodology for identifying and filtering OT-relevant binaries from a vast and noisy dataset. Recognizing the limitations of traditional malware analysis and the unique characteristics of OT environments, Mandiant developed a series of "tests of deduction". These tests move beyond superficial indicators to deeply analyze binary functionality, pinpointing interactions with industrial devices and protocols.
The key finding is that by systematically applying these tests—ranging from string analysis to deep API call examination and network protocol identification—analysts can significantly reduce the operational overhead associated with OT malware hunting. This approach allows security researchers to distinguish between generic malware that might coincidentally contain OT-related strings and truly malicious binaries designed to interact with cyber-physical systems. The methodology provides a concrete, multi-layered framework to establish a "partial benchmark" for what constitutes an OT or cyber-physical system relevant binary, thereby enabling more efficient and targeted threat intelligence and hunting efforts against these "white whale" threats.
Technical Deep Dive
▶ Watch: Advanced techniques: Fuzzy hashing, API sequences, device probes (36:00)
The core of Mandiant's methodology lies in a series of "tests of deduction" designed to identify binaries specifically relevant to OT/ICS environments. These tests progressively narrow down potential candidates, moving from superficial indicators to deep functional analysis.
- Static Strings:
The most basic test involves running the strings command on a binary to extract all printable ASCII and Unicode strings. Analysts look for keywords commonly associated with OT, such as "PLC station number," "received from PLC," "Modbus," or names of specific industrial vendors (e.g., "Schneider," "Siemens").
- Limitation: As highlighted by Rushikesh, malicious actors can easily embed misleading strings to confuse analysts, making static strings an initial but not definitive indicator.
- Dynamic Strings (Floss):
To overcome the limitations of static strings, the team employs tools like FireEye's Floss (FireEye Labs Obfuscated String Solver). Floss extracts strings that are dynamically generated or deobfuscated in memory during execution. This provides a more reliable indicator of a binary's true intent, as it reflects what the program is actively using rather than just what's present in its static form. This test often reveals more specific and relevant OT-related terms that might be missed by static analysis.
- Functions of Interest / API Calls:
This is considered one of the most concrete tests. OT binaries are designed to interact with specific hardware devices, and these interactions are often facilitated through specific operating system API calls. The key insight is that most devices are recognized by the operating system as files. Therefore, an API call like OpenFile (or similar device-interaction functions) becomes a prime target for investigation.
- By analyzing the context of
OpenFilecalls, researchers can identify if the binary is attempting to access industrial registers, coils, or other device-specific components. For instance, the presence of an "error accessing coil register address field file" string immediately points to interactions with Modbus coils, a common element in industrial communication. - Tools like Radare2 and Ghidra are instrumental here. They allow for disassembling and decompiling binaries, searching for specific function calls, and then examining the surrounding code to understand the purpose and context of those calls.
- Device Probes:
OT malware often needs to "probe" for specific devices or configurations within an industrial network. This can involve attempting to communicate with known device addresses or using specific protocols.
- Evidence of device probing might appear as function calls related to hardware interfaces, such as
eth2serial(Ethernet to serial conversion), indicating attempts to bridge different communication mediums common in OT. - Failures in
OpenFilecalls (e.g., trying to access a coil that isn't present on the local network) can also serve as strong indicators of device probing behavior.
- Network Device Probes and OT Protocols:
Beyond local device interaction, OT malware is designed to communicate over industrial networks using specialized protocols. This test focuses on identifying functions or code related to these protocols.
- Traffic Analysis: Running the binary in a sandbox and monitoring network traffic for known OT protocols (e.g., Modbus TCP, Siemens S7, OPC UA) can reveal network probing.
- Binary Analysis (Ghidra/Radare2): Directly inspecting the binary for implementations or calls to functions associated with OT communication standards. The speakers demonstrated identifying external function calls for various IEC (International Electrotechnical Commission) protocols:
- IEC 101 underscore M/S: Master/Slave functionality for IEC 60870-5-101 (serial communication).
- IEC 102/103: Other IEC 60870-5 standards.
- IEC 104 underscore S/M: Slave/Master functionality for IEC 60870-5-104 (Ethernet communication, common for substations).
- IEC 61850: A standard for communication networks and systems in substations, including specific implementations like GOOSE (Generic Object Oriented Substation Event) messages (e.g.,
goose_send,goose_receive). - SPA Bus: Another protocol for substation control.
- The presence of these specific protocol functions, especially with master/slave or send/receive indicators, provides concrete evidence of a binary's OT relevance.
- Fuzzy Hashes / Import Hashes:
Traditional cryptographic hashes are highly sensitive to even minor changes in a file. Fuzzy hashing (e.g., ssdeep) generates a hash that reflects structural similarity, allowing for the identification of variants or similar code bases even if minor modifications have occurred. Import hashes (hashing specific imported functions) can also be useful. Given that much closed-source OT development reuses common code components or open-source libraries, fuzzy hashing specific sections of a binary can help link related samples or identify known OT-relevant code patterns, even without a full functional analysis. While no direct demo was provided for this, the concept was explained as a way to solve the challenge of minor binary changes.
- API Sequences (Future Work):
This approach, still in development, aims to identify specific sequences of API calls that collectively perform a particular industrial action, such as "reading a coil." By studying established behaviors for various cyber-physical systems, researchers hope to build a library of these sequences, allowing for a more robust and granular deduction mechanism for OT-relevant behavior across a multitude of binaries.
- Yara Rules:
While mentioned as an initial hunting method, Rushikesh noted its limitations in generating a lot of noise. He reported downloading 100,000 binaries daily with Yara, requiring 5 hours of manual sorting. However, Daniel acknowledged that other Mandiant researchers (like Kenneth Truska) have found more success with fine-tuned Yara rules, particularly by searching for actual memory artifacts. Despite the noise, Yara remains a valuable, accessible starting point for casting a wide net in OT malware hunting.
By combining these tests, Mandiant's methodology enables a systematic and increasingly precise identification of the rare "white whale" malware targeting industrial systems, significantly reducing the "clutter" and focusing analysis on truly impactful threats.
Demo / Proof of Concept
▶ Watch: Detecting network device probes and OT protocols (42:00)
The presentation included several live demonstrations of the described "tests of deduction" using various open-source tools:
- Static Strings: A simple demonstration involved running the
stringscommand on a target binary. The output, a flood of text, was then filtered usinggrepfor keywords like "plc station number" and "received from plc." This quickly highlighted several entries suggesting interaction with a PLC, demonstrating the initial, albeit superficial, relevance.
- Dynamic Strings (Floss): To show a more robust string analysis, the speakers used FireEye's Floss tool. When run on the same binary, Floss extracted strings that were likely resolved or deobfuscated in memory. This yielded a greater number of relevant entries, including some that might not have been visible through static analysis, providing a stronger indication of the binary's operational context.
- Functions of Interest (Radare2):
- The first part of this demo used Radare2, a powerful reverse engineering framework. The analyst searched for API calls containing the keyword "open file."
- Upon finding relevant calls, the analyst navigated to the specific memory address of one such call and disassembled the surrounding code. This revealed an error message: "error accessing coil register address field file." This string provided concrete proof of the binary's interaction with Modbus coil registers, a distinct cyber-physical system component, confirming its OT relevance.
- Functions of Interest & String Search (Ghidra):
- The second part of the functions demo utilized Ghidra, another widely used open-source reverse engineering tool. The analyst set up a new project, imported the target binary, and initiated the auto-analysis process.
- Once analysis was complete, the demonstration focused on Ghidra's symbol tree and data types panels. The analyst searched for keywords like "plc" and "modbus." While initial searches in the symbol tree were vague, a search within the data types panel revealed a definitive entry: "define if type plc," confirming the binary's direct relevance to Programmable Logic Controllers.
- Further, Ghidra's string search capability was used to find "plc station number" and "modbus" within the binary's source representation, providing additional strong evidence of OT functionality. The ability to click on a string and jump directly to its location in the disassembled or decompiled code allowed for contextual understanding.
- Network Device Probes (Ghidra & Radare2):
- A final set of demos showcased the identification of OT protocol implementations. Using Ghidra, the analyst searched for external function calls within a binary known to handle multiple protocols. This search quickly yielded entries like "iec 101_m" (IEC 101 Master), "iec 101_s" (IEC 101 Slave), "iec 61850," and specific GOOSE message functions (e.g.,
goose_send,goose_receive). - Similarly, a Radare2 demonstration confirmed these findings, showing a list of functions associated with IEC 104 (slave and master), IEC 61850 GOOSE, and SPA Bus. The presence of these specific protocol implementations, often with master/slave or send/receive indicators, served as robust proof that the binary was designed to interact with network devices using common OT communication standards, particularly those found in substations.
These demonstrations collectively illustrated the practical application of Mandiant's "tests of deduction," moving from basic string analysis to complex functional and protocol identification, providing a clear path for identifying OT-relevant binaries.
Defensive Implications
▶ Watch: Conclusion and open challenge for future research (53:00)
The insights from "Chasing the White Whale of Malware" offer critical implications for defenders operating in OT/ICS environments. The primary takeaway is the necessity to move beyond conventional IT security paradigms when addressing cyber-physical threats.
- Adopt Specialized Hunting Methodologies: Defenders must recognize that traditional antivirus and sandboxing tools are largely ineffective against highly specialized OT malware. Instead, they should adopt a methodology similar to Mandiant's "tests of deduction," focusing on the unique characteristics of industrial binaries. This involves developing internal expertise in reverse engineering and binary analysis of OT software.
- Understand "Intermediary Systems": Focus defensive efforts on intermediary systems—the software bridging IT and OT. These systems, often overlooked, are prime targets for actors aiming to manipulate PLCs and other control devices. Gaining visibility into and understanding the expected behavior of these systems is paramount.
- Prioritize Deep Technical Analysis: Reliance on superficial indicators like static strings is insufficient. Defenders need to invest in capabilities for dynamic string analysis (e.g., using Floss) and, crucially, deep function and API call analysis (e.g., using Radare2, Ghidra). Identifying interactions with specific industrial devices, registers, and proprietary protocols provides definitive proof of OT relevance.
- Monitor for OT Protocol Interactions: Implement monitoring solutions capable of detecting and analyzing traffic using native OT protocols (e.g., Modbus TCP, IEC 104, IEC 61850 GOOSE). Furthermore, analyze binaries for embedded implementations of these protocols, as this indicates a direct capability to interact with industrial networks.
- Leverage Open-Source Tools: The talk prominently featured open-source tools like Floss, Radare2, and Ghidra. Defenders should integrate these powerful, freely available tools into their security operations to perform in-depth analysis of suspicious binaries.
- Automate Filtering and Reduce Noise: Given the high volume of potential samples and the inherent noise in initial hunting (e.g., with broad Yara rules), automation is critical. Develop scripts and processes to automatically apply the "tests of deduction" to filter out irrelevant binaries, allowing human analysts to focus on the most promising leads.
- Collaborate and Share Information: The rarity of OT malware necessitates collaboration. While not explicitly stated as a defensive implication, the speakers' call for community engagement highlights the value of sharing findings and methodologies to collectively advance the defense of critical infrastructure.
By systematically applying these defensive implications, organizations can significantly improve their posture against the "white whale" of OT malware, moving from a reactive stance to a more proactive and intelligent hunting approach.
Key Takeaways
- OT Malware is Rare but High-Impact: Malware specifically targeting Operational Technology (OT) and Industrial Control Systems (ICS) is exceedingly rare ("white whale"), but its potential to cause physical damage to critical infrastructure makes it a top-tier threat.
- Traditional Security Tools are Ineffective: Conventional antivirus and sandboxes often fail to detect or accurately analyze OT-specific malware, frequently misidentifying legitimate industrial software as malicious or missing crucial OT-specific functionality.
- Mandiant's "Tests of Deduction" Provide a Framework: A multi-layered methodology, including static/dynamic string analysis, function/API call examination, and OT protocol identification, helps filter vast datasets to pinpoint truly OT-relevant binaries.
- Focus on Specific OT Functionality: Concrete evidence of OT relevance comes from identifying interactions with industrial devices (e.g., Modbus coils), specific API calls (
OpenFilein context), and embedded implementations of OT protocols (e.g., IEC 104, IEC 61850 GOOSE, SPA Bus). - Open-Source Tools are Critical for Analysis: Tools like FireEye's Floss, Radare2, and Ghidra are invaluable for performing the deep technical analysis required to identify and understand OT malware.
- Automation is Key to Managing Noise: Initial hunting methods like Yara rules often produce significant noise; automating the "tests of deduction" is essential to efficiently reduce clutter and focus analyst efforts on high-fidelity threats.
About the Speaker(s)
Daniel Kapellmann Zafra is a security expert from Mandiant who provided the strategic and threat intelligence context for understanding the challenges and importance of hunting for OT-specific malware. His role involved outlining why this type of malware is so unique, the historical incidents that define its impact, and the broader difficulties in its detection from a threat intelligence perspective.
Rushikesh Nandedkar is a Mandiant researcher who detailed the technical approach to filtering OT-relevant samples. He spearheaded the development and application of the "tests of deduction" methodology, demonstrating how to analyze binaries using tools like Floss, Radare2, and Ghidra to identify specific industrial interactions and protocols. He is described as an "amazing researcher" whose work focuses on making the complex task of OT malware hunting more automated and efficient.