Paint by Numbers vs. Monet

Russ Gideon

BruCON 0x05 · Day 2

Overview

Russ Gideon's talk, "Paint by Numbers vs. Monet," delivers a compelling dissection of real-world Advanced Persistent Threat (APT) campaigns, contrasting their methodologies with those commonly employed by penetration testers. Drawing from extensive experience leading red teams and analyzing countless APT operations, Gideon argues that the prevailing perception of APTs as universally sophisticated "boogeymen" is often misplaced. Instead, he reveals that many successful APT techniques are surprisingly simple, pragmatic, and designed to achieve objectives with minimal effort, often leveraging readily available tools or slightly modified versions thereof.

Watch on YouTube

Visual summary for Paint by Numbers vs. Monet by Russ Gideon
Visual summary for Paint by Numbers vs. Monet by Russ Gideon

Key moments

  1. 2:09 Talk's core message: neither Monet nor Paint by Numbers
  2. 7:50 APT operators work no harder than necessary
  3. 11:47 Confirmed APT campaigns use Metasploit modules
  4. 19:07 APT customizes MimiKatz and PSExec for stealth
  5. 32:16 Lethal UPS group uses UPX and sticky keys
  6. 40:40 Nation-state operator goals differ from pen testers
  7. 44:00 Critical thinking is key for initial protection

Paint by Numbers vs. Monet

Speakers: Russ Gideon, Director of Malware Research

Conference: BruCON

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

Overview

Russ Gideon's talk, "Paint by Numbers vs. Monet," delivers a compelling dissection of real-world Advanced Persistent Threat (APT) campaigns, contrasting their methodologies with those commonly employed by penetration testers. Drawing from extensive experience leading red teams and analyzing countless APT operations, Gideon argues that the prevailing perception of APTs as universally sophisticated "boogeymen" is often misplaced. Instead, he reveals that many successful APT techniques are surprisingly simple, pragmatic, and designed to achieve objectives with minimal effort, often leveraging readily available tools or slightly modified versions thereof.

The core premise of the talk is that while the penetration testing industry has evolved to prioritize innovation and public disclosure, APT operators prioritize stealth, persistence, and effectiveness. This fundamental difference leads to distinct approaches to initial access, lateral movement, and operational security (OpSec). Gideon, co-developer of the Hermes attack research malware engine, grounds his conclusions in forensic and binary analysis, providing concrete examples of how APT groups reuse code, customize commodity tools, and craft their attacks to evade detection and blend into target environments.

Ultimately, the talk serves as a critical reflection on the security industry's assumptions and practices. It challenges defenders to look beyond the "paint by numbers" approach of relying on easily detectable pen testing artifacts and instead embrace a more "Monet-like" nuanced understanding of attacker behavior. By highlighting the subtle but significant differences in tradecraft, Gideon urges a shift towards more critical thinking in defense, emphasizing the need for comprehensive system testing and an understanding of the adversary's true objectives, rather than merely checking for known vulnerabilities.

Background

▶ Watch: Talk's core message: neither Monet nor Paint by Numbers (2:09)

The penetration testing industry, driven largely by the need to understand attacker mechanisms, emerged from an era characterized by network-based scans, exploits, and remote code execution. As this industry matured, particularly in the US, it became a significant "money industry," fostering innovation among white-hat researchers. Pioneers like HD Moore pushed boundaries, but as the industry grew, a focus on tools and commodity solutions began to take hold. Simultaneously, attackers evolved, employing diverse malware, deception techniques, protocol flaws, and anti-analysis measures. However, Gideon contends that the pen testing industry didn't always evolve in parallel with these sophisticated threats, often relying on "tools, tools, tools" rather than bespoke, context-aware offensive tradecraft.

The high cost of advanced research—such as studying memory corruption, ASLR bypasses, and ROP gadgets—created a financial barrier that further pushed the pen testing industry towards commercial, off-the-shelf solutions. This divergence led to "strange bedfellows" where both APT operators and pen testers might, at times, use similar exploit techniques or tools. However, their underlying motivations and operational philosophies remained fundamentally different. For the purpose of this talk, Gideon explicitly states that "APT operators" primarily refers to Chinese operators, acknowledging that other groups exist but focusing on this specific adversary set for the examples provided.

Gideon argues that the "advanced" in APT is often a misnomer. While certain elements can be advanced, many APT campaigns succeed due to their "strength in numbers" and a pragmatic approach: attackers "work as hard as they have to, but they don't really work any harder." His team, which conducts what they call "APT simulations" or "targeted simulations" rather than traditional pen tests, confirms that while the game has gotten "a tiny bit harder" for defenders in some areas, the fundamental approach to targeted attacks often remains less complex than commonly perceived. This background sets the stage for a detailed comparison of APT and pen tester methodologies, revealing surprising simplicity and effectiveness in the former.

Key Findings

▶ Watch: Confirmed APT campaigns use Metasploit modules (11:47)

The central revelation of Gideon's talk is that the "Advanced" in Advanced Persistent Threat (APT) often refers more to the persistence and targeting than to universal sophistication of the techniques themselves. Key findings include:

  • Pragmatism over Prowess: APT operators are not always the "highly sophisticated boogeymen" often portrayed. They prioritize getting the job done efficiently, even if it means using simple, "crappy" exploit code or commodity tools. Their goal is objective attainment, not necessarily technical elegance or innovation.
  • Reuse and Adaptation: APT groups frequently reuse successful techniques, tools, and even specific file names (igfxver.exe). They are quick to adapt and integrate publicly disclosed exploits or modules (like Metasploit) into their operations, often with minimal modifications for evasion.
  • Operational Security (OpSec) through Customization: While they may start with off-the-shelf components, APTs customize these for better stealth and to leave less detectable forensic evidence. This includes modifying shellcode, adding encoding layers, or building custom wrappers around tools like Mimikatz and PSExec to control service names and communication channels (e.g., named pipes).
  • Forensic Blending: A critical distinction is the APT's effort to blend in. Unlike many pen testing tools that generate easily identifiable, randomized artifacts (e.g., Metasploit's random service names), APT tools are designed to appear normal or to leave minimal, ambiguous traces.
  • Pen Tester Constraints: Pen testers operate under significant constraints (scope, time, legal limitations) that often prevent them from emulating true nation-state adversary behavior. Their objectives are typically to test individual vulnerabilities and gain shells, not to simulate a full, persistent targeted attack on the entire system's monitoring and response capabilities.
  • Critical Thinking for Defense: The talk implicitly argues that relying solely on signature-based detection or looking for "obvious badness" from commodity pen testing tools is insufficient. Defenders need to employ critical thinking to identify subtle anomalies, understand attacker objectives, and test their entire defensive ecosystem, including monitoring, triaging, and disaster recovery processes.

Technical Deep Dive

▶ Watch: APT customizes MimiKatz and PSExec for stealth (19:07)

Gideon illustrates the stark differences between APT and pen tester methodologies through detailed technical examples spanning initial access, lateral movement, and C2 server staging.

Initial Access: The Phishing Vector and Metasploit Rip-offs

Initial access for APTs frequently relies on phishing, often involving attachments with malicious file formats, embedded objects (Flash in Office, executables in PDFs), or obfuscated binaries. A common route also involves targeting non-mail accounts, exploiting the tendency of users to click on anything.

A prime example presented is the exploitation of CVE-2010-2883, a CoolType DLL buffer overflow vulnerability in Adobe Reader and Acrobat. Gideon's team observed 22 unique samples exploiting this CVE in their collection, with a striking seven of these samples utilizing Metasploit modules for the exploit. This highlights the APT's willingness to leverage publicly available tools.

Comparing a Metasploit-generated PDF with an APT-used malicious PDF for CVE-2010-2883, Gideon noted that if the host wasn't vulnerable, the Metasploit module would pop open a simple "Hello World" PDF. The APT-used PDF contained the exact same "Hello World" content, indicating a direct rip-off. The most significant difference was in the shellcode. While Metasploit's shellcode was relatively straightforward, the APT's version used double hex encoding, which effectively bypassed most IDS/IPS solutions that would easily detect the simpler Metasploit version. Crucially, beyond this encoding layer, the underlying DEP and ASLR bypasses were identical to those implemented in the Metasploit module.

Further analysis revealed APT operational patterns:

  • Consistent File Names: One original sample dropped igfxver.exe, categorized by AV as the Shipper family. Gideon notes that APTs, if successful, will often keep these internal file names consistent, demonstrating their "don't fix what isn't broken" mentality.
  • Rapid Adaptation: A separate sample, identified as the Protox family, was delivered approximately two weeks later, exploiting the same vulnerability. This timing suggests the attacker quickly ported jduff's Metasploit module (which implemented the ROP gadgets and DEP/ASLR bypasses within two days of the vulnerability's public disclosure) into their own payload, only changing the shellcode and adding a layer of difficulty.

Lateral Movement: Mimikatz, Custom PSExec, and Named Pipes

APT lateral movement strategies diverge significantly from typical pen testing approaches, particularly in their OpSec.

  • Long-Term Backdoors: APT groups establish persistent backdoors, which vary widely in sophistication. Some exhibit "extremely difficult string obfuscation methods," while others use "junk" custom packers that are easily defeated by looking for patterns like junk EAX. Groups also differ in their deployment strategy, with some using a single backdoor and others deploying three or four.
  • Credential Harvesting: While tools like Mimikatz are prevalent for both APTs and pen testers, APTs often customize them. Gideon cites an example from March 2012 where APT-1 (Mandiant's labeling) used the standard Mimikatz. However, by September 2012, the same group at a different location had built their own version of Mimikatz. This custom version worked identically but wrote credentials to a consistently named log file, offering better control and reducing forensic noise compared to an off-the-shelf tool.
  • Custom PSExec Functionality: A detailed example of customized lateral movement involved nps.exe, a custom PSExec-like tool. This file was packed with a commercial packer (referred to as "the miner," likely Themida or a similar product).
  • Usage: nps.exe -install <victim_IP> <service_name>
  • Mechanism: It copies itself to the victim's admin$ share (e.g., C:\Windows\System32), creates a service (e.g., np server) with a customizable name, and starts it.
  • Communication: Crucially, this binary uses named pipes for communication, eliminating the need to open extra ports and significantly reducing network-based forensic evidence.
  • Defensive Implications: From a forensic perspective, defenders would see a service named np server (or whatever the attacker chose) in event logs and the registry. This contrasts sharply with Metasploit's PSExec module, which generates a service with eight random alpha characters for its name (e.g., rand_text_alpha) and a display name like m+rand_text_alpha(32)+31. Such random names are "obvious badness" and easily detectable with simple regex patterns in event logs.
  • OpSec Advantage: The nps.exe tool's flexibility in naming services allows it to blend into legitimate system activity, making detection much harder. Gideon's team demonstrated this by creating a Metasploit PSExec module modification (requiring "no more than probably 10 lines of Ruby") that allowed customization of service and display names, proving how easily this OpSec gap could be closed. At the time of the talk, nps.exe was still not detected by any AV engines.

C2 Server Staging and Persistence: The "UPS Group" Example

Gideon also provided insight into APT C2 server staging, an area rarely observed by pen testers. On one C2 server, his team found 1.eml, rar2.exe, and rar2.gif.

  • 1.eml was a pre-baked email containing a base64-encoded rar2.exe, ready for exfiltration via email ("through the front door") rather than standard C2 mechanisms.
  • mm.exe: This executable, associated with the "UPS group" (named because they often replaced the ups.exe service), was a simple automation tool. It was a self-executing RAR file and, astonishingly, packed with UPX – a basic packer often used in entry-level reverse engineering courses. This again underscores the "simple and effective" mantra.
  • Persistence Mechanisms: When mm.exe ran, it dropped 2.bat and mm.exe (a different version) to the temp directory.
  • 2.bat performed Sticky Keys and Utilman replacement. Instead of the common cmd.exe replacement, it replaced sethc.exe with explorer.exe and magnify.exe with the new mm.exe (this was specific to Windows XP). This would bypass auditing checks looking only for cmd.exe replacements.
  • The second mm.exe dropped 22.bat, which created a user syslam$ with a "left-handed" password (qazwsx!12#) and added it to the local admin group.
  • This established secure communications via RDP (encrypted) and multiple layers of persistence through the accessibility features. The attackers could then hit Shift five times or Windows+U to re-execute their backdoors.

The entire process of building these SFX RAR files with embedded batch scripts took "seconds," illustrating that complex frameworks are often unnecessary for effective attacks. The verdict: the attacker's approach was "simple and effective and doesn't work harder than what they have to."

Demo / Proof of Concept

▶ Watch: Nation-state operator goals differ from pen testers (40:40)

While Russ Gideon's talk is rich with detailed technical analysis and comparative examples of APT techniques versus traditional penetration testing approaches, it does not describe a live demonstration or proof of concept performed during the presentation. Instead, the "Demo / Proof of Concept" aspect is covered through the in-depth forensic analysis of actual APT samples and the comparison of their artifacts with those generated by known penetration testing tools like Metasploit. The speaker does mention that his team created a modified Metasploit PSExec module with enhanced OpSec features (customizable service names) and made it available on GitHub, implying this was a proof of concept for improving pen testing tool stealth, rather than a live demonstration during the talk itself.

Defensive Implications

▶ Watch: Critical thinking is key for initial protection (44:00)

The insights gleaned from "Paint by Numbers vs. Monet" offer critical defensive implications, urging a paradigm shift from reactive, signature-based security to proactive, intelligence-driven defense:

  • Beyond Signature-Based Detection: APTs frequently modify commodity tools or use simple encoding to bypass traditional IDS/IPS and AV signatures. Defenders must move beyond relying solely on known bad indicators and implement behavioral analysis and anomaly detection. Look for unusual process behavior, network communication patterns (e.g., named pipes for shell shoveling), and deviations from baseline system activity.
  • Enhanced Host Auditing: Focus on meticulous host-based forensics. This includes:
  • Event Log Monitoring: Implement robust logging and analyze event logs for service creation. Critically, look for both randomly generated service names (indicative of commodity pen testing tools like default Metasploit) and unusual but seemingly legitimate service names (indicative of APT OpSec, like np server).
  • Registry Monitoring: Track changes in registry keys related to services, startup entries, and other persistence mechanisms.
  • File System Integrity Monitoring: Detect unauthorized file drops (e.g., nps.exe in System32), especially in critical system directories.
  • Secure Configuration and Patch Management: Promptly patch known vulnerabilities (e.g., CVE-2010-2883) to deny initial access vectors. Implement secure default configurations, especially regarding user permissions and administrative shares (e.g., preventing local admin accounts from writing to C$ or admin$ on Windows 7/Vista+).
  • User Education and Phishing Awareness: Given the prevalence of phishing as an initial access vector, continuous and effective user education is paramount. Users should be trained to identify and report suspicious emails and attachments, regardless of whether they arrive in personal or corporate inboxes.
  • Monitor for Accessibility Feature Abuse: Be vigilant for modifications to accessibility features like Sticky Keys (sethc.exe) and Utilman (utilman.exe, magnify.exe). Implement auditing that looks beyond just cmd.exe replacements, as APTs can use other executables (e.g., explorer.exe, custom backdoors).
  • Strong Password Policies and Auditing: Enforce complex password requirements and regularly audit for weak or easily guessable patterns, such as "left-handed" keyboard passwords (qazwsx!12#). Monitor for the creation of new, suspicious local user accounts, especially those ending with $ (like syslam$).
  • Holistic System Testing: Shift from testing individual vulnerabilities to testing the "system as a whole." This means targeted simulations that assess the entire defensive ecosystem, including:
  • Monitoring capabilities: Can security teams detect the subtle indicators of compromise?
  • Triage processes: How effectively are alerts handled and prioritized?
  • Incident Response (IR) teams: How quickly and effectively can they contain and eradicate a persistent threat?
  • Business Continuity and Disaster Recovery (BCDR): Is the organization prepared for the broader impact of a successful attack, even if it starts as a seemingly small incident?
  • Critical Thinking in Defense: Empower security analysts to think like adversaries. Encourage them to question assumptions, understand attacker motivations, and look for "why" an attacker chose a particular technique, rather than just "what" technique was used. This includes leveraging existing security tools (like AVs with "the best root kit") in creative ways not originally intended by their developers.

Key Takeaways

  • APTs are Pragmatic, Not Always Sophisticated: Many successful APT campaigns leverage simple, effective techniques and commodity tools, prioritizing objective attainment over technical elegance.
  • OpSec Through Customization: APTs frequently modify off-the-shelf tools (e.g., Metasploit modules, Mimikatz, PSExec) to enhance stealth, evade detection, and blend into target environments.
  • Forensic Evidence Can Be Subtle: Unlike many noisy pen testing tools, APTs design their implants and lateral movement techniques to leave minimal or ambiguous forensic evidence, often by using named pipes or customizable service names.
  • Pen Testers and APTs Have Different Goals: Pen testers operate under constraints and often aim to find vulnerabilities or gain shells. APTs have specific targeting goals and are focused on persistent access and data exfiltration, testing the entire defensive ecosystem.
  • Critical Thinking is Paramount for Defense: Relying solely on signature-based detection is insufficient. Defenders need to employ critical thinking, behavioral analysis, and holistic system testing to identify subtle anomalies and understand adversary motivations.
  • Continuous Education and Holistic Testing are Essential: Organizations must invest in robust user education, patch management, and comprehensive testing of their monitoring, incident response, and disaster recovery processes to effectively counter persistent threats.

About the Speaker(s)

Russ Gideon is the Director of Malware Research, a role that has provided him with extensive insight into the intricacies of malicious software and attack methodologies. He has a distinguished background, having led numerous red teams in both the private and government sectors. His expertise spans foreign attack profiling and reverse engineering, allowing him to analyze and understand a vast array of Advanced Persistent Threat (APT) campaigns across various shapes and sizes. Gideon is also recognized as the co-developer of Hermes, an attack research malware engine. His recent work has focused on integrating malware and attack profiling attributes directly into penetration testing practices, aiming to bridge the gap between real-world adversary techniques and simulated attacks.

Reviews

→ Top-rated talks at BruCON 0x05

All talks from BruCON 0x05