$SignaturesAreDead = “Long Live RESILIENT Signatures” wide ascii nocase

Daniel Bohannon (Applied Security Researcher · FireEye), Matthew Dunwoody (Applied Security Researcher · FireEye)

BruCON 0x0A · Day 2

Overview

In the dynamic landscape of cybersecurity, the efficacy of traditional signature-based detections is in constant decline. Daniel Bohannon and Matthew Dunwoody, both Applied Security Researchers at FireEye, tackled this critical challenge in their BruCON 2018 talk, "$SignaturesAreDead = “Long Live RESILIENT Signatures” wide ascii nocase". The presentation dissects the limitations of static, rigid indicators of compromise (IOCs) and advocates for a robust, methodology-driven approach to detection engineering. Drawing from their extensive experience in incident response and product development at Mandiant and FireEye, Bohannon and Dunwoody present a comprehensive framework for building resilient signatures that adapt to evolving attacker tradecraft, including sophisticated obfuscation and evasion techniques.

Watch on YouTube

Visual summary for $SignaturesAreDead = “Long Live RESILIENT Signatures” wide ascii nocase by Daniel Bohannon, Matthew Dunwoody
Visual summary for $SignaturesAreDead = “Long Live RESILIENT Signatures” wide ascii nocase by Daniel Bohannon, Matthew Dunwoody

Key moments

  1. 0:00 Introduction: "Long Live Resilient Signatures"
  2. 5:30 Good signatures are resilient, methodology-based, and proactive
  3. 7:40 High-level detection development process overview
  4. 14:20 Why binaries still matter for detection
  5. 21:50 Leveraging binary attributes beyond hashes for detection
  6. 27:50 Regsvr32 evasion: challenging command-line argument assumptions
  7. 37:00 SCT file evasion: minimal requirements and obfuscation
  8. 49:00 Q&A: New obfuscation techniques and attacker adoption

$SignaturesAreDead = “Long Live RESILIENT Signatures” wide ascii nocase

Speakers: Daniel Bohannon (Applied Security Researcher, FireEye); Matthew Dunwoody (Applied Security Researcher, FireEye)

Conference: BruCON

YouTube: https://www.youtube.com/watch?v=YGJaj6_3dGA

Overview

In the dynamic landscape of cybersecurity, the efficacy of traditional signature-based detections is in constant decline. Daniel Bohannon and Matthew Dunwoody, both Applied Security Researchers at FireEye, tackled this critical challenge in their BruCON 2018 talk, "$SignaturesAreDead = “Long Live RESILIENT Signatures” wide ascii nocase". The presentation dissects the limitations of static, rigid indicators of compromise (IOCs) and advocates for a robust, methodology-driven approach to detection engineering. Drawing from their extensive experience in incident response and product development at Mandiant and FireEye, Bohannon and Dunwoody present a comprehensive framework for building resilient signatures that adapt to evolving attacker tradecraft, including sophisticated obfuscation and evasion techniques.

The core of their message revolves around a systematic process for developing detections that are proactive, defense-in-depth oriented, and capable of identifying malicious activity across various vectors—from host-based artifacts to network communications. They emphasize the importance of challenging assumptions about attacker behavior and the functionality of common tools, illustrating how seemingly minor variations can bypass naive detections. Through detailed case studies involving both traditional binaries and "living off the land" techniques like regsvr32, the speakers demonstrate how a deep understanding of execution flows and artifact generation can lead to far more effective and enduring security controls.

This talk is particularly relevant for security practitioners, threat hunters, and detection engineers who are grappling with the limitations of conventional security tools. It provides actionable insights into how to move beyond reactive, hash-based detections towards a more analytical and anticipatory posture. By outlining a repeatable process for detection development and testing, Bohannon and Dunwoody empower defenders to build advanced capabilities that not only catch known threats but also identify novel attack methodologies before they become widespread. Their collaborative approach, born from years of shared experience, underscores the continuous learning and adaptation required to stay ahead of adversaries.

Background

▶ Watch: Introduction: "Long Live Resilient Signatures" (0:00)

The terms used in the detection community—signatures, triggers, rules, IOCs—often carry loaded meanings and are frequently used interchangeably. Bohannon and Dunwoody begin by establishing a broad, unifying definition for detection: "trying to find things that were not meant to be found, things that were concealed." This encompasses both real-time and historical analysis, host and network-based observations, and is designed to be language and tool-agnostic, maximizing the applicability of research efforts.

Traditional indicators like MD5 hashes, IP addresses, and FQDNs are acknowledged as useful for active incident scoping within a specific environment. However, the speakers quickly highlight their rigidity and fragility: "those are things that can very easily be changed." Relying solely on such indicators for broader malware family detection is deemed "naive" as attackers routinely alter binaries (using builders, polymorphic malware, version updates) and infrastructure. This continuous cat-and-mouse game renders static IOCs quickly obsolete.

Instead, the talk advocates for resilient signatures that are:

  • More resilient than rigid: Employing a defense-in-depth approach that attacks a methodology from many angles, forcing attackers to evade multiple controls.
  • More methodology-based than specific: While specific detections have their place, broad, overarching detections are crucial for gathering intelligence and identifying shifts in attacker tradecraft.
  • More proactive than reactive: Moving beyond simply writing detections for new malware to anticipating future techniques by researching new topics, monitoring open-source intelligence (OSINT) like Twitter and GitHub, and conducting internal research. This proactive stance aims to "staying ahead before we actually see an attacker use this."

The fundamental problem addressed is the inherent asymmetry between defenders and attackers. Attackers can easily modify their tools and techniques, often testing against public AVs (e.g., VirusTotal) until their payload bypasses detection. Defenders, conversely, must build robust and adaptable detections that can withstand these changes. This necessitates a shift from merely identifying known bad artifacts to understanding and detecting underlying malicious methodologies.

Key Findings

▶ Watch: High-level detection development process overview (7:40)

The central contribution of this talk is a structured, iterative process for detection development and testing, designed to produce resilient signatures. This methodology moves beyond simplistic IOC matching to a more comprehensive and proactive approach.

The process, outlined by Matt Dunwoody, involves six key steps:

  1. Defining the Detections: Clearly identifying what needs to be detected (a specific malware family, a new technique, or a broad methodology), the desired timeframe (real-time vs. historical), location (endpoint, network, SIM, sandbox), applicable tools and signature formats (YARA, Snort, OpenIOC, EDR), and the acceptable false positive tolerance. This initial step sets the scope and constraints for the entire effort.
  2. Assembling a Sample Set: This involves both collecting (from threat intel feeds, blogs, malware repos for in-the-wild samples, daily scriptlet hashtags) and generating data (using malware builders, obfuscators, and developing new variants based on observed methodologies). A critical finding here is the importance of enumerating the entire problem set, not just common examples, and explicitly challenging the assumption that attackers will only use techniques in their initially released form. Attackers "change everything" if assumptions are made.
  3. Testing Existing Protections: Before investing in new development, it's crucial to assess current coverage. This helps identify existing "free wins," pinpoint gaps, focus energy where detections are weakest, and adjust the priority of opaque alerts (e.g., recognizing that a "generic" AV detection might correspond to invoke-mimikatz). This testing must be done safely in isolated environments.
  4. Generating Data for Detections: Creating the specific logs, PCAPs, binary metadata, or strings necessary for the detection logic. This often involves dynamic execution reports from sandboxes, malware analysis reports, and using tools like PE-Explorer, CFF Explorer, Sigcheck, and FLOSS (for strings and stack strings).
  5. Writing the Detections: The approach here is to "start broad and tune down" to minimize assumptions. Detections should be translatable across different formats (e.g., YARA rules can inform Snort rules). Crucially, developers must actively try to bypass their own methodology-based detections, thinking like an attacker to identify weaknesses. Specific rules may be needed for edge cases.
  6. Testing and Tuning: This involves rigorous false negative testing against the sample set, false positive testing against legitimate data (starting small, scaling up), revalidating tuning changes, and documenting any compromises made to meet false positive targets. New true positives identified during deployment also require retesting.

Another significant finding is the enduring relevance of binaries in the threat landscape, despite the focus on fileless malware. The speakers note that AV signatures often lag by "anywhere from three weeks to a month," and attackers actively test against AVs, including ML-based solutions, using tools like VirusTotal to ensure bypasses. This necessitates custom, internal signatures that attackers cannot test against. Furthermore, robust binary detections offer critical intelligence-gathering capabilities (e.g., retro hunts) and provide additional context beyond what machine learning (ML) models can offer (e.g., identifying a specific APT group like APT28 versus a generic coin miner).

Finally, the talk highlights the rapid adoption of Living Off The Land (LOTL) techniques by attackers. The example of regsvr32 bypass, tweeted by Casey Smith in 2016, was observed in the wild by FireEye within hours. This underscores the need for proactive research into new techniques and the immediate development of detections for them, as attackers quickly integrate these into their toolkits.

Technical Deep Dive

▶ Watch: Leveraging binary attributes beyond hashes for detection (21:50)

The technical deep dive into detection development begins with a detailed exposition of the process outlined in the key findings, emphasizing the granular considerations at each stage. When defining detections, the choice of target (malware family, technique, or broad methodology) dictates the scope. For instance, detecting "all Chopstick malware variants" requires a different approach than a generalized "DNS for C2" detection. The choice of detection medium (endpoint, network, SIM, sandbox) and format (YARA, Snort, OpenIOC, EDR, ClamAV) is critical, as each offers unique capabilities and limitations. False positive tolerance is a paramount consideration, as it directly impacts the detection's aggressiveness and usability—an engagement-specific rule might tolerate more noise than a product-level one.

Assembling the sample set is not merely collecting hashes. For malware, high-confidence sources like threat intelligence feeds, blogs, and malware analysis reports are vital. The speakers also recommend leveraging resources like MITRE ATT&CK to find references to common malware families. For public malware or techniques, generating samples is crucial: this includes using multiple versions, exploring build options that change malware structure, behavior, or network communications (e.g., Cobalt Strike malleable C2 profiles), and intentionally applying common packers and obfuscators. This active generation ensures the detection covers the full spectrum of attacker variations, recognizing that "attackers change everything."

When writing detections, the strategy is to "start broad and tune down." This empirical approach minimizes assumptions and identifies actual false positive sources. The ability to translate detections between types (e.g., YARA rules informing Snort content searches) maximizes efficiency. A key technical practice is to actively challenge assumptions by attempting to bypass the detection logic, simulating attacker evasion. For example, if a detection relies on a specific string, can that string be obfuscated or broken up?

For binary detections, the talk moves beyond simple hashes to a rich array of PE file attributes and dynamic behaviors.

  • Authenticode signatures: Identifying legitimate or compromised signing certificates.
  • Imports and Exports: While import hashing can be useful, attackers have been observed "changing import hash as part of their builder" by adding or removing imports. Focusing on specific imports and exports can be more resilient.
  • Sections and Section Data: Anomalies in section names, sizes, or entropy.
  • Version Info: Windows PEs contain internal version information. Attackers might use the "wrong registered trademark Unicode symbol" or claim to be legitimate binaries (e.g., svchost) but have drastically different sizes or internal version strings.
  • Resources: Unique icons or other embedded resources.
  • Export Names and Timestamps: Often overlooked by attackers in their builders, these can provide stable indicators, especially for DLLs.
  • PE Characteristics: Anomalies in DLL/EXE flags.
  • Dynamic Execution Items: Persistence mechanisms, memory artifacts (like mutexes and named pipes), command and control configuration files, registry keys, and handles to these objects in memory.
  • Decoded In-Memory Strings: For packed binaries, FLOSS is highlighted as a valuable tool for extracting stack strings and other decoded strings that are not visible in the static binary.

The goal is to enumerate all available data, group samples, identify common elements, and build detections that capture the "core of this malware family," increasing the likelihood of catching future, unseen versions. Behavioral detections are preferred where possible, incorporating both malware structure and attacker TTPs in deployment and usage. While "weak detections" like hashes and domains are still included for context, they are not the primary reliance.

Demo / Proof of Concept

▶ Watch: Regsvr32 evasion: challenging command-line argument assumptions (27:50)

Daniel Bohannon provided a compelling proof of concept by dissecting the detection challenges posed by regsvr32.exe, a native Windows signed binary known for its app whitelisting bypass capabilities. This technique, publicized by Casey Smith (subTee) in 2016, allows regsvr32 to execute local or remote SCT (Scriptlet) files containing JScript, VBScript, or other languages. Bohannon systematically demonstrated how common assumptions about regsvr32 usage could be broken, leading to detection evasion.

Initially, a basic detection might look for regsvr32.exe combined with specific command-line strings like /s, /u, /i:, and an HTTP URL. However, this is easily bypassed:

Challenging Command-Line Assumptions:

  • Slashes: In URLs, forward and backward slashes are often interchangeable depending on the binary (e.g., PowerShell supports both).
  • Protocols: regsvr32 supports more than just HTTP/HTTPS; FTP, WebDAV, and local files are also viable. This necessitates splitting detections for remote vs. local SCTs.
  • Arguments: The arguments /s, /u, /i: can be reordered arbitrarily. Furthermore, some arguments commonly seen in POCs, like /m (help menu), are not actually required for execution.
  • Argument Prefixes: While regsvr32 typically uses forward slashes (/) for arguments, many binaries (like PowerShell using dashes -) can support both. A robust detection should account for /s OR -s.
  • File Extensions: regsvr32.exe, scrobj.dll, and the .sct file extension can all be omitted or changed. The operating system will find the executables via the PATHEXT variable, and the SCT file's functionality is based on its content, not its extension.
  • Renaming: Attackers can rename regsvr32.exe (e.g., to kc.exe) and scrobj.dll (e.g., to smith.dll). This completely bypasses detections based on specific process names or image load events.
  • Whitespace and Characters: A critical finding was that regsvr32 will ignore any characters placed after an argument until the next whitespace (e.g., /sANYTHING). This breaks simple regex patterns expecting specific delimiters.
  • Double Quotes: Double quotes can be inserted strategically as obfuscators, passed down from parent processes like cmd.exe, completely breaking string matching for arguments or URLs. The solution proposed is a post-processing step to remove special characters before analysis, simplifying detection logic.

Challenging SCT File Content Assumptions:

  • XML Structure: Many elements commonly found in copied-and-pasted SCT POCs (comments, specific XML tags like <package>, <component>, CDATA) are not actually required. A "minimal viable product" SCT file can be much smaller and simpler.
  • Class ID: The feedACDC Class ID, often left unchanged from Casey Smith's original POC, is a good indicator of copy-pasting but can be easily altered to any valid GUID.
  • Script Tags: The <script> tag is not strictly required; <component> tags can also be used. This leads to the concept of "reverse detection," where broad rules look for SCT files without expected script tags to catch novel evasions.
  • Script Language: While JScript is common, VBScript, JScript.Encode, and VBScript.Encode are also supported. Encoded scripts often have specific start/end markers that can be detected. If omitted, JScript is assumed.
  • XML Whitespace and Newlines: Whitespace can be added before ending tags or around equal signs, and newlines can be completely removed, further obfuscating the XML structure without breaking functionality.
  • Language-Specific Obfuscation: Inside the script tags, language-specific obfuscation (e.g., adding whitespace within JScript function calls like ActiveXObject () can bypass simple string matching.

Translating Detections:

The comprehensive understanding gained from breaking these assumptions leads to a multi-layered detection strategy:

  • Network Detections: Using Snort signatures to identify regsvr32 command-line artifacts transferred over the wire. Crucially, these should not be restricted by port, as attackers might use SMB for lateral movement with SCT files.
  • Endpoint Detections: Developing YARA rules to scan for SCT files in unexpected locations like Temporary Internet Files or InetCache. Even "fileless" regsvr32 operations often result in the OS caching the SCT file.
  • Threat Intelligence: Applying YARA rules to external sources like VirusTotal to discover new SCT variants and evasion techniques being uploaded by attackers.

Ultimately, the lesson is that "there is no magic regex" for such complex and dynamic evasion. Instead, the problem must be broken into many different detections: a default case, specific rules for obfuscation, rules for renamed executables/DLLs, and contextual detections (e.g., regsvr32 making network connections to non-RFC1918 addresses, or loading specific DLLs like WScript.OCX or jscript.dll). A "reverse detection" rule, looking for SCT files that are none of these other things, serves as a continuous feedback loop for identifying entirely new evasion techniques.

Defensive Implications

▶ Watch: Q&A: New obfuscation techniques and attacker adoption (49:00)

The talk provides several critical implications for defenders seeking to enhance their security posture:

  1. Embrace Resilient, Methodology-Based Detections: Move away from relying solely on rigid, easily changed IOCs like hashes and IPs. Instead, focus on detecting the underlying attacker methodologies, tradecraft, and behaviors. This requires a deeper understanding of how attackers operate and how legitimate tools can be abused.
  2. Continuously Challenge Assumptions: Defenders must adopt an attacker's mindset and actively attempt to bypass their own detections. This involves understanding how tools (like regsvr32) truly function, how command-line arguments are parsed, and how common obfuscation techniques (whitespace, renaming, encoding) can be applied. Regularly asking "I wonder if this works?" and testing those hypotheses is crucial.
  3. Implement a Systematic Detection Development Process: Adopting the outlined six-step process (define, sample, test existing, generate data, write, test/tune) provides a structured and repeatable framework for creating robust detections. This ensures comprehensive coverage and minimizes blind spots.
  4. Leverage Diverse Data Sources and Tool Sets: Effective detection requires integrating data from endpoints (process execution logs, file system, registry, memory), networks (PCAP, flow data), and security tools (SIM, EDR, sandboxes). Understand the specific artifacts generated by different activities and the capabilities/limitations of each detection tool (YARA, Snort, OpenIOC, EDR). Be prepared to compensate for data gaps or tool limitations.
  5. Prioritize and Contextualize Threats: Focus detection development efforts on high-priority threats, active intrusions, and prolific or publicly available malware. Use additional detection capabilities to provide context beyond generic ML alerts (e.g., identifying a specific APT group).
  6. Translate Detections Across Platforms: Maximize the return on investment for detection research by translating detection logic into as many applicable languages and platforms as possible. A single methodology can inform YARA rules, Snort signatures, EDR alerts, and SIEM queries.
  7. Integrate Hunting and Detection Engineering: Hunting and detection development are synergistic. Use hunting to validate existing detections, find new malicious activity, and identify patterns that can be automated into new detections. Noisy detections that don't meet production FP targets can still be valuable in a hunting context.
  8. Focus on the Full Attack Lifecycle: Detections should extend beyond initial compromise to cover lateral movement, privilege escalation, persistence, and command and control. Identifying "choke points" in the attack lifecycle (e.g., limited ways to move laterally) can lead to highly effective controls.
  9. Stay Abreast of Open-Source Intelligence: Monitor platforms like Twitter, GitHub, and security blogs for new techniques and tools released by red teamers and researchers. Attackers rapidly adopt these, so proactive detection development is essential.
  10. Automate Repetitive Tasks: Streamline data collection, analysis, and initial testing to free up security researchers to focus on high-value detection logic and methodology development. This enables more efficient iteration and adaptation.

Key Takeaways

  • Resilience over Rigidity: Detections must be more resilient, methodology-based, and proactive, rather than relying on rigid, easily-changed indicators like MD5 hashes or IP addresses.
  • Challenge All Assumptions: Continuously question how attackers operate, how tools behave, and the precise parsing rules of command lines and file formats to uncover evasion opportunities and build more robust detections.
  • Systematic Detection Engineering: Employ a structured, iterative process involving defining targets, assembling comprehensive sample sets (collected and generated), testing existing coverage, generating relevant data, writing broad-to-narrow detections, and rigorous testing/tuning.
  • Rich Binary Analysis: For binaries, leverage a wide array of PE file attributes (e.g., version info, export timestamps, resources) and dynamic execution behaviors (e.g., memory artifacts, C2 configurations) beyond simple hashes to create deep, contextual detections.
  • Layered Obfuscation Handling: Recognize that complex evasion techniques (like regsvr32 obfuscation) require breaking down the problem into multiple, layered detections rather than seeking a single "magic regex."
  • Holistic Security Integration: Integrate threat hunting, threat intelligence, open-source research, and incident response findings into a continuous cycle that informs and refines detection capabilities across all phases of the attack lifecycle.

About the Speaker(s)

Daniel Bohannon is an Applied Security Researcher at FireEye. Prior to this role, he spent several years as an Incident Response consultant with Mandiant. Bohannon is notably "obsessed with coffee and obfuscation," a passion that clearly informs his work in developing advanced detection techniques. His research and insights into attacker evasion are frequently shared with the community.

Matthew Dunwoody serves as a Senior Security Architect for Endpoint at FireEye. Before his current position, he also worked in applied security research and spent several years in Incident Response at Mandiant, often collaborating with Daniel Bohannon. Their combined experience across incident response and product development forms the foundation for the detection methodologies presented in this talk.

Reviews

  • Dr. Zero (Offensive Security Researcher) — MUST SEE ★★★★★

→ Top-rated talks at BruCON 0x0A

All talks from BruCON 0x0A