EP30 The Golden Age of macOS Malware: Evolution, Stealers, and AI Workflows with Christopher Lopez

EP30 The Golden Age of macOS Malware: Evolution, Stealers, and AI Workflows with Christopher Lopez — Josh Stroschein

Josh Stroschein

AI-assisted summary of EP30 The Golden Age of macOS Malware: Evolution, Stealers, and AI Workflows with Christopher Lopez — original source. Check the original for full context.

Source published:

Key ideas

  • Enterprise adoption of Apple Silicon and Mac workstations has spurred a 'golden age' of macOS malware, transitioning threats from basic plain-text scripts to sophisticated, heavily obfuscated payloads mimicking Windows malware. (0:00)
  • Adversaries increasingly rely on ClickFix social engineering lures and malvertising for developer tools like Homebrew to trick users into executing malicious terminal commands, successfully bypassing Gatekeeper and notarization. (5:40)
  • Ransomware remains largely unviable on macOS due to the prohibitive cost of developing zero-day exploit chains to bypass System Integrity Protection (SIP) and Transparency, Consent, and Control (TCC). (25:31)
  • Generative AI and agentic systems are accelerating both malware obfuscation and reverse engineering workflows, allowing analysts to rapidly prototype detection logic while simultaneously sparking debate over the loss of artisan problem-solving. (43:29)

Detailed notes

## Background Published by Josh Stroschein on podcast feeds on October 14, 2026, this episode of Behind the Binary features macOS security researcher Christopher Lopez (L0psec). The show focuses on the rapidly evolving macOS threat landscape driven by enterprise Mac adoption, exploring topics such as ClickFix social engineering lures, fake software malvertising, infostealer families, and modern AI-assisted reverse-engineering workflows.

## TL;DR Christopher Lopez and Josh Stroschein explore the dramatic evolution of macOS malware from basic cleartext scripts into complex, heavily obfuscated threats targeting developer-heavy enterprise workstations. They dissect modern initial access techniques like ClickFix terminal lures, Google malvertising spoofing tools like Homebrew, and DPRK campaigns weaponizing VS Code tasks, while explaining why architectural guardrails like SIP and TCC keep ransomware at bay in favor of infostealers. The discussion also examines macOS Endpoint Security APIs and the practical use of dead drops and server-dependent keys. Finally, both researchers candidly assess how generative AI is shifting reverse engineering from an artisan, puzzle-solving craft to scaled, automated triage, creating unprecedented speed alongside industry-wide cognitive fatigue.

## Atmosphere & style The conversation carries a warm, collegial tone between two veteran reverse engineers trading war stories and geeking out over low-level operating system internals. A striking emotional tension runs throughout the episode, contrasting genuine enthusiasm for the technical complexity of modern macOS threats against a poignant, weary melancholy over how AI automation is eroding the tactile puzzle-solving joy of manual binary analysis. It feels like an authentic, late-afternoon shop talk—deeply technical and practical, yet vulnerably honest about prompt fatigue, burnout, and the emotional cost of professional adaptation.

## Bulletin - `00:00` Enterprise adoption of Apple Silicon and Mac workstations has spurred a 'golden age' of macOS malware, transitioning threats from basic plain-text scripts to sophisticated, heavily obfuscated payloads mimicking Windows malware. - `05:40` Adversaries increasingly rely on ClickFix social engineering lures and malvertising for developer tools like Homebrew to trick users into executing malicious terminal commands, successfully bypassing Gatekeeper and notarization. - `25:31` Ransomware remains largely unviable on macOS due to the prohibitive cost of developing zero-day exploit chains to bypass System Integrity Protection (SIP) and Transparency, Consent, and Control (TCC). - `43:29` Generative AI and agentic systems are accelerating both malware obfuscation and reverse engineering workflows, allowing analysts to rapidly prototype detection logic while simultaneously sparking debate over the loss of artisan problem-solving.

## Key takeaways - `00:00` Apple's Endpoint Security API divides capabilities into passive notify events for post-execution logging and active authorization (auth) events that can intercept and terminate operations in real time. - `03:15` The widespread enterprise rollout of Apple Silicon hardware has driven threat actors to follow the assets, targeting developers and startups running high-value corporate environments. - `05:40` ClickFix lures serve as the primary initial access vector by exploiting human trust, prompting users to paste commands into Terminal and bypassing macOS Gatekeeper controls. - `10:00` Severe prompt fatigue across macOS leads users to approve system dialogs indiscriminately, undermining native operating system guardrails. - `12:30` Threat actors deploy malvertising via verified Google shell companies targeting searches for utilities like Homebrew to direct victims to malicious terminal one-liners. - `15:00` macOS infostealers focus heavily on developer workstations, targeting AWS tokens, Kubernetes configs, GitHub personal access tokens, and cryptocurrency wallet extensions. - `22:45` North Korean (DPRK) state-sponsored campaigns compromise developers on LinkedIn by assigning coding assessments whose cloned repositories weaponize VS Code's tasks.json. - `25:31` macOS ransomware remains exceptionally rare in the wild because encrypting core system or user directories requires cost-prohibitive zero-day bypasses against SIP and TCC. - `27:35` Modern infostealers have converged into persistent backdoors, establishing recurring command-and-control communication rather than acting as one-time grab-and-exit utilities. - `30:00` Attackers decouple encryption keys from binaries by delivering AES keys dynamically via C2 servers, preventing offline static analysis and LLM deobfuscation pipelines. - `35:28` Malware authors leverage dead-drop resolvers on platforms like Steam profiles and Telegram channels to dynamically rotate C2 infrastructure without recompiling payloads. - `43:29` The shift toward agentic AI reversing workflows enables analysis of samples at enterprise scale, though operators still require human-in-the-loop verification to prevent errors. - `50:00` While AI tooling eliminates tedious manual labor and accelerates rapid proof-of-concept detection engineering, it fundamentally diminishes the dopamine-driven craft of manual reverse engineering.

## Detailed walkthrough ### `00:00` The “Golden Age” of macOS Malware and Enterprise Adoption

The episode opens with Christopher Lopez highlighting a core architectural capability in modern macOS defense: the Endpoint Security (ES) APIs. These APIs grant security tools access to two distinct classes of events: `notify` events, which merely signal after the fact that an action has taken place, and `auth` (authorization) events, which intercept an operation before completion and provide the system the power to deny or block it outright. Host Josh Stroschein then introduces Christopher Lopez, a reverse engineer at Volexity, kicking off a deep dive into macOS enterprise targeting, payload obfuscation, and AI-driven analysis workflows. Reflecting on his six years focusing on the platform—beginning roughly around the time Apple announced the transition from Intel to Apple Silicon—Lopez observes that the threat landscape has fundamentally transformed.

```mermaid flowchart TD accTitle: macOS Endpoint Security API Event Flow accDescr: Diagram contrasting Endpoint Security Notify and Auth event types. subgraph ES["macOS Endpoint Security Subsystem"] Action["System Operation / Process Event"] Action --> Auth["Auth Events<br/>(Synchronous Decision)"] Action --> Notify["Notify Events<br/>(Asynchronous Telemetry)"] end Auth --> Decision{"Security Agent Decision"} Decision -->|"Allow"| Proceed["Execute Action"] Decision -->|"Deny"| Block["Block Execution"] Notify --> Telemetry["Log / SIEM Alerting"] ```

Lopez characterizes the current era with genuine excitement, noting that the sheer volume of developer fleets and tech startups standardizing on Macs has made the operating system an irresistible target for adversaries. While tech startups and software developers prefer Mac-centric environments, threat actors follow the assets, shifting significant operational attention toward the platform. This influx of adversary attention has rapidly phased out the era of basic, transparent Mac scripts. A few years ago, analysts could easily inspect macOS binaries, read plain-text strings, and understand an attacker's objective immediately. Now, Mac malware authors are adopting complex obfuscation techniques long familiar in the Windows world, forcing Mac reverse engineers to adapt quickly to analyze convoluted samples.

> “What a wonderful time to be interested in macOS malware. It's like the golden age of macOS malware.” — Christopher Lopez

- **Endpoint Security Event Types:** `Notify` events provide post-action telemetry; `Auth` events pause the action synchronously and grant the agent authority to permit or terminate the execution. - **Enterprise Shift:** High adoption among software developers and tech startups has turned Mac-heavy fleets into prime targets for high-value corporate intrusions. - **Malware Evolution:** macOS threats have transitioned away from plain-text, easily inspectable binaries to heavily obfuscated payloads that mimic advanced Windows malware techniques.

---

`03:15` Apple Silicon, Fleet Longevity, and the Phasing Out of Intel

Stroschein questions what continues to drive the enterprise toward Macs, remarking that he personally still uses older Intel Macs and relies on specialized virtualization setups that make switching to Apple Silicon difficult. Lopez explains that although Apple hardware originally appealed primarily to the creative sector, Apple Silicon's hardware architecture—especially unified memory and superior processing efficiency—completely changed the value proposition for modern enterprises. Even though Apple machines demand a higher upfront financial investment, organizations justify the capital expenditure because the hardware generally delivers superior longevity and reliability, provided Apple continues software update support for the hardware cycle. Lopez jokes that Apple's recent enterprise whitepapers and statistics boast about significant IT cost savings, solidifying the Mac's status as a standard enterprise workstation rather than a niche luxury.

The conversation naturally shifts to the impending obsolescence of legacy hardware. With the release of macOS Sequoia (version 15) and subsequent releases on the horizon, Apple has begun actively warning users when running legacy Intel binaries. Rosetta 2—the dynamic binary translation layer that seamlessly executes x86_64 Intel code on arm64 Apple Silicon—is steadily moving toward full deprecation. Stroschein notes that he is currently recording on an Intel Mac running macOS Sequoia, musing that his aging testbed is rapidly reaching the end of its viable lifespan as Apple finishes its multi-year architectural transition.

> “It's like a premium device in the enterprise. And it's more expensive, but it's like one of those where you spend the money up front and then it should last you a bit.” — Christopher Lopez

- **Architectural Appeal:** Unified memory architecture and high compute-per-watt efficiency make Apple Silicon workstations attractive for engineering-heavy workloads. - **Rosetta 2 Deprecation Horizon:** Apple has begun surfacing warnings for Intel-based binaries, preparing the ecosystem for the complete phase-out of the x86 translation engine in subsequent macOS releases. - **Fleet Economics:** Despite higher initial procurement costs, enterprise IT departments increasingly cite long-term hardware durability and reduced support overhead as justifications for Mac deployments.

---

`05:40` Initial Access Vectors: The Rise of ClickFix and Terminal Lures

When discussing how attackers successfully compromise modern macOS devices, Stroschein brings up "ClickFix"—a lure format that has gained massive traction across the security community. Lopez clarifies that ClickFix is essentially a clever, social-engineering-driven initial access technique designed specifically to circumvent macOS's rigid Gatekeeper and execution controls. Because modern macOS layers make zero-click or unassisted remote code execution difficult without expensive zero-day chains, adversaries rely on coercing the victim into executing arbitrary commands themselves. ClickFix lures appear across the spectrum, delivering everything from commodity infostealers to sophisticated targeted intrusions.

```mermaid flowchart LR accTitle: ClickFix Attack Flow on macOS accDescr: Step-by-step diagram showing how a web prompt tricks a user into running malicious commands via Terminal. Web["Lure Webpage<br/>(Fake Error / CAPTCHA)"] --> Clipboard["ClickFix Action:<br/>Auto-copies payload to clipboard"] Clipboard --> Prompt["User prompted to hit Cmd+Space,<br/>type 'Terminal', & press Paste (Cmd+V)"] Prompt --> Execution["Terminal executes:<br/>curl | bash payload"] Execution --> Payload["Malware / Infostealer Installed"] ```

The attack typically unfolds on a compromised or malicious site that presents a simulated problem—such as a fake verification prompt, browser update, or broken video player. The site displays a helpful step-by-step instructional prompt: press `Command + Space`, launch `Terminal`, paste the auto-copied snippet into the shell prompt, and press Return. Once executed, the snippet frequently invokes a `curl` or `osascript` command piped directly into `bash` or `zsh`, quietly pulling down and executing the secondary stage. Lopez notes that while Apple has recently introduced protections aimed at warning users about running terminal commands copied from external sources, the mitigation is narrow and primarily protects users who never touch the terminal. Creating stricter guardrails is tricky: if Apple tightens execution policies too aggressively on shell tools, they risk breaking the everyday workflows of thousands of Mac developers and fueling the ongoing running joke about macOS inundating users with endless permission dialogs and security popups.

> “ClickFix is becoming or has become the most commonly observed initial vector. Because on macOS, due to the security mechanisms in place, it's hard to get code execution on a macOS without getting the user to do something.” — Christopher Lopez

- **Mechanics of ClickFix:** Sites lure victims into launching Terminal via Spotlight and pasting a clipboard payload (such as `curl... | bash`) to manually bypass Gatekeeper and notarization checks. - **Breadth of Use:** Adopted across diverse threat categories, ranging from commodity information stealers to highly capable advanced persistent threat (APT) groups. - **Defensive Dilemma:** Apple must balance intrusive warning prompts against developer usability; overly broad restrictions risk breaking valid terminal-heavy development workflows and worsening macOS "popup fatigue."

`10:00` Prompt Fatigue, Social Engineering, and the Homebrew Vector

The conversation opens with a discussion on macOS's increasingly aggressive security posture. The operating system now requires user confirmation for practically every administrative and operational action, creating a barrage of prompts and pop-ups that mirrors Windows User Account Control (UAC). Christopher Lopez points out the unintended consequence of this architecture: “And this has actually caused users over time to just click OK to everything because it's like, I don't want to deal with these problems anymore.” Users adopt a "YOLO" mentality, approving requests indiscriminately just to get their software installed. This creates an ongoing dilemma for defenders between securing the machine and staying out of the way of developers. Josh Stroschein jokes that his Intel-based Mac runs "friction free" without these interruptions, but Lopez emphasizes that developer habits—specifically the widespread practice of running arbitrary online commands by piping downloaded scripts directly into bash—remain a major attack surface.

```mermaid flowchart TD accTitle: Malvertising Execution Vector accDescr: Flow diagram showing how attackers abuse search ads and terminal commands to compromise macOS workstations.

subgraph InfectionVector ["Distribution & Execution"] A["Shell Company Ad Account"] -->|"Buys Google Sponsored Link"| B["Fake Homebrew Site"] B -->|"Social Engineering: 'Copy Command'"| C["Victim Terminal"] C -->|"curl | bash"| D["Download & Execute Loader"] end ```

Threat actors exploit this habit by creating spoofed lookalike sites for common developer tools, prominently Homebrew. These sites include convenient "copy to clipboard" buttons that mimic genuine installation instructions. Victims paste these commands straight into their terminal, expecting Homebrew, but instead kick off a malware download. While Stroschein notes that phishing may be less dominant than these fake web portals, Lopez clarifies that targeted campaigns—such as North Korean APTs conducting fake interview operations—still lean heavily on deliberate social engineering.

- Users suffer from severe prompt fatigue on modern macOS, undermining native security prompts by blindly approving alerts. - Attackers take advantage of standard developer installation workflows, such as `curl... | bash`. - Spoofed Homebrew portals serve as a frequent lure, tricking users into executing malicious download commands directly in their command line.

---

`12:30` Google Ad Abuse, AppleScript Payloads, and Anti-VM Evasion

Lopez cites research from Palo Alto Networks' Unit 42 detailing how threat actors establish networks of verified Google shell companies to run search engine malvertising. These fraudulent ads appear as top "sponsored links" when users search for developer utilities like Homebrew. Users naturally trust the search engine's verification and click the top result. As Lopez explains the psychological exploit: “You're going to go to Google, you're going to search for something and you're probably going to click the first thing you see because that, you know, Google is telling me this is fine.”

Once a victim pastes the copied command into the terminal, the multi-stage infection process begins. Attackers frequently deploy AppleScript—an older scripting language embedded deeply within the macOS architecture. Because AppleScript interfaces natively with internal macOS APIs, malware authors use it to build sophisticated, believable UI elements like native dialogs and progress bars, while harvesting system data under the hood. Beyond AppleScript, initial payloads range from basic bash downloaders to heavily obfuscated binaries. These early-stage loaders immediately run environment and anti-VM checks, inspecting system memory allocations and CPU chip architectures to confirm execution on physical Mac hardware rather than an analyst's sandbox.

- Unit 42 research highlighted threat actors using verified Google shell companies to buy top-ranked sponsored search ads. - AppleScript remains a preferred weapon because it communicates directly with native macOS APIs and can generate legitimate-looking native UI elements like progress bars. - Initial downloaders execute reconnaissance checks, analyzing CPU architecture and system memory thresholds to ensure the environment is an actual physical Mac before pulling down secondary stages.

---

`15:00` Developer Targets, Mac Minis, and the Focus on Infostealers

Stroschein asks whether enterprise Apple servers still exist in the wild. Lopez clarifies that classic enterprise Apple server iron has been replaced by rack-mounted server farms composed entirely of Mac minis, which he calls "pretty capable devices." The dialogue turns to the fundamental differences between Linux and macOS threats. While Linux malware typically targets production servers, web shells, and CI/CD pipelines, macOS systems are predominantly developer workstations. This positioning makes developers high-value targets for both social engineering and package-based supply chain compromises.

```mermaid flowchart LR accTitle: Developer Workstation Stealer Objectives accDescr: Diagram illustrating target files harvested from developer macOS environments.

subgraph StolenAssets ["Harvested Developer Data"] H["Victim Home Directory"] --> AWS["AWS & Kubernetes Configs"] H --> GIT["GitHub Personal Access Tokens & SSH Keys"] H --> WAL["Crypto Wallets & Browser Extension IDs"] end ```

When asked about the ultimate objective behind targeting developers, Lopez admits the reality is straightforward and financially motivated: “Yeah, it's going to be a little boring because the end goal is a lot of these wallets and things like that.” Rather than orchestrating complex, multi-layered enterprise intrusions, infostealers sweep the user's home directory. They prioritize developer credentials—such as AWS tokens, Kubernetes configs, and GitHub access keys—alongside cryptocurrency wallet files. In the early days of macOS infostealers, detection engineers wrote YARA rules targeting hardcoded browser extension IDs for crypto wallets visible in raw binaries. Although threat actors have adopted obfuscation to hide these strings, the underlying objective remains immediate monetary theft. Stroschein recalls Lopez's frequent online posts analyzing these trends, bringing up Atomic Stealer (AMOS) as the prime example of this booming category of malware.

- Modern Apple server infrastructure primarily relies on clusters and server farms of Mac minis. - Workstation compromises focus heavily on data harvesting within the user's home directory, specifically AWS credentials, Kubernetes configurations, and GitHub tokens. - Early infostealer YARA detections relied on finding un-obfuscated cryptocurrency wallet extension IDs inside payloads, prompting attackers to implement string obfuscation in subsequent iterations. - Atomic Stealer (AMOS) represents the broader trend of commodity macOS infostealers optimized for immediate financial monetization.

`20:00` The Evolution of macOS Infostealers and the Language Landscape

Reflecting on how dramatically the threat landscape has shifted, Christopher Lopez recalls the early days of Atomic Stealer (AMOS), when samples were delivered in simple, clear-text formats that were trivial to inspect. Today, those same families have matured into what he describes as some of the most frustrating files to analyze due to aggressive obfuscation. While modern AI-assisted tools help speed up decompilation and triage, Lopez often takes a pragmatic approach to save time during analysis: he sets up a virtual machine, quickly identifies and bypasses whatever anti-VM logic the threat actor embedded, runs the sample dynamically, and watches its runtime actions directly rather than getting bogged down in static analysis.

The infostealer ecosystem has splintered into complex networks of affiliate trafficking groups, spawning numerous variants and offshoots—such as the prevalent MacSync family. While the specific lures and distribution chains differ between threat groups, the fundamental objectives of these payloads remain remarkably consistent. For a reverse engineer, however, macOS presents a uniquely diverse set of languages that malware authors cycle through. Lopez notes that while traditional C and C++ remain in use (with C++ being a notoriously painful reversing target), macOS analysis demands fluency across multiple paradigms:

- **Objective-C:** Lopez’s personal favorite, describing the runtime-oriented language as “beautiful” to deconstruct. - **Swift:** Increasingly mature and gaining traction among malware developers, functioning alongside Objective-C rather than completely replacing it. - **Go (Golang):** Universally adopted across platforms by modern threat actors, creating bulky binaries packed with runtime overhead. - **Rust:** Becoming more common, though Lopez characterizes reversing Rust binaries as “a mess, honestly.” - **Scripting Languages:** Shell scripts, Python, and heavily obfuscated JavaScript utilized in early-stage loaders.

Highlighting the shifting difficulty of static analysis, Lopez observes: “Nowadays, I was actually looking at one earlier today, they're the most annoying samples to look at now because they're doing all kinds of obfuscation and you know it's it'll take a little bit of time.”

---

`22:45` DPRK Developer Targeting and Malicious VS Code Projects

The payload landscape shifts drastically when moving from opportunistic cybercriminals to advanced persistent threats, most notably North Korean (DPRK) state-sponsored actors, whom Lopez identifies as the most advanced threat targeting macOS today. DPRK campaigns heavily exploit human psychology through fraudulent job recruitment schemes conducted over LinkedIn. Targeting software engineers and tech professionals who may already be struggling in a challenging economic climate, operatives pose as recruiters offering lucrative opportunities.

The lure pivots around technical evaluations where the victim is asked to complete a coding test, take a quiz, or pull down a project repository from platforms like GitHub. Attackers instruct candidates to open the workspace in their preferred integrated development environment (IDE), commonly Visual Studio Code. Within the repository, the threat actors weaponize workspace automation files—specifically `tasks.json`. Although VS Code presents a security prompt warning the user and asking if they trust the workspace, applicants eager for employment inevitably grant permission. Once accepted, the task runner executes arbitrary commands, immediately establishing malware persistence on the developer's machine.

```mermaid flowchart TD accTitle: DPRK Developer Recruitment Attack Flow accDescr: Workflow showing how North Korean threat actors lure developers on LinkedIn into executing malicious tasks via VS Code.

subgraph LURE["Social Engineering Stage"] A["Recruiter Contact via LinkedIn"] --> B["Technical Assessment / Coding Test"] B --> C["Candidate Clones Malicious GitHub Repo"] end

subgraph EXEC["IDE Execution Stage"] C --> D["Open Project in VS Code"] D --> E["User Bypasses 'Trust Workspace' Prompt"] E --> F["Automatic Execution of tasks.json"] end

subgraph COMPROMISE["Payload Stage"] F --> G["Arbitrary Shell Commands Executed"] G --> H["Persistent macOS Malware Installed"] end ```

Lopez expresses frustration with the predatory nature of these operations: “It's so messed up they do it on LinkedIn, right? They're like there's already someone that's struggling because, you know, the world's kind of tough right now, and, you know, they get reached out to by some person that looks promising.” He points out that the danger multiplies when employed developers fall for these lures using corporate equipment, warning that conducting personal job hunting on enterprise endpoints frequently introduces initial access compromises directly into secured corporate networks.

---

`25:31` Why Ransomware Struggles on macOS: SIP and TCC

When Stroschein asks whether state-sponsored operators or criminal groups pivot into deploying ransomware across macOS endpoints, Lopez explains why true ransomware has failed to take off on the platform. Aside from occasional proof-of-concept demonstrations—frequently analyzed and discussed by macOS security researcher Patrick Wardle—practical ransomware encounters in the wild remain virtually nonexistent compared to the Windows ecosystem. The primary blocker is Apple's layered OS architecture, specifically System Integrity Protection (SIP) and Transparency, Consent, and Control (TCC).

Under SIP, even the root user cannot write to, modify, or encrypt core operating system files and critical system directories. Furthermore, user data residing in standard folders like Desktop, Documents, and Downloads is gated by TCC, which strictly requires user permission or a privileged bypass before any process can access them. Lopez notes that without expensive, zero-day SIP and TCC bypass chains, a threat actor cannot lock down an entire macOS system or encrypt user data en masse:

- **System Integrity Protection (SIP):** Restricts the root account from modifying protected system volumes, preventing total operating system lockouts. - **Transparency, Consent, and Control (TCC):** Mediates access to user files, requiring explicit prompt interaction or specialized exploits to touch documents, downloads, and sensitive media. - **Economic Disincentive:** Developing or purchasing the zero-day exploit chains necessary to bypass both SIP and TCC is cost-prohibitive for ransomware attacks.

Lopez underscores the unlikelihood of widespread Mac ransomware: “You can't lock the system really. So, yeah, that hasn't been figured out because now watch, we're going to see something happen next week where they figured something out. But you need a SIP bypass and that's very expensive, so probably not going to see that anytime soon.”

---

`27:35` The Convergence of Stealers and Backdoors

While file-encrypting ransomware remains unviable on macOS, infostealers have undergone an aggressive architectural upgrade. Lopez notes that the historical paradigm of an infostealer was “incredibly boring”—a transient, fire-and-forget utility that grabbed browser credentials, crypto wallets, or system metadata in a single run and exited without establishing a persistent presence.

Modern infostealers have blurred the line between data harvesters and full-fledged backdoors. Threat actors now incorporate dedicated persistence mechanisms, maintain active command-and-control (C2) communication channels, and wait for interactive instructions from operators. Lopez explains: “Now we're seeing infostealers that are like backdoors too and like they are persistent and they're, you know, communicating with their C2 and like waiting for instructions... where they're like, 'Well, we don't want to just steal something one time; we want to make sure that we can continue doing what we're doing.'”

As the conversation turns to the binary mechanics of these modern payloads, Stroschein observes that macOS binaries appear to be walking the exact same evolutionary path that Windows malware traversed years ago. Analysts can no longer count on straightforward Mach-O reverse engineering or simple bash/AppleScript logic. Threat authors have rapidly adopted complex evasions including:

- Control-flow flattening and code scattering - Dynamic runtime API resolution and runtime linking - Deep string obfuscation and multi-layer encryption - Advanced packing techniques designed to stymie automated disassemblers and static detection engines

`30:00` The Escalation of Obfuscation, AI Tooling, and Server-Dependent Keys

The conversation shifts to how malware obfuscation has evolved over time. Looking back at "the good old days," obfuscation used to consist of simple techniques like single-byte XOR keys embedded directly inside a binary. Discovering and reversing that single-byte key gave analysts a straightforward sense of accomplishment. Today, obfuscation has grown significantly more complex and layered. Christopher Lopez notes that this progression heavily coincides with offensive use of AI tooling, pointing out that threat actors have access to the exact same generative AI tools as security analysts. With simple prompt crafting—such as asking a model to make code less readable under the guise of protecting intellectual property from reverse engineering or tools like Binary Ninja—attackers can effortlessly generate complex defenses.

```mermaid flowchart TD accTitle: Multi-Stage Server-Dependent Decryption Flow accDescr: Shows the multi-layer decryption process where an embedded payload requires an external C2 key to unpack.

subgraph Host ["Infected macOS Host"] A["Base64 Encoded Binary"] --> B["Decode Base64 Data"] B --> C["Awaiting AES Key"] E["C2 Response (AES Key)"] --> D["Decrypt Payload & Execute"] C --> D end

subgraph Remote ["Attacker Infrastructure"] C -->|"Request Key"| F["Command & Control Server"] F -->|"Transmit Key"| E end ```

Rather than relying purely on static Base64 encoding or simple XOR, attackers are stacking multiple layers of protection on top of each other. Lopez details a recent sample where the malware contained an entire secondary binary encoded in Base64. Once decoded, the binary still could not be executed because it required an AES encryption key that was not stored locally within the executable. Instead, the malware had to reach out dynamically to its Command and Control (C2) server to obtain the key. Josh Stroschein points out why this architecture is so potent against modern automated analysis: “This is a great example of you want to make something that our LLMs will have difficulty with, there you go. A key that never is persisted anywhere that only shows up.” While relying on dynamic server keys introduces an operational dependency—meaning the malware fails if the C2 responds with an HTTP 404 error or is taken down—attackers implement retry timers and accept the risk to ensure their binaries cannot be statically reversed once dead.

- Single-byte XOR and basic Base64 encoding have transitioned into stacked, multi-stage obfuscation chains. - By decoupling decryption keys from the binary and serving them over C2, attackers prevent automated LLM and static reverse-engineering pipelines from unpacking payloads. - Attacks can tie key delivery to machine-specific identifiers, ensuring the binary decrypts only on the targeted endpoint.

`33:23` macOS Endpoint Security API and the Maturation of Apple Malware

The historical context of macOS defense explains why obfuscation has surged so dramatically in recent years. In 2019, Apple introduced the Endpoint Security API (ESF), which provided modern enterprise security vendors like CrowdStrike and Microsoft Defender with the foundational system telemetry required to detect process execution, file modifications, and other suspicious host behavior. Prior to 2019, macOS lacked a standardized, robust detection foundation equivalent to modern Windows EDRs. Christopher Lopez explains that prior to this rollout, threat actors had virtually no incentive to build complex evasion: “So if I was a threat actor, right, if I was writing malware back in that time, why would I obfuscate anything? You know, like no one has really even adopted this yet.”

Seven years following the introduction of the Endpoint Security API, macOS security controls have matured, and malware authors have adapted in parallel. As detection rules caught up to basic tactics, attackers adopted sophisticated delivery techniques previously seen predominantly in the Windows ecosystem. Obfuscation has become a mandatory hurdle, requiring malware analysts to capture and analyze binaries early in an attack's lifecycle before infrastructure goes dark or access tokens expire.

`35:28` Dead Drops, Fail-Safe C2s, and the Future of AI-Generated Malware

Modern macOS campaigns increasingly deploy resilient multi-stage loading architectures and external C2 resolution mechanisms. In multi-stage infections, an initial loader often drops three to four files, writing out a local configuration file that directs subsequent stages to specific C2 endpoints while embedding backup addresses as fail-safes. Furthermore, attackers actively avoid hardcoding direct HTTP domains into binaries to evade network-based detection rules. Lopez notes that threat actors frequently rely on dead-drop resolvers, referencing an incident shared by MalwareHunterTeam on Twitter where macOS malware retrieved its active C2 domain by querying a public Steam profile:

> “So like the sample would reach out to a Steam profile and then grab a domain from there. So you can change the, I think it was the profile name of the Steam profile, right, so like it's still an association to that Steam profile. You can change like the name or the full name of that account, and then that's the new domain.”

Attackers leverage Telegram channels in the exact same manner. The external channel or profile description is updated dynamically with new infrastructure, allowing operators to redirect infected hosts without having to recompile, resign, or redistribute their macOS payloads.

Josh Stroschein raises the question of whether the future of malware development will lead toward increasingly sophisticated, bespoke obfuscations or a regression into high-volume, low-effort variation. Because LLMs can easily spin up endless variations of basic code, campaigns like ClickFix may not require heavy obfuscation if their lifespan is short. Threat actors only need a small operational window to achieve their objectives. Security remains fundamentally reactive, trailing adversary execution. Stroschein emphasizes this perpetual disadvantage: “I still don't see or have come across an environment where, I mean, we're still all reactive. We're waiting until something has executed on the host and then we play catch up.” Lopez validates this sentiment by recalling his early days working inside a Security Operations Center (SOC), where his manager famously likened SOC analysts to firefighters sitting around waiting for fires to break out so they could rush to put them out.

- Attackers leverage dead-drop resolvers across third-party platforms (such as Steam account profiles and public Telegram channels) to update C2 addresses on the fly without recompiling malware. - Config files dropped by early-stage loaders separate runtime operational data from the core payloads, blending dynamic configuration with hardcoded fail-safe backups. - Generative AI lowers the cost of producing rapid structural variations of malware, prioritizing sheer volume and short attack windows over high-end obfuscation complexity. - Despite advances in endpoint detection platforms, enterprise defense remains structurally reactive, relying on code execution on the target machine before alerts trigger.

`40:00` Endpoint Security APIs and the AI-Accelerated Cat-and-Mouse Game

Christopher Lopez breaks down the mechanics of macOS defense by highlighting Apple's Endpoint Security API (ES API), which powers modern macOS EDR solutions. He explains that security engineers receive two distinct categories of events: notify events, which passively alert that an action has taken place, and authorization (auth) events, which allow an engine to actively block an action before it completes. This capability enables defenders to craft clever, preventative logic. For instance, if a command sequence involving `curl` is observed piping directly into an execution context, an auth event can block the process immediately because it deviates from baseline behavior—even if it occasionally annoys a developer, in which case security can justify the restriction.

```mermaid flowchart TD accTitle: macOS Endpoint Security API Event Flow accDescr: Diagram contrasting passive Notify Events against active Auth Events that can intercept and block malicious commands like piped curl execution.

subgraph macOS_ES["macOS Endpoint Security API"] direction TB E["System Event"] --> N["Notify Events\n(Passive Observation)"] E --> A["Auth Events\n(Intervention / Blocking)"] end

subgraph Action["Engine Action"] N --> Log["Log: 'Event has occurred'"] A --> Decision{"Heuristic / Pattern Check\n(e.g., curl piping to shell)"} Decision -->|"Deviant Behavior"| Block["Block Process Execution"] Decision -->|"Allowed Behavior"| Allow["Permit Process Execution"] end ```

The conversation then turns to the broader dynamic between attackers and defenders, which Lopez describes as an endless cycle of mutual adaptation. As defenders introduce novel detection techniques, threat actors read about them in public threat research and write-ups, realize their samples have been burned, and tweak their code to evade visibility. Lopez emphasizes that threat actors and defenders are both aggressively adopting AI tooling, which is dramatically speeding up this historical cycle. As Christopher notes:

> “And yeah, it's a game of cat and mouse, honestly.”

- **Notify Events:** Provide post-execution telemetry informing defenders that an activity has occurred. - **Auth Events:** Provide pre-execution hooks enabling real-time intervention to stop suspicious activities (e.g., suspicious `curl` payloads). - **AI Acceleration:** Both offense and defense leverage LLMs simultaneously, keeping the game unchanged fundamentally while substantially compressing iteration times.

---

`42:15` Cognitive Fatigue, Tech Breaks, and the Speed of Modern Security

Lopez shares that stepping away from the infosec news cycle for even a week leaves professionals feeling disoriented because things move so rapidly; returning often means encountering ten new technical blogs on subjects never seen before. Josh Stroschein agrees, reflecting on how his relationship with technology has shifted as his career and personal life have evolved. While he used to consume security topics all day—listening to podcasts during his commute, reading articles late into the night, and tinkering with side projects—he now strictly disconnects at the end of the day to ride his bike, work out, and spend time with his children.

Both speakers discuss how the sheer velocity of AI-driven changes has compounded this mental exhaustion across the industry. Keeping pace with daily developments feels like an overwhelming necessity, breeding an unprecedented level of fatigue. Stroschein admits to feeling that burn harder than ever, while Lopez chimes in that he is right behind him in feeling the exact same strain.

---

`43:29` Agentic Reversing, Flare-On, and Reversing at Scale

Lopez asks Stroschein how the emergence of AI tools has impacted his daily life as a reverse engineer. Stroschein acknowledges that while legacy tools like IDA Pro remain his day-to-day foundation, a conversation with a colleague crystallized a distinct "line in the sand" separating traditional methodologies from an agentic, automated future. Over the past year, Stroschein shifted from being an AI skeptic who doubted models could deobfuscate complex code to an advocate for agentic systems after witnessing AI-driven feats. He points to Flare-On—referencing Flare-On 13—where AI agent setups managed to solve the entire challenge in just over an hour, a realization that left Lopez remarking, “That makes me so sad.”

Stroschein stresses that reverse engineering must now be conceptualized as an automated, scaled discipline rather than an artisan process focused on a single binary. Security teams need smart, effective orchestration engines capable of triaging and reversing hundreds of thousands of samples simultaneously. However, he acknowledges that current agentic workflows still suffer from an interactive trust gap where operators pass tasks to LLMs and wait blindly for results. Because models still make frequent mistakes, human-in-the-loop verification remains mandatory in professional enterprise analysis. As Josh argues:

> “Like I, that's to me, that's the only way forward is to get rid of my legacy way of doing it and adapt that knowledge to an LM centric workflow and try to do things at scale.”

---

`45:34` The Emotional Loss of the Craft and the Reality of Adaptation

Lopez reflects candidly on the emotional toll that AI automation takes on reverse engineers who genuinely love the craft. He describes the deep, tactile satisfaction of spending hours analyzing obfuscated binaries in IDA or Binary Ninja—painstakingly figuring out what an obscure routine does, picking clever custom names for functions, decoding obfuscation algorithms, and watching cleartext strings surface in the disassembler. Acknowledging that this hands-on craft is increasingly labeled "legacy" stings, even though he recognizes the immense speed and triage advantages LLMs bring to threat protection.

Lopez emphasizes that human guidance remains critical to keep LLMs from veering down incorrect analytical rabbit holes due to ambiguous context. Ultimately, the industry must adapt to protect organizations faster. Echoing that sentiment, Stroschein laments the personal impact of spending fifteen focused years climbing to the pinnacle of reverse engineering, only to see machine learning models reproduce in seconds skills that took a lifetime of disciplined effort to acquire. While LLM-centric pipelines accelerate threat analysis, both agree they strip away the internal joy, puzzle-solving fulfillment, and dopamine that made reverse engineering uniquely captivating in the first place. As Christopher observes:

> “And if the goal is still, you know, protect the enterprise or, you know, stop their actors from doing what they're doing, it basically reinforces that and it makes that faster.”

`50:00` The Mixed Joy of AI Automation: Building Compilers, Deobfuscation, and Proof-of-Concept Code

Josh Stroschein and Christopher Lopez examine how large language models alter the personal satisfaction and labor of technical research. When an LLM simply provides the solution and the analyst merely verifies it, the emotional reward shifts: it eliminates the excitement of figuring out a problem on one's own, leaving little to boast about to colleagues. Josh shares an experience from earlier in the year when he investigated the pipeline between IDA Pro's disassembly and pseudocode generation to understand obfuscation and deobfuscation mechanics. After immersing himself in LLVM and compiler pipelines, he realized he could parse a target language into an abstract syntax tree (AST) and execute standard compiler optimization passes—such as constant propagation, constant folding, and string concatenation—to strip out obfuscation automatically. Instead of spending weeks manually building such a tool, he prompted an AI model, iterated on the output, and produced a functional JavaScript deobfuscation script in a single Saturday afternoon. While discovering the core insight naturally was deeply satisfying, the sense of accomplishment from engineering the tooling vanished.

```mermaid flowchart TD accTitle: Compiler Optimization Deobfuscation Flow accDescr: Pipeline showing how raw code transforms through an AST and optimization passes into clean deobfuscated output.

subgraph Parsing ["AST Generation"] A["Obfuscated Code\n(e.g., JavaScript)"] --> B["Parse into raw AST"] end

subgraph Passes ["Compiler Optimization Pipeline"] B --> C["Constant Propagation"] C --> D["Constant Folding"] D --> E["String Concatenation"] end

subgraph Output ["Clean Code"] E --> F["Deobfuscated Script\nand Pseudocode"] end ```

Despite the emotional trade-off, Josh points out that traditional reverse engineering is dominated by repetitive toil—tracing through multi-stage malware samples where complexity multiplies at every tier, requiring days to reach certainty. The correctness and speed of modern AI models make those manual, tedious phases drastically shorter. Balancing the perspective so as not to appear purely cynical, Chris highlights his own use cases as someone who did not enter malware analysis with a deep software engineering background. He finds AI indispensable when rapidly prototyping detection logic for macOS. If he needs to verify whether a novel threat actor technique writes to a specific database on disk, he prompts the model to generate the necessary proof-of-concept (PoC) code. Within five to ten minutes, he can evaluate the execution output and decide on an effective detection strategy, avoiding hours of struggle over unfamiliar coding syntax.

- Josh reflects on the shifting emotional reward of reverse engineering: “If LM just tells you the answer and you go and verify it, it's not the same thing. It doesn't have that same sense of accomplishment.” - Chris highlights the practical efficiency of AI for non-developers: “Instead of me struggling because I'm not amazing as a dev... within five, ten minutes I'm looking at the output of that pretty quickly and making a decision on like, is this a good way of detecting this.” - AI models also show competence in detection engineering with YARA rules, pointing out interesting binary artifacts or suggesting refinements to rule logic.

---

`55:00` Semantic Analysis, Academic Literature Reviews, and Final Thoughts

The conversation broadens to the potential role of AI in higher-level threat analysis and academic research. Josh contrasts syntax-bound tools like YARA—which target byte sequences, static strings, and instruction patterns—with semantic analysis. In malware categories like infostealers, syntactical variations abound, but their underlying semantic actions are largely identical across samples. Josh notes that AI-assisted workflows could drastically accelerate literature reviews on these topics, allowing researchers to rapidly canvas prior academic work, identify methodological shortcomings, or assess the computational cost of lifting binaries into intermediate representations. He draws a direct parallel to the university PhD process, where doctoral candidates spend years surveying an entire field merely to locate a tiny gap for a novel contribution—a workflow uniquely suited to AI synthesis.

Reflecting on the pace of technological adoption, Josh recalls being told as a child that he needed to memorize math because he would not always carry a calculator in his pocket; today, every practitioner permanently carries an LLM on their phone. Because AI has thoroughly integrated itself into daily developer habits and mainstream life, discussing its operational impacts has become inevitable. Wrapping up the episode around the one-hour mark, Josh invites Chris to offer concluding thoughts for security practitioners facing these fast-moving changes across macOS security and tooling.

- Josh draws a parallel to early warnings about handheld technology: “Growing up, I'm, I was from that era where, you know, one of the reasons I was told that I had to learn math was because I would, you're not always going to have a calculator in your pocket. And I'm pretty sure you'll always go, you're always going to have an LLM in your pocket at this point.” - Chris closes the conversation with reassurance for the security community: “Final thoughts is going to be all right. How about that? It's all going to be all right. Until then, stay curious and keep exploring.”

## Notable quotes > `00:00` What a wonderful time to be interested in macOS malware. It's like the golden age of macOS malware. — Christopher Lopez

> `05:40` ClickFix is becoming or has become the most commonly observed initial vector. Because on macOS, due to the security mechanisms in place, it's hard to get code execution on a macOS without getting the user to do something. — Christopher Lopez

## Mentioned Apple, macOS, Apple Silicon, Intel, macOS Sequoia, Rosetta 2, Endpoint Security API, Gatekeeper, System Integrity Protection (SIP), Transparency, Consent, and Control (TCC), Homebrew, Google, Palo Alto Networks Unit 42, AppleScript, Atomic Stealer (AMOS), MacSync, Visual Studio Code, LinkedIn, GitHub, CrowdStrike, Microsoft Defender, Steam, Telegram, Binary Ninja, IDA Pro, Flare-On, LLVM, YARA, Volexity, Christopher Lopez, Josh Stroschein, Patrick Wardle, MalwareHunterTeam

## Video description In this episode of Behind the Binary, we sit down with Mac security researcher Christopher Lopez (L0psec). to discuss the evolving landscape of macOS malware. As Mac adoption continues to grow in enterprise environments and among developers, threat actors are increasingly targeting the platform. Chris breaks down current attack vectors, starting with the rise of social engineering tactics like ClickFix, fake software downloads, and malvertising campaigns. They explore how infostealer fa...

[Source](https://www.buzzsprout.com/2414128/episodes/19954332-ep30-the-golden-age-of-macos-malware-evolution-stealers-and-ai-workflows-with-christopher-lopez.mp3)

中文简报

第30期 macOS恶意软件的黄金时代:演变、窃密程序与AI工作流(嘉宾:Christopher Lopez) Christopher Lopez与Josh Stroschein探讨了macOS恶意软件的显著演变过程,它已从早期的基础明文脚本,发展为针对开发人员云集的企业工作站的高复杂度、深度混淆威胁。他们深入剖析了现代初始访问技术,包括ClickFix终端诱饵、仿冒Homebrew等工具的谷歌恶意广告,以及朝鲜(DPRK)利用VS Code任务实施武器化的攻击活动;同时解释了SIP和TCC等系统架构安全机制为何能有效阻遏勒索软件,进而促使攻击者转向信息窃取程序。讨论还探讨了macOS端点安全API,以及死信箱(dead drop)与依赖服务器的密钥在实战中的运用。最后,两位研究人员坦诚评估了生成式AI如何将逆向工程从一门工匠式的解谜技艺转变为规模化的自动化分流处置,这在带来前所未有速度的同时,也引发了全行业范围内的认知疲劳。 企业对Apple Silicon和Mac工作站的普及采纳催生了macOS恶意软件的“黄金时代”,威胁形态已从基础的明文脚本演变为类似于Windows恶意软件的精密、高度混淆有效载荷。 (0:00) 攻击者日益依赖ClickFix社会工程学诱饵以及针对Homebrew等开发工具的恶意广告,诱骗用户在终端中执行恶意命令,从而成功绕过Gatekeeper和公证机制。 (5:40) 由于开发用于绕过系统完整性保护(SIP)以及透明度、同意和控制(TCC)的零日漏洞利用链成本过高,勒索软件在macOS上基本依然不可行。 (25:31) 生成式AI和代理系统正在加速恶意软件的混淆与逆向工程工作流,使分析师能够快速构建检测逻辑原型,但同时也引发了关于丧失工匠式问题解决能力的争论。 (43:29)

Reading summary

As enterprise developer fleets increasingly adopt Apple Silicon, macOS has entered what Volexity reverse engineer Christopher Lopez calls a 'golden age' of targeted malware, characterized by sophisticated infostealers, layered obfuscation, and AI-accelerated workflows. Enterprise Fleets and Modern Infection Vectors (0:00) The widespread standardization of tech startups and developers on Apple Silicon—driven by hardware durability and unified memory architecture—has drawn sustained adversary attention. Because macOS execution controls make unassisted remote code execution difficult, threat actors rely heavily on social engineering vectors to compromise endpoints. Techniques such as 'ClickFix' trick victims into launching the Terminal via Spotlight and pasting terminal snippets (such as curl commands piped into bash), directly bypassing Gatekeeper and notarization checks. Social Engineering and Developer Environment Targets (10:00) Threat actors exploit typical developer routines and the severe 'prompt fatigue' caused by macOS's persistent security dialogs. Attackers purchase top-ranked Google search ads through verified shell entities to distribute fake developer portals, notably targeting tools like Homebrew. In targeted operations, North Korean (DPRK) state-sponsored actors recruit software engineers via LinkedIn and deliver repositories containing malicious Visual Studio Code tasks.json files that execute arbitrary commands once opened. Infostealers, Backdoor Convergence, and Ransomware Obstacles (15:00) Unlike Linux malware aimed at production servers, macOS threats heavily target workstation home directories to harvest developer credentials—such as AWS tokens, Kubernetes configurations, and GitHub keys—alongside cryptocurrency wallets. Prominent commodity families like Atomic Stealer (AMOS) and MacSync have evolved from simple clear-text scripts into persistent backdoors maintaining active command-and-control (C2) communication. Meanwhile, file-encrypting ransomware remains largely impractical on macOS because defeating System Integrity Protection (SIP) and Transparency, Consent, and Control (TCC) requires prohibitively expensive zero-day exploit chains. Evasion Mechanics and Endpoint Security Controls (30:00) macOS payloads increasingly mimic complex Windows evasion tactics, incorporating dynamic API resolution, multi-stage loaders, dead-drop resolvers on platforms like Steam and Telegram, and external AES decryption keys delivered selectively via C2 to foil static disassembly. Defenders counter these threats using Apple's Endpoint Security (ES) APIs, introduced in 2019, which allow enterprise agents to intercept activity via passive 'notify' events or synchronous 'auth' events that block suspicious process chains before execution. Agentic AI in Reverse Engineering Workflows (43:29) The integration of large language models is fundamentally altering threat analysis and reverse engineering. While LLMs enable rapid deobfuscation prototyping, AST compiler transformations, and scalable triage across vast sample sets, Lopez and host Josh Stroschein note that automated analysis introduces an interactive trust gap requiring human verification. Furthermore, delegating core puzzle-solving workflows to AI models removes much of the hands-on satisfaction that historically defined the discipline. While AI tooling accelerates both adversary evasion techniques and defender triage capabilities, enterprise security on macOS remains fundamentally reactive, requiring practitioners to adapt traditional artisan reversing methods to automated, scalable workflows.

精炼阅读摘要

Volexity 逆向工程师 Christopher Lopez 与主持人 Josh Stroschein 指出,随着苹果硬件在企业开发机群的普及,macOS 恶意软件已进入高度混淆和武器化的“黄金时代”;与此同时,人工智能正重构样本逆向与威胁检测的工作流程,但也带来了工匠成就感流失与技术疲劳的挑战。 企业采用与恶意软件高级化演进 (0:00) 现代科技初创企业和软件开发团队大规模采用苹果设备作为标准工作站,促使攻击者将原本针对 Windows 的成熟对抗策略快速迁移至 macOS。Christopher Lopez 观察到,得益于统一内存架构与出色的能效比,苹果硬件尽管前期采购成本较高,但企业 IT 部门仍看重其长期耐用性及较低的维护开销。随着从 Intel 到 Apple Silicon(arm64)的迁移步入尾声,macOS Sequoia(版本 15)已开始对传统 Intel 二进制文件弹出弃用警告,Rosetta 2 转换层也面临淘汰。 这种硬件与用户结构的转变彻底终结了以往 macOS 威胁大多采用透明明文脚本的时代。几年前分析师尚可轻松通过查看明文字符串理清攻击逻辑,如今恶意软件作者广泛引入了控制流平坦化、动态 API 解析、多层加密以及运行时加壳等复杂混淆手段。原本仅执行单次抓取即退出的初级信息窃取工具(如早期 Atomic Stealer/AMOS),正全面融合持久化驻留机制与交互式 C2 通信信道,逐步演变为功能完备的后门程序。 绕过系统防御的社工初始访问链 (5:40) macOS 具备严格的 Gatekeeper 和公证机制,导致零点击或无辅助的远程代码执行成本极高,迫使攻击者高度依赖社会工程学促使用户自行触发载荷。其中“ClickFix”已成为最常见的主流初始访问手段:钓鱼或受害网站伪造浏览器报错、验证码或视频解码故障,诱导受害者按下快捷键调出终端,直接粘贴并执行包含“curl”或“osascript”的管道脚本。与此同时,攻击者利用经过验证的 Google 广告空壳公司购买搜索推广赞助链接,伪造 Homebrew 等开发者常用工具的官方镜像,诱骗程序员运行恶意下载命令。 针对开发者的定向渗透同样呈现出高度的专业化特征。Lopez 指出,朝鲜(DPRK)APT 组织在 LinkedIn 等职场平台伪装成招聘人员,针对软件工程师发起虚假技术面试,诱导求职者在 Visual Studio Code 中打开恶意的 GitHub 项目仓库。一旦受害者在提示框中确认信任工作区,项目内部的“tasks.json”自动化任务文件便会自动静默执行任意 Shell 命令,迅速在开发端点建立持久性驻留,并搜刮用户主目录下的 AWS 凭据、Kubernetes 配置、GitHub 访问密钥以及加密货币钱包等高价值资产。 系统安全边界与外部动态解密机制 (25:31) 与 Windows 环境勒索软件肆虐不同,原生勒索软件在 macOS 上几乎难以立足。Lopez 解释称,这主要得益于苹果系统的系统完整性保护(SIP)与透明度、同意和控制(TCC)架构:SIP 阻止即便是 root 超级用户对核心系统目录进行写操作与加密,而 TCC 则对桌面、文档和下载等敏感个人文件进行弹窗管控。在没有昂贵且高门槛的零日漏洞利用链的情况下,攻击者无法实现全盘锁定或批量加密用户文件,因此黑客组织主要聚焦于高收益的信息窃取与凭据收集。 为对抗静态特征检测与自动化分析平台,现代 macOS 载荷在架构上广泛采用外部依赖与无痕设计。例如部分样本将 Base64 编码的二进制体打包在内,但将 AES 解密密钥完全从本地可执行文件中剔除;载荷必须在运行时向 C2 服务器动态请求密钥以完成解密执行,若服务端失效则导致样本无法在离线沙箱中逆向。此外,攻击者还利用 Steam 公开个人资料简介或公共 Telegram 频道的描述字段作为“死弹解析器”(Dead-drop Resolvers),动态下发并更替 C2 域名,无需重新编译、签名或分发 Mach-O 载荷即可实现基础设施重定向。 防御架构对抗与AI重塑逆向流程 (40:00) 在防御底层,苹果在 2019 年推出的 Endpoint Security API(ESF)为现代 EDR 厂商提供了系统遥测支撑。该体系分为两大核心事件类型:用于事后行为审计和遥测上报的“Notify”事件,以及可同步挂起系统操作、在进程执行前主动执行放行或拦截阻断的“Auth”事件。例如安全引擎可以通过 Auth 事件直接拦截将“curl”直接输入 Shell 的异常命令行。然而,日益繁琐的确认弹窗也诱发了开发者的“提示疲劳”(Prompt Fatigue),促使许多用户为图省事盲目批准所有弹窗权限,反向削弱了本地防护的屏障效能。 与此同时,大语言模型正在加速攻防双方的博弈周期。攻击者可利用 AI 提示词快速混淆代码以抵御反编译工具,而防御者同样利用生成式 AI 编写抽象语法树(AST)编译器优化脚本(如常量折叠与传播)来自动化解混淆,或在数分钟内快速生成用于验证攻击手法的概念验证代码(PoC)及 YARA 检测规则。但 Stroschein 和 Lopez 一致认为,从手工在 IDA Pro 或 Binary Ninja 中推敲函数的“工匠模式”转向代理化自动化管道,虽然大幅提升了规模化样本分流的效率,但也剥夺了逆向分析中纯粹的解谜乐趣与成就感,且面对可能产生幻觉的模型,关键研判环节依然离不开人工介入与校验。 当前 macOS 攻防生态呈现双向加速演进的态势:攻击载荷深度借鉴了成熟的 Windows 混淆手段并精准打击开发者工作站,而防御端依托 ES API 与 AI 自动化工程实现规模化响应。尽管自动化工具极大缩短了技术验证周期,但如何兼顾开发者体验以化解频繁弹窗造成的安全疲劳,以及如何在 AI 驱动的大规模分析流程中维持人工验证的严谨性,仍是安全团队亟待解决的核心课题。

Detailed notes — zh

## Background 本期播客由 Josh Stroschein 主持并发布于其网络节目《Behind the Binary》(2026年10月14日),全长约59分钟。节目邀请了来自 Volexity 的安全研究员 Christopher Lopez(L0psec),共同深入探讨随着 macOS 在企业与开发者群体中广泛普及,针对该平台的恶意软件正如何进入“黄金时代”,以及社交工程、信息窃密程序演进与 AI 工作流对现代逆向工程带来的冲击。 ## TL;DR 节目围绕 macOS 威胁态势的快速演变展开,指出从 Apple Silicon 普及与科技企业全面采用 Mac 开始,针对 macOS 的攻击已告别明文字符串时代,演变为高度依赖 ClickFix 社交工程、恶意广告与复杂混淆的成熟产业链。受限于 SIP 与 TCC 等系统级防御机制,勒索软件在 macOS 上难以施展,而以 Atomic Stealer(AMOS)及朝鲜 APT 组织为代表的信息窃密木马与常驻后门则迅速泛滥,重点搜刮开发者的云密钥与加密钱包。在防御与分析端,双方深度探讨了基于 Endpoint Security API 的猫鼠游戏,并详细复盘了逆向工程的范式转移——AI 智能体工作流正以惊人速度重塑反混淆、规则编写与大规模分拣效率,但同时也引发了分析师在成就感流失与人机信任鸿沟上的深度职业反思。 ## Atmosphere & style 整场对话在轻松随和的极客闲聊与严肃深度的硬核技术推演之间自如切换。两位资深安全专家既有对底层 API 机制、混淆对抗技术拆解时的敏锐与热忱,也有在面对 AI 颠覆传统逆向手艺时流露出的复杂心绪——混合着惊叹、技术倦怠以及对手工逆向心流逐渐消逝的淡淡伤感。听众能真切感受到两位经历过漫长技术积累的从业者,在面对行业范式剧变时所展现出的坦诚、自省与最终保持好奇的从容姿态。 ## Bulletin - `00:00` 随着 Apple Silicon 普及与科技企业全面部署 Mac,macOS 恶意软件进入复杂度激增的“黄金时代”,告别了明文字符串时代,全面引入 Windows 级别的控制流平坦化与深层混淆技术。 - `05:00` ClickFix 社交工程与恶意搜索引擎广告已成为 macOS 最主流的初始访问手段,黑客利用虚构公司通过 Google 企业验证投放置顶广告,精准诱导开发者在终端执行恶意的管道下载命令。 - `22:30` 朝鲜 APT 组织通过 LinkedIn 假借招聘名义,诱导求职者在 VS Code 中克隆项目并触发信任工作区机制,利用 tasks.json 自动静默执行混淆 JavaScript 窃取凭证并渗透企业内网。 - `45:00` AI 正在彻底重塑逆向分析与检测工程范式,虽然单一样本手工逆向的智力回馈感有所流失,但 AI 驱动的去混淆与快速 PoC 构建使研究员得以实现前所未有的大规模自动化逆向。 ## Key takeaways - `00:00` macOS 在初创公司和软件开发者中的普及使其成为高价值目标,恶意软件在近三年内迅速跟进复杂混淆,与 Windows 生态对抗强度看齐。 - `05:00` 苹果系统安全机制严密导致零交互远程执行极难实现,迫使攻击者高度依赖 ClickFix 诱导用户打开终端执行代码作为突破口。 - `10:00` 频繁的系统权限确认弹窗引发了严重的用户警告疲劳,导致技术人员盲目放行异常行为并弱化了系统防护机制。 - `10:00` 开发者习惯使用的 `curl | bash` 安装流程被攻击者作为攻击温床,通过高仿 Homebrew 页面进行欺诈下载。 - `11:34` 攻击者通过合法注册的空壳公司通过 Google 广告验证,在热门开源工具搜索结果中投毒置顶广告以瓦解用户信任。 - `13:38` AppleScript 兼具原生 API 调用与系统级 UI 伪造能力,配合反虚拟机与硬件探测,已成为下发多阶段有效载荷的主流脚本工具。 - `16:03` macOS 在企业中多作为开发工作站使用,使得以 Atomic Stealer(AMOS)为代表的恶意软件高度聚焦窃取云凭证、SSH 密钥和加密货币钱包扩展。 - `20:00` 逆向工程分析 macOS 样本面临 Go、Rust、Swift、Objective-C 等多语言混杂挑战,动态绕过反沙箱检测比纯静态分析更具效率优势。 - `22:30` 朝鲜 APT 组织针对求职开发者在受管企业电脑上进行的笔试考核,通过 VS Code 的 tasks.json 静默拉取恶意后门,构成横向移动风险。 - `26:10` macOS 具备系统完整性保护(SIP)与透明度控制(TCC),攻击者若无昂贵零日漏洞很难完成全盘加密,导致勒索软件在 Mac 生态中投入产出比极低。 - `27:30` 恶意软件形态正从一次性偷窃演化为常驻后门,同时将解密密钥移至远端 C2 服务器下发,使本地静态分析与大模型自动化逆向陷入停滞。 - `35:00` 攻击者利用 Steam 资料页或 Telegram 频道构建死标解析器(Dead Drop Resolver)动态分发 C2 地址,规避静态二进制 URL 抓取。 - `40:00` macOS Endpoint Security API 提供的 auth 授权事件允许 EDR 实时阻断异常命令(如恶意的管道执行),构成了底层对抗的核心防线。 - `42:15` Flare-On 13 挑战赛被 AI 在短时间内破解促使逆向工程从业者转变认知,行业焦点由手工逐行逆向转向构建规模化、并发的 Agent 逆向工作流。 - `50:00` 借助类似 LLVM 编译器管线(常量传播、常量折叠)的抽象语法树重构理念,结合大模型提示工程,能够以前所未有的速度开发出脚本去混淆工具。 - `52:43` AI 显著填补了安全分析师在底层软件工程与脚本编写上的短板,使几分钟内生成 macOS API 行为概念验证(PoC)与优化 YARA 规则成为可能。 ## Detailed walkthrough ### `00:00` macOS 恶意软件的“黄金时代”与企业普及 在节目开场,主持人 Josh Strohschein 介绍了本期嘉宾 —— 来自 Volexity 的逆向工程师 Christopher Lopez(网名 L0psec)。Christopher 开篇便提到了 Endpoint Security API 的精妙之处:系统提供了两种不同类型的事件,一种是普通的通知事件(notify events),仅告知“某事正在发生”;另一种则是授权事件(auth events),能够做到“某事正在发生,且你可以主动阻止它”。随后两人将话题切入当今的 macOS 安全大环境。Christopher 感叹,如今是研究 macOS 恶意软件最令人兴奋的时刻,甚至堪称“macOS 恶意软件的黄金时代”。 大约六年前,恰逢苹果宣布从 Intel 芯片向自研 Apple Silicon 过渡,Christopher 开始深入接触 Mac 生态。在这段时间里,macOS 在企业环境中的普及率迅猛攀升。特别是大量初创公司、技术型企业以及广大软件开发者,极其青睐将 Mac 作为标准办公设备;而攻击者向来热衷于锁定这类高价值的科技企业,针对 macOS 的攻击演变和威胁向量由此水涨船高。回顾往昔,Christopher 与朋友谈起几年前的日子,那时 macOS 恶意软件还非常简陋,“一切都清晰易读,字符串会直接告诉你它要干什么”;然而最近三年间,样本的复杂度和混淆手段剧增。虽然 Windows 安全领域早就习惯了对抗各种极其恶心的混淆样本,但 macOS 平台也正迅速跟进,“我们正在迎头赶上”,这给逆向分析工作带来了前所未有的挑战与趣味。 对于企业用户和初创公司偏爱 Mac 的原因,Josh 坦言自己家里的老电脑还是 Intel Mac,并且因为工作需要高度依赖虚拟化技术,在面对 Apple Silicon 的诸多限制时很难完全迁移。Christopher 解释称,Mac 最初是面向创意人群进行市场推广的,但切换至 Apple Silicon 和统一内存架构(Unified Memory)后,其硬件性能无可否认。尽管 Mac 售价高昂,但在企业采购中往往被视为一种前期投入较高、但只要系统保持更新就能稳定使用更长时间的“高端设备”。苹果近期发布的统计数据也声称,企业引入 Mac 实际上为 IT 部门节省了大量资金,使其逐渐从过去的可选配置演变为许多新兴企业的标配甚至唯一选项。 ```mermaid flowchart TD accTitle: macOS 威胁演变驱动模型 accDescr: 展示硬件转型、企业普及与恶意软件混淆化之间的因果驱动关系 subgraph Market["企业市场演变"] A["Apple Silicon 推出<br/>统一内存与性能提升"] --> B["科技企业/初创公司<br/>全员部署 Mac 设备"] B --> C["高价值目标聚集<br/>攻击者注意力转移"] end subgraph Malware["恶意软件演变"] C --> D["攻击向量升级"] D --> E["告别明文字符串时代"] E --> F["高强度混淆与免杀手段全面跟进"] end ``` ### `05:00` Intel Mac 的黄昏与 ClickFix 社交工程机制 随着系统版本迭代,老旧的 Intel 架构正加速退出历史舞台。两人在闲聊硬件时提到,苹果最新的操作系统(如 macOS 15 Sequoia 及更新版本)已开始针对 Intel 相关软件发出警告,暗示由 Rosetta 2 提供的指令集动态翻译兼容层将在未来的大版本中被彻底剔除。对于仍在 Intel Mac 上录制节目的 Josh 而言,这或许标志着一个硬件时代的落幕,同时也意味着黑客与安全人员的研究重心必须彻底转向 Apple Silicon 生态。 在确立了 macOS 用户群体的商业价值后,讨论转向了当下最泛滥的攻击手段。Josh 提到了近来常听到的术语“ClickFix”,询问其究竟是一种特定组织的行动代号还是某种具体攻击链。Christopher 明确指出,ClickFix 本质上是一种战术手段,并且已经成为目前针对 macOS 最常见、最具普遍性的初始访问向量(Initial Access Vector)。由于 macOS 原生具备极高的系统安全机制,攻击者几乎不可能在没有任何用户交互的前提下凭空实现远程代码执行。Christopher 犀利地总结道:“ClickFix 正在成为(或已经成为)最常观察到的初始攻击向量。因为在 macOS 上,受限于既有的安全机制,如果不诱导用户做点什么,很难直接获得代码执行权。”无论是初级的凭据窃取木马(Infostealers)还是极为高级的 APT 恶意软件,都将 ClickFix 选为突破口。 ClickFix 的运行模式是一种极度精简却高效的社交工程:攻击者诱导受害者访问恶意网页,网页弹出看似合法的故障提示(如浏览器更新或页面修复),并提供极其“贴心”的逐步操作指引。网页会手把手教受害者按下键盘上的 Command 键、呼出 Spotlight、输入“Terminal”打开终端,然后将预先复制好的一长串恶意脚本直接粘贴进去回车执行。不知情的受害者以为自己在修复网页问题,实则直接在本地终端中执行了类似 `curl | bash` 的管道下载命令,瞬间完成了恶意载荷的植入。Christopher 指出,苹果最近确实尝试引入一些系统级防护来遏制通过终端感染自身的行为,但这些防护极为有限,通常只适用于那些“日常完全不碰终端”的小白用户;对于广大的开发者和技术员工而言,苹果很难在不破坏其既有开发工作流的前提下强行拦截此类行为,否则只会让过去五年里 macOS 备受调侃的“弹窗轰炸(popups)”现象进一步恶化。 - **ClickFix 核心执行流**:伪造系统修复页面 $\to$ 诱导受害者复制恶意指令 $\to$ 指引受害者呼出系统终端(Terminal) $\to$ 粘贴并执行下载载荷(如通过管道传输给 bash 执行) - **防护设计的两难困境**:安全机制若过于激进,会阻断开发人员日常正常的命令行调用与脚本编排;若机制过弱,则无法阻止用户在社交工程诱导下“自投罗网” ### `10:00` 权限弹窗疲劳与“curl | bash”开发者习惯 在 macOS 的日常使用中,频繁弹出的权限确认提示成为了一个不可忽视的安全隐患。Josh Stroschein 将其类比为 Windows 系统中的用户账户控制(UAC)弹窗。Christopher Lopez 指出,macOS 现在的弹窗机制几乎覆盖了用户想在机器上执行的任何操作;这种过载的提示导致用户产生了严重的警告疲劳,最终演变成不假思索地一律点击“允许”或“确定”,只为了能快点完成下载并继续工作,正如 Josh 开玩笑形容的心态:“干就完了(YOLO, right)”。Lopez 认为在保护普通用户与给予开发者自由之间很难找到完美的平衡点: > “So, you know, it's hard to figure that balance out between protecting users, I feel. and allowing devs to do what devs do i mean how how many devs do you know i mean don't don't say any names that still grab things from somewhere and pipe to bash you know to get something to work i mean honestly homebrew works that way” 这种直接从网络抓取脚本并管道传输至 Shell 执行(`curl | bash`)的工作流,甚至就是 Homebrew 等主流工具的标准安装方式。攻击者敏锐地捕捉到了这一习惯,开始大量搭建高度仿冒 Homebrew 官网的钓鱼站点。网站上提供一个极具迷惑性的“复制到剪贴板”按钮,用户误以为复制的是官方安装脚本,实际上粘贴并执行后下载的却是恶意软件。 - 权限弹窗过多导致用户产生点击疲劳,破坏了原本的防御机制。 - 开发者习惯通过 `curl... | bash` 快速安装依赖,成为社工钓鱼的天然温床。 - 攻击者利用高仿 Homebrew 页面引诱受害者主动在终端执行恶意命令。 --- ### `11:34` 恶意广告与搜索引擎投毒:利用 Google 假壳公司钓鱼 针对受害者的流量来源,Josh 推测传统的钓鱼邮件在 macOS 攻击中的主导地位可能不如以往,取而代之的是搜索引擎和虚假网站。Lopez 补充称,除了朝鲜黑客利用求职面试等高度定向的 APT 手段外,更广泛的手段是恶意广告(Malvertising)与搜索引擎投毒。他提到 Palo Alto Networks 旗下的 Unit 42 团队在年内披露过相关研究:攻击者设立了一批虚假的空壳公司,通过了 Google 广告的企业验证流程,进而以合法广告主的身份购买赞助商链接。 当用户在搜索引擎中检索类似“Homebrew”的开发工具时,排在最顶部的往往是这些经过验证的虚假赞助商广告。普通用户和开发者长期以来形成的信任模型在此失效——大家潜意识里认为排在首位的广告既然通过了平台审核,那就是官方安全链接。Lopez 对这一受信任链条的瓦解深有感触: > “So they're breaking that trust model. And unfortunately, a lot of victims fall prey to that, because I mean, if I didn't know any better, I would do the same thing, too.” ```mermaid flowchart TD accTitle: 搜索引擎恶意广告供应链攻击流程 accDescr: 攻击者通过建立经认证的空壳公司购买置顶广告位,诱骗搜索开发工具的用户执行恶意代码。 subgraph AdDelivery["广告注入阶段"] A["黑客注册虚假空壳公司"] --> B["通过 Google 企业广告验证"] B --> C["竞价购买关键词置顶广告 (如 Homebrew)"] end subgraph VictimAction["用户受骗阶段"] C --> D["开发者/用户搜索并点击首条赞助链接"] D --> E["访问高仿克隆钓鱼网站"] E --> F["诱导复制终端指令 (curl | bash)"] end subgraph Infection["初始感染阶段"] F --> G["本地终端执行代码并下载第一阶段 Loader"] end ``` - 威胁行为者利用虚构公司通过 Google 广告主资质验证,获取高权重推荐位。 - 投毒重点集中在热门开源项目与开发工具关键词上,直击技术人员盲区。 - 即使是具备良好安全素养的专业人员,也容易因为对搜索引擎推荐结果的惯性信任而中招。 --- ### `13:38` AppleScript 与初始执行链:反虚拟机检查与多阶段下发 一旦受害者在终端中粘贴并运行了初始命令,整个恶意执行链条便正式启动。Lopez 解释道,虽然攻击者会使用简单的 Bash 脚本,但近些年信息窃取程序(InfoStealers)最青睐的载体之一是 AppleScript。这种极具历史的 macOS 原生脚本语言功能非常深厚,不仅能直接与底层的系统 API 交互,还支持渲染原生的 UI 对话框与进度条,在用户界面上伪装得极为逼真。Lopez 从攻防两个角度对其进行了评价: > “It's a really cool tool from a dev perspective and from a malware perspective, because again, it communicates with these APIs. You can display things to the user. You can do progress bars and all this stuff. You can make things look good.” 初始下发的通常是一个轻量级的下载器或加载器(Downloader/Loader),其核心任务是完成运行环境侦测,以躲避安全分析: - **反虚拟机探测(Anti-VM Checks):** 检查机器是否运行在虚拟化环境中,例如检测处理器芯片类型(Apple Silicon M系列还是 Intel)、检查系统分配的内存容量大小等;如果内存配置过低,则判断为沙箱分析环境并放弃执行。 - **防御侧对抗:** 检测工程师和防御方通常也会重点监控这些前置校验逻辑,因为绝大部分运行在 macOS 上的恶意代码在判断宿主机环境时采用的系统调用与指标高度重合。 - **载荷递进:** 只有通过所有硬件与环境检查后,脚本才会进一步从远程服务器拉取第二阶段经过深度混淆的脚本或二进制可执行文件。 --- ### `16:03` 开发者工作站与凭证窃取:云密钥、钱包与 Atomic Stealer 在讨论到硬件生态时,Josh 提到了苹果服务器的现状。Lopez 指出专门的苹果服务器机架早已淡出,取而代之的是由 Mac mini 组建的小型高密度服务器集群。然而,不同于 Linux 恶意软件主要攻击 Web 业务、CI/CD 流水线或部署 Webshell,macOS 设备在企业中极少承担公网生产服务器角色,绝大多数是作为“开发人员的高级工作站”。这使得针对 macOS 的攻击天然具有针对高价值资产与供应链的属性。 攻击者的终极目标高度明确,那就是在最短时间内套现变现。恶意软件在获得执行权限后,会直接遍历并打包当前用户的家目录(`~`),重点翻查开发者机器上留存的敏感基础设施凭据与资产,包括: 1. AWS 访问凭证与 Kubernetes 配置文件; 2. GitHub 个人访问令牌(Tokens)与 SSH 密钥; 3. 本地存储的各类加密货币钱包(Crypto Wallets)数据与浏览器扩展。 Lopez 指出,窃取程序与防御检测之间一直在围绕钱包扩展进行博弈: > “We've actually been able to key off of those a lot because You know, a lot of those extension IDs for wallets are visible in a lot of the binaries in the early stages of InfoSteelers. So that was a lot of YAR rules in the beginning were based around looking for any file that would be that would have those extension IDs in a binary.” 早期绝大多数检测规则(如 YARA 规则)都是通过匹配二进制文件或脚本中硬编码的常见加密钱包 Chrome 扩展 ID 来实现的;随着对抗升级,攻击者开始对这部分 ID 进行高强度混淆,但快速洗劫钱包与资产的核心动机从未改变。正是在这股风潮下,以 Atomic Stealer(AMOS)为代表的专属 macOS 信息窃密程序开始迅速崛起,成为近年来威胁监控领域的绝对焦点。 ### `20:00` 信息窃取木马的演变与逆向工程的多语言挑战 在谈到常见的 macOS 恶意软件家族时,Christopher Lopez 提到了早期的 Atomic Stealer(AMOS)。最初这种木马多采用明文脚本,非常直白,但如今的样本已经变得极其棘手,广泛引入了混淆技术。为了加速分析,Lopez 有时会借助 AI 工具,但最节省时间的做法还是使用虚拟机:快速梳理样本中的反虚拟机(anti-VM)检测逻辑并绕过它,直接运行观察动态行为,因为面对越来越成熟的窃密软件,纯静态分析不仅费时而且极其磨人。在这个地下生态中,分发和流量代理团伙错综复杂,从 Atomic Stealer 衍生出了众多变种,比如常见的 MacSync 等家族。虽然不同攻击团伙使用的社工诱饵或开发语言各有千秋,但核心窃密行为本质上大同小异。 对于逆向工程爱好者来说,macOS 平台呈现出了极具挑战性的多语言特性。分析人员不得不掌握多种语言的逆向技巧:从令人头疼的 C++,到 Lopez 个人非常喜爱且认为结构优美的 Objective-C;从日渐成熟并被攻击者逐步采用的 Swift,再到人人都得应对的 Go 语言,以及被 Lopez 形容为“一团糟”的 Rust,外加各种解释型脚本语言。不同攻击团伙编写的有效载荷虽然各异,但整体行为逻辑基本遵循同套模板。真正的技术质变,通常只在面对国家级高级持续性威胁(APT)组织时才会出现。 - **主流语言逆向难度**:Objective-C 具备丰富的运行时元数据与高可读性;Swift 正在增加;Go 与 Rust 则在符号剥离和运行时构造上面临巨大逆向阻力。 - **动态加速技巧**:面对深层混淆的 Mach-O 样本,优先定位并修补反分析与反 VM 检查,直接在沙箱监控系统调用往往比死磕静态反编译更有效。 > “Because static analysis for some of these more... I don't want to say advanced infel stealers, I guess that's—I guess we can say that—but more mature evil stealers, I'll say.” —— Christopher Lopez --- ### `22:30` 朝鲜黑客瞄准招聘:VS Code 项目与混淆 JavaScript 陷阱 在所有攻击 macOS 的 APT 组织中,朝鲜(DPRK)被 Lopez 视为最先进且最偏爱苹果生态的攻击者。他们的攻击战术格外阴险,高度依赖针对求职者的社会工程学攻击。攻击者通常在 LinkedIn 上寻找目标,利用当前就业市场不景气、求职者迫切渴望机会的心理,伪装成招聘人员发起联系。随后,他们会以“技术能力测评”或“笔试考核”为名,要求求职者通过本地 IDE(如 VS Code)克隆并打开 GitHub 上的项目仓库,以“展示编码实力”。 这类攻击的核心依然是诱导用户触发恶意行为。朝鲜黑客极具针对性地在代码中塞入大量被 Lopez 吐槽为“最丑陋语言”的混淆 JavaScript。当求职者在 VS Code 中加载项目时,编辑器通常会弹窗询问是否信任该工作区。求职者往往会毫不犹豫地点击同意。一旦信任,项目中的 `.vscode/tasks.json` 配置文件便会自动触发预设命令,直接从后台下载并静默执行恶意软件,使系统彻底沦陷。 ```mermaid flowchart TD accTitle: DPRK 开发人员社工钓鱼流程 accDescr: 展示朝鲜黑客如何利用 LinkedIn 与 VS Code 攻击求职开发者的完整路径。 subgraph SocialEngineering["1. 社交工程渗透"] A["LinkedIn 虚假招聘互动"] --> B["下发面试测试代码仓库"] end subgraph Execution["2. 本地执行与突破"] B --> C["求职者使用 VS Code 打开工程"] C --> D{"工作区信任提示"} D -->|"急于求职直接确认"| E["自动触发 tasks.json"] end subgraph Compromise["3. 恶意行为分发"] E --> F["执行混淆 JavaScript / Shell 脚本"] F --> G["系统植入后门与凭据窃取"] end ``` > “The theme here is social engineering. We need the user to do something. If you're an attacker, that's your goal.” —— Christopher Lopez --- ### `25:00` 员工在企业设备上的安全盲区与横向渗透风险 这种假借面试之名的社工攻击,其受害者并不仅限于处于失业状态的个人。许多已经有全职工作的在职员工同样会在工作电脑上私下寻找下家。当这些开发者在受管理的企业 Mac 设备上参与所谓的“面试编程考核”并运行恶意项目时,灾难便随之降临。这不仅直接违反了基本的安全合规规范,更将企业内网直接暴露给境外 APT 组织,造成企业级主机的初期失陷,并为进一步的凭据盗取和内网横向移动打开了大门。 > “You shouldn't be doing that on your work computer. I'll just say that.” —— Christopher Lopez --- ### `26:10` 为何勒索软件在 macOS 上难以立足:SIP 与 TCC 的防御壁垒 当 Josh 询问这类高级国家级黑客是否也会在 macOS 上部署勒索软件时,Lopez 指出目前 macOS 上几乎看不到像 Windows 那样肆虐的勒索软件。虽然知名安全专家 Patrick Wardle 等人曾对此发布过概念验证(PoC)研究,但在实际环境中,苹果的系统级防御架构为全盘加密制造了极高的技术壁垒: 1. **系统完整性保护(SIP, System Integrity Protection)**:SIP 将大量核心系统目录牢牢锁死,即便攻击者获得了 root 权限,在未关闭 SIP 的前提下也根本无法篡改或加密这些系统文件。而普通的终端用户几乎不可能主动关闭 SIP。 2. **透明度、同意与控制(TCC, Transparency, Consent, and Control)**:攻击者若想加密用户的关键数据(如“桌面”、“文稿”或“下载”目录),必须触发系统权限弹窗并获得用户明确授权,或者耗费极高成本挖掘未公开的 TCC 绕过漏洞。 正因为需要价值极高的 SIP 绕过零日漏洞才能实现类似 Windows 上的全盘锁定,攻击者通常认为用勒索软件攻击 Mac“投入产出比极低”,因此勒索加密在 macOS 上很难成气候。 > “Like there's specific directories if you're not already aware, where not even root can really modify or read. So that's behind system integrity protection.” —— Christopher Lopez --- ### `27:30` 窃密木马转向持久化后门与 Windows 级二进制混淆 在探讨窃密软件的演化脉络时,Lopez 指出过去的窃密软件功能单一且往往“即插即用、偷完就跑”,几乎不尝试做持久化。然而近期的演化趋势表明,窃密软件正在与全功能后门逐渐融合。黑客不仅要在失陷机器上常驻,还会建立持久化的 C2(命令与控制)通信信道,等待后续指令,以维持长期的访问控制权,不再满足于一次性的凭证收集。 ```mermaid flowchart LR accTitle: macOS 窃密工具能力进化 accDescr: 比较早期一次性窃取与现代常驻后门型窃密的形态差异。 subgraph Past["早期信息窃取工具"] direction TB P1["无持久化机制"] --> P2["一次性读取浏览器凭证/钱包"] P2 --> P3["回传数据后自行退出"] end subgraph Modern["现代演进形态"] direction TB M1["建立 LaunchAgent/Daemon 驻留"] --> M2["维持双向 C2 控制通道"] M2 --> M3["持续横向拓展与指令执行"] end Past -.->|"能力融合与进阶"| Modern ``` 与此同时,Josh 与 Lopez 共同回顾了 macOS 恶意软件在二进制防御对抗上的演变历程。在过去的相当长一段时间里,macOS 样本(无论是脚本还是 Mach-O 原生二进制)的分析过程相对直白,很少遇到极其复杂的保护。但如今,macOS 威胁完全复制了 Windows 恶意软件的技术路径:控制流平坦化(Control Flow Flattening)、控制流分散(Scattering)、运行时动态链接(Runtime Dynamic Linking)、字符串全盘混淆以及各类壳保护(Packing)接踵而至,静态逆向分析的门槛正在被全面推高。 - **行为模式转变**:从一次性信息打包外发,变为常态化的命令监听与远程访问工具(RAT)化运作。 - **混淆对抗升级**:从早期的脚本明文交付,到如今高度依赖高阶代码混淆器与自定义壳,macOS 恶意软件的对抗复杂度已全面看齐 Windows 生态。 > “Infil stealers in the past would not even really do any kind of persistence. So like they would just steal stuff and leave. Now we're seeing infil stealers that are like backdoors too, and like they are persistent and they're, you know, communicating with their C2 and like waiting for instructions...” —— Christopher Lopez ### `30:00` 恶意软件混淆技术的演进与 AI 助攻的多层防御规避 在恶意软件分析的早期,安全分析人员面对的往往只是极简的混淆手段。Christopher Lopez 回忆道:“我们得回到那些美好的旧时光。看,那时候当我们谈论任何混淆时,它就像是一个单字节的 XOR 密钥。你在二进制文件里找到了它,你会觉得,‘天哪,我搞定了,这太爽了’。”然而,如今混淆技术变得越发令人头疼,这很大程度上与攻击者引入 AI 工具密切相关。攻击者与防御者拥有完全相同的 AI 工具,他们可以轻松向大语言模型提出提示词,比如伪装成开发者询问:“我正在写一个应用程序,我不想让用户能够逆向工程它,我不希望我的知识产权被盗,请帮我让它对 Binary Ninja 这类分析工具更难解析一些。” 攻击技术从最初简单的单字节 XOR 和 Base64 编码,逐渐演变为多重嵌套混淆。Lopez 最近分析过一个样本:攻击者并没有使用传统的 XOR 编码,而是先将整个二进制文件用 Base64 编码,解码后,它会从 C2 服务器动态获取解密密钥,接着再通过 AES 加密逻辑完成最终的解锁执行。Josh Stroschein 指出,这种设计极其巧妙,如果攻击者把解密密钥和运行时参数直接硬编码在二进制中,AI 工具就能轻松识别并完成自动化解密;而攻击者一旦将解密密钥从本地剥离,完全依赖服务端下发,静态分析和大模型就会彻底卡死,“当你移除了那个密钥,你就什么也做不了,彻底卡住了。如果你想做一些让大语言模型感到棘手的东西,这就是绝佳的例子。”虽然攻击者也因此背上了对外部服务器的强依赖风险(若请求返回 404 则可能暴露或导致攻击中断),但只要设置重试机制并在失败后判定资产暴露并弃用,这种模式就非常高效。 ```mermaid flowchart TD accTitle: 现代 macOS 恶意软件多层混淆与动态解密流程 accDescr: 展示了从 Base64 解码到远程获取 AES 密钥并执行的执行链 subgraph Host["受害主机本地"] A["Base64 编码的主二进制"] -->|"本地解码"| B["加密的二进制载荷"] B -->|"提取主机环境特征"| C["发起特定结构网络请求"] E["内存中 AES 解密"] --> F["最终有效载荷执行"] end subgraph C2Server["远端 C2 服务器"] C -->|"发送请求"| D{"验证主机特征"} D -->|"验证通过下发动态密钥"| E end ``` - 2019 年 macOS 首次引入 Endpoint Security API,为微软、CrowdStrike 等厂商提供了获取系统级进程创建、文件操作等底层遥测数据的基石。 - 在 2019 年之前,由于缺乏成熟的 macOS EDR/EPP 监测方案,攻击者几乎不需要在混淆上花费精力。 - 随着近几年 macOS 企业级检测体系的普及,恶意软件的混淆层级和复杂性呈指数级上升。 --- ### `35:00` 灵活 C2 通信机制与“救火式”被动防御的困局 为了应对安全人员基于特征码(例如匹配包含 HTTP 的硬编码链接)的快速检测,攻击者不仅加固了代码本身,还在 C2 通信信道上引入了类似 Windows 恶意软件的灵活调度策略。Lopez 提到,最近的多阶段加载器(Loader/Downloader)通常由三到四个阶段文件组成,初始阶段的加载器会向磁盘写入一个配置文件,将提取到的 C2 地址写入其中供下一阶段读取;与此同时,载荷内部还会预埋备用 C2。更为隐蔽的做法是利用“死标解析器”(Dead Drop Resolver)机制:例如安全研究员 MalwareHunterTeam 在社交平台上分享的案例中,恶意样本会去访问一个 Steam 个人资料页面,通过读取该 Steam 账号不断修改的个人昵称或全名来动态解析出新的 C2 域名。同样的伎俩也出现在 Telegram 平台中,恶意软件只需向指定的 Telegram 频道或账号发送请求获取动态 C2,这使得攻击者在更换基础设施时甚至无需重新编译或更新本地木马文件。 面对大语言模型能够轻易批量制造变种代码的现状,Josh 和 Lopez 探讨了防御者面临的结构性劣势。Josh 思考未来的攻击到底是会走向极度高度混淆,还是走向依靠海量变种取胜的“返璞归真”——以 ClickFix 攻击为例,许多活动具有强时效性,只需在短时间内达成目标即可抛弃现有资产,这时海量变种的威力往往胜过复杂混淆。无论技术形态如何改变,防御体系依然深陷被动的滞后循环。Christopher Lopez 动情地回顾了自己在安全运营中心(SOC)的往事并引用了前主管的生动比喻:“那让我想起了我过去在 SOC 的时光。我当时的经理说,我们那时候就像消防员,我们只是在等着起火,然后去把火扑灭,因为要在那里完全走在前面真的太难了。”在现有体系下,即便有先进的检测工具,防御系统依然严重依赖主机上已切实发生的恶意行为来触发告警,面对用户主动粘贴执行命令的社工攻击,防御方始终在被动追赶。 - 攻击者利用 Steam 资料页修改名称或 Telegram 频道下发指令的机制被称为死标解析器(Dead Drop Resolver),使样本无需硬编码主域名且免于重新编译。 - 现代检测规则极易通过抓取静态二进制中的 HTTP/HTTPS 字符串提取 IOC,倒逼威胁行为体将 C2 隐藏于正常第三方平台。 - 主机端在用户完成例如 ClickFix 等社工诱导操作(主动运行恶意脚本)之后,终端安全机制很难在事前绝对拦截,安全团队依然处于“发现火情再扑救”的滞后响应周期中。 ### `40:00` macOS Endpoint Security API 与攻防之间的“猫鼠游戏” 在讨论终端防护机制时,Christopher Lopez 提到了 macOS 的 Endpoint Security API,指出所有 macOS 平台的 EDR(端点检测与响应)解决方案都在深度利用这套底层架构。这套 API 提供了两种截然不同的事件类型:第一种是 `notify`(通知)事件,它的作用本质上是告知系统“某件事情正在发生”;第二种则是更为关键的 `auth`(授权)事件,它赋予了安全工具主动拦截的能力,即“这件事情正试图发生,而你可以直接阻止它执行”。Christopher 强调,这正是安全防护工具施展拳脚的核心切入点。例如,当检测到某个 `curl` 命令正在执行并将其输出通过管道重定向给其他程序时,由于这种行为极不寻常,防御工具就可以直接将其阻断。即便遇到因此受阻而发脾气的开发人员,安全团队也完全有充分的理由解释为何不能允许此类行为存在。 ```mermaid flowchart TD accTitle: macOS Endpoint Security API 阻断流程 accDescr: 展示从进程执行到 Notify 与 Auth 事件分发并进行判定拦截的技术架构 subgraph OS ["macOS 系统层"] A["恶意进程执行<br/>(例如 curl 管道脚本)"] --> B["Endpoint Security API"] end subgraph Events ["ES 事件类型与判定"] B --> C["Notify 事件<br/>(仅记录与上报: 某操作已发生)"] B --> D["Auth 事件<br/>(主动评估: 某操作尝试执行)"] D --> E{"是否异常行为?"} end subgraph Response ["决策与响应"] E -->|"行为异常"| F["阻断执行 (Block)"] E -->|"正常行为"| G["放行 (Allow)"] end ``` 谈及当前的威胁态势,Christopher 与 Josh Stroschein 都认为安全团队永远处于稍微落后的被动局面。如今攻击者与防御者都在使用 AI 工具,双方处于同一技术维度的博弈之中。Christopher 指出,这种局面在 Windows 生态中已经上演了多年:只要安全厂商发布博客介绍了一种新型检测手段,攻击者随后便会阅读该文章并意识到“糟糕,那个样本被抓到了”,随即修改代码绕过检测。Christopher 坦言:“这说实话就是一场猫鼠游戏,我不知道这种情况是否会有所改变,我只是觉得 AI 大概正在加速这一进程,让一切演变变得更快了一点。” - macOS Endpoint Security API 的核心区分:`notify` 事件用于异步事后监控,`auth` 事件提供同步事前拦截判定。 - 攻防博弈的加速:安全厂商公开分析指标与特征,攻击者根据公开报告调整免杀手段,AI 工具极大地压缩了这种对抗迭代的周期。 --- ### `42:15` 行业快节奏带来的技术倦怠与 AI 引发的逆向思维转变 伴随安全行业和 AI 技术近乎失控的发展速度,Christopher 和 Josh 坦率地交流了各自面临的精神疲惫。Christopher 提到,现在只要离开安全圈或技术圈休假一个星期,回来就会发现自己落下了十多篇涉及全新概念的深度博客,让人不禁感叹“天哪,我真不敢相信事情竟然发展得这么快”。Josh 对此深有共鸣,他透露自己在职业和人生的现阶段不得不对技术划出严格的界限。过去他整天沉浸在技术中,开车听技术播客,晚上阅读论文并编写代码;而现在只要下班时间一到,他就会坚决去骑自行车、健身,并陪孩子们玩耍,直到次日开工前绝不去想工作。Josh 感叹道:“我认为部分原因——我想我们很多人都深有体会——纯粹就是 AI 迫使技术演进所达到的那种速度。要想跟上这一切实在太难了,这是一种必然,但真的很艰难、令人精疲力竭,我比以往任何时候都更深地感受到了那种精神疲劳。” 随后 Josh 询问 Christopher 作为逆向工程分析师,在日常工作中是如何接纳并应用 AI 工具的。Josh 分享了自己的经历:IDA Pro 依然是他的核心工具之一,但在最近与朋友深入探讨后,他的思想彻底建立起了一条界限,将传统分析手段与面向未来的“智能体工作流”(agentic workflows)区分开来。Josh 承认,一年前自己还是一个不折不扣的怀疑论者,怀疑 AI 能否搞定那些经过高强度混淆的代码;然而,最近举办的第 13 届 Flare-On 逆向挑战赛(Flare-On 13)给了他巨大的冲击——AI 竟然在短短一个多小时内就解出了全部挑战题目。 - 持续在线疲倦感:AI 驱动的技术迭代促使资深从业者设立明确的生活与工作边界,通过下班后的物理隔离对抗信息过载。 - 认知转变的标志性事件:Flare-On 13 逆向挑战赛在短短一个多小时内被 AI 智能体工作流完全破解,迫使资深逆向从业者放弃以往的怀疑态度。 --- ### `45:00` 从个体手工逆向到规模化智能体工作流:信任差距与验证必要性 看到 AI 展现出的惊人能力后,Christopher 直言“这让我感到太悲伤了(That makes me so sad)”。Josh 则指出,AI 的崛起彻底打破了单样本手工逆向的传统格局,当前真正的核心在于“规模化逆向”(reversing at scale)。安全分析师必须从分析单个样本的狭隘思路中走出来,转而思考如何同时处理上百个乃至成千上万个恶意程序,利用精心设计的智能体系统在极短时间内完成解密、还原和分类。 然而,构建这类智能体系统仍面临着架构设计和人机协作上的严重现实挑战。Josh 解释说,要把驱动底层工作流的各引擎合理组合起来并不容易,目前的实际应用中存在着明显的人机脱节: > “我觉得——至少在我个人的经历中——我把任务移交给大语言模型后就只能等待反馈,这之间存在一个断层。我希望在这个过程中拥有更多的互动和控制权,因为这其中仍然存在……就像是一种信任差距,AI 依然会犯很多错误。” 出于这种信任差距,安全分析在实际生产环境中依然需要严格的人工验证,不能任由模型产出未经复核的结论。面对这种变化,Josh 坚定地认为:“对我来说,唯一的出路就是抛弃我那种传统的做事方式,把既有的专业知识整合进以大语言模型为中心的工作流中,并尝试在大规模场景下完成工作。” - 核心工作范式转移:逆向分析的终极目标从针对单一样本的深挖,全面转向基于 Agent 的多样本、大规模并发自动化分析。 - 交互与信任鸿沟:当前 LLM 逆向分析的盲盒交互模式亟待改善,由于幻觉与误判依然存在,人工介入验证(Manual Verification)仍是企业环境中不可妥协的刚性要求。 --- ### `47:15` 手工逆向乐趣的消逝与技术重构下的行业适应 谈到这里,Christopher 从个人情感出发,吐露了自己在面对这场巨变时的复杂心境。他承认自己骨子里极度热爱纯粹的逆向工程,那种甚至会让人兴奋到深夜失眠的成就感,来源于逐步厘清一个未知函数的核心逻辑、在 IDA Pro 或 Binary Ninja 中为它起一个巧妙命名的瞬间,或是成功解开混淆算法后看着字符串列表清爽展开的快感。听到 Josh 将这些传统手工分析打上“遗留技术(legacy)”的标签时,Christopher 坦言心里确实隐隐作痛。 但从务实的技术防护角度来看,Christopher 既不认为 AI 能够包办一切,也绝非狂热推崇者;他的核心诉求是思考如何利用这项工具来更快地查清样本行为,保护企业免受威胁。他指出,大语言模型在应急分拣(Triage)和快速提取线索方面带来了无与伦比的速度红利;与此同时,人类专家最不可替代的作用是设立路标,防止模型因为上下文提示不当而误入歧途。 在这一段落的尾声,Josh 反思了逆向工程师群体的身份认同危机。很多同行自青少年时期就进入这个圈子,而他自己起步虽晚,但也倾注了整整十五年的心血苦练技艺,试图登上专业领域的金字塔尖。可如今大语言模型轻而易举就重现了这套深奥的知识体系,并能自动完成许多原本需要倾注一生才能精通的技术操作。这种颠覆虽然大幅提高了工作效率,却也剥离了手工剥离混淆、战胜未知代码时那种独一无二的智力回馈感。 - 技术人员的心态矛盾:理智上完全接纳 AI 带来的分拣提速与自动化红利,情感上对手工逆向(重命名函数、破除混淆、发现字符串)带来的心流和成就感被稀释感到落寞。 - 专家的核心定位演变:从一线的“代码解题者”,演变为引导大语言模型推理方向、防止其深陷错误上下文逻辑的“领航员与审核员”。 - 终极目标的一致性:无论是利用传统工具还是借助 AI 智能体,安全分析人员的首要职责始终未变,即阻断威胁行为者并守护企业数字资产的安全。 ### `50:00` AI 与逆向工具链:成就感的流失与分析效率的飞跃 Josh Stroschein 分享了自己将大语言模型(LLM)引入工具开发时的复杂心态。过去,安全研究员完全依靠自主摸索,如果模型直接给出答案再去验证,“成就感完全不同,你不会兴奋地跑去跟朋友分享自己发现了多么酷炫的东西”。回顾今年年初,Josh 曾专注于一个看似简单的问题:在 IDA Pro 中,从底层的反汇编到生成最终的高级伪代码,中间究竟经历了哪些编译器优化与流水线层级?为了搞懂混淆与去混淆机制,他深入研究了 LLVM 与编译管线。后来他灵机一动:是否可以将脚本语言(如 JavaScript)直接解析为抽象语法树(AST),然后复用标准编译器的流水线阶段——如常量折叠(constant folding)、常量传播(constant propagation)以及字符串拼接优化——来全自动消除混淆? 在传统模式下,实现这样的工具可能需要消耗数周的工程时间。然而借助 AI,当他把思路输入提示词后,模型立刻给出了原型脚本骨架。Josh 仅用了周六一个下午的时间进行迭代,就写出了一个效果极佳的 JavaScript 去混淆脚本。虽然独立想通架构逻辑令人兴奋,但“编写代码本身的成就感却消失了,因为你不再需要亲自动手写代码,只需不断优化 Prompt”。尽管带来心理落差,这种变化对逆向工程行业依然具有深远价值:逆向恶意软件原本充斥着枯燥的苦工(toil),面对具备多阶段载荷(multi-stage payloads)的高复杂度样本,逐层剥离混淆以达到 100% 确认意图通常耗费数天。现代 LLM 展现出的准确度使得这一流程大幅缩短,分析人员能够以前所未有的速度达成目标,传统的工作范式正在后视镜中加速远去。 ```mermaid flowchart TD accTitle: 基于 LLVM 编译器管道理念的 JS 去混淆流程 accDescr: 展示将混淆 JavaScript 解析为抽象语法树后,通过类似编译器优化的流水线实现去混淆的过程。 subgraph Parse["前端解析"] JS["混淆 JavaScript 源码"] --> AST["抽象语法树 (AST)"] end subgraph Optimization["编译器优化管线 (LLVM 机制)"] AST --> CP["常量传播 (Constant Propagation)"] CP --> CF["常量折叠 (Constant Folding)"] CF --> SC["字符串拼接消除 (String Concat)"] end subgraph Output["去混淆产物"] SC --> CleanJS["干净、易读的代码 / 伪代码"] end ``` - Josh Stroschein 强调了这种工作流范式转移:“But I then lost the satisfaction of building the tool because I didn't have to. I just had to prompt. And so it is a weird world.” --- ### `52:43` 弥补工程短板:AI 在 macOS 检测工程与 PoC 构建中的落地 Christopher Lopez 从防御与检测工程的角度为 AI 进行了积极正名,坦言逆向工程师不必总是对技术变革感到悲观。Chris 承认自己并不是最顶尖的软件开发者,他学习开发技术的初衷是为了更好地理解语言机制、辅助逆向分析,而非科班程序员转行。过去,编写复杂的自动化框架往往非常耗时。现在,当他需要在 macOS 上针对某种全新的攻击技术编写检测逻辑时,往往必须先写出一套概念验证(PoC)代码来触发目标行为(例如模拟恶意程序向受保护的特定数据库写入日志或文件,以验证检测传感器能否抓取该特征)。 利用 AI,Chris 不再需要花一整天去查阅 macOS API 和硬抠语法细节,只需五到十分钟就能获得可用的 PoC 脚本和测试输出,从而快速评估检测规则的可靠性。此外在 YARA 规则编写方面,虽然通用模型的能力存在参差,但 AI 已经非常擅长在二进制文件中指出具备高辨识度的代码片段、提取潜在特征字符串,或者建议如何调整规则过滤逻辑以降低误报率。这使得工程能力稍弱的研究员能够跨过编码门槛,以极高效率实现核心目标——更快地阻断攻击者活动。 - Christopher Lopez 坦言 AI 帮助自己跨越了开发能力的障碍:“It's helped me as a not the most amazing dev do more dev stuff. So that's good.” --- ### `55:00` 学术研究、信息窃取语义检测与未来展望 讨论进一步延伸到模式匹配与语义检测的边界。当前的 YARA 规则主要依赖语法层面的静态模式,例如字节序列(byte patterns)、指令片段和特征字符串。然而针对信息窃取木马(Infostealers),攻击家族虽然变种无数,其底层行为语义(semantics)却高度同质化(如读取浏览器凭证、定位特定敏感目录)。Josh 提出,利用 AI 辅助科研流程,研究人员可以快速对整个领域的现有成果进行文献综述(literature review),快速厘清基于语义检测或中间表示(IR)计算的技术瓶颈到底是在混淆阻碍还是算力成本,进而迅速决策是否值得立项。 Josh 将此与大学博士(PhD)研究进行了类比:撰写博士论文最艰难的环节往往在于全盘消化整个领域的已有研究,从中精准开辟出一块前人未涉足的细微创新点,而 AI 正在让文献检索和空白点定位变得更加高效可靠。对话最后,两人调侃起时代变迁——正如老一辈曾以“你以后不可能随时随地口袋里揣着计算器”为由督促大家学数学,如今每个人口袋里都时刻装着一个大语言模型,AI 已经不可逆转地嵌入到日常生活与技术工作流的方方面面。在对未来保持技术敏锐与敬畏的同时,Christopher Lopez 给出了幽默而坚定的结语:“Final thoughts is going to be all right. How about that? It's all going to be all right. Until then, stay curious and keep exploring.” - 传统静态检测(YARA)侧重于字节模式、指令结构与静态字符串;前沿探索则聚焦于利用 AI 辅助开展基于控制流中间表示(IR)与行为语义的高维度恶意行为识别。 - AI 正在重塑学术与安全预研的生命周期,加速前沿技术方案从文献调研、痛点验证到原型迭代的闭环进程。 ## Notable quotes > `05:00` ClickFix 正在成为(或已经成为)最常观察到的初始攻击向量。因为在 macOS 上,受限于既有的安全机制,如果不诱导用户做点什么,很难直接获得代码执行权。 — Christopher Lopez > `45:00` 对我来说,唯一的出路就是抛弃我那种传统的做事方式,把既有的专业知识整合进以大语言模型为中心的工作流中,并尝试在大规模场景下完成工作。 — Josh Stroschein > `22:30` The theme here is social engineering. We need the user to do something. If you're an attacker, that's your goal. — Christopher Lopez > `50:00` I then lost the satisfaction of building the tool because I didn't have to. I just had to prompt. And so it is a weird world. — Josh Stroschein > `25:00` You shouldn't be doing that on your work computer. I'll just say that. — Christopher Lopez ## Mentioned Josh Stroschein, Christopher Lopez, Volexity, Apple, Apple Silicon, Intel, macOS, ClickFix, Atomic Stealer, MacSync, Endpoint Security API, Homebrew, Google, Unit 42, Palo Alto Networks, AppleScript, AWS, Kubernetes, GitHub, LinkedIn, VS Code, Patrick Wardle, System Integrity Protection, Transparency, Consent, and Control, Steam, Telegram, MalwareHunterTeam, IDA Pro, Binary Ninja, Flare-On, YARA, LLVM ## Video description In this episode of Behind the Binary, we sit down with Mac security researcher Christopher Lopez (L0psec). to discuss the evolving landscape of macOS malware. As Mac adoption continues to grow in enterprise environments and among developers, threat actors are increasingly targeting the platform. Chris breaks down current attack vectors, starting with the rise of social engineering tactics like ClickFix, fake software downloads, and malvertising campaigns. They explore how infostealer fa... [Source](https://www.buzzsprout.com/2414128/episodes/19954332-ep30-the-golden-age-of-macos-malware-evolution-stealers-and-ai-workflows-with-christopher-lopez.mp3)

Source quotes

[5:00] Christopher Lopez: ClickFix 正在成为(或已经成为)最常观察到的初始攻击向量。因为在 macOS 上,受限于既有的安全机制,如果不诱导用户做点什么,很难直接获得代码执行权。 [45:00] Josh Stroschein: 对我来说,唯一的出路就是抛弃我那种传统的做事方式,把既有的专业知识整合进以大语言模型为中心的工作流中,并尝试在大规模场景下完成工作。 [22:30] Christopher Lopez: The theme here is social engineering. We need the user to do something. If you're an attacker, that's your goal. [50:00] Josh Stroschein: I then lost the satisfaction of building the tool because I didn't have to. I just had to prompt. And so it is a weird world. [25:00] Christopher Lopez: You shouldn't be doing that on your work computer. I'll just say that.

Source quotes

[0:00] Christopher Lopez: What a wonderful time to be interested in macOS malware. It's like the golden age of macOS malware. [5:40] Christopher Lopez: ClickFix is becoming or has become the most commonly observed initial vector. Because on macOS, due to the security mechanisms in place, it's hard to get code execution on a macOS without getting the user to do something.

Original transcript

[0:00] One of the things that's really cool about the endpoint security APIs is you have two different types of events that you get access to. And you have the notify events, which are like, hey, this thing is happening. But then you have the off events, which are like, hey, this is happening and you can stop it. Welcome back to Behind the Binary. I'm your host, Josh Strohschein. Joining me today is Christopher Lopez, reverse engineer at Veloxity. We break down the rise of macOS targeting in the enterprise, complex payload obfuscation, and how new AI workflows are reshaping the cat and mouse game between threat actors and malware analysis. Let's begin. All right, welcome to the podcast, Chris. It's great to have you here and we're going to be talking about Macs as becoming somewhat of a theme in the podcast here. I guess it's always interesting to me to see or talk about where you see the world of Mac security. Yeah, first let's start with Macs. What a wonderful time. to be interested in macOS malware. It's like the golden age of macOS malware. Yeah, so over the years, I started getting more comfortable with Macs. Oh man, I think it's been like six years now. Wow. That's a long time now, I feel. But around the time that Apple announced that they were going to go Apple Silicon, and that whole change from Intel. And over time, I've seen the adoption of macOS increase the enterprise. which of course, if there's an increase in the adoption, there's an increase in the amount of targeting. A lot of devs, a lot of startups like to have Mac fleets. A lot of tech based companies like to use Macs and a lot of threat actors love targeting tech and targeting that type of enterprise. So we've been seeing a lot of uh, evolution in the types of attacks and threat vectors and all that for macOS. It's interesting. I was talking to a friend of mine recently, about the good old days a couple of years ago when macOS Mauer was a lot simpler. where everything was still readable, strings told you exactly what was going to happen. And over the last, I don't know, three years, things have gotten much more complex. And it's interesting, like we, we're still catching up with the whole Windows thing. I know you guys over there are used to it and how horrible it is to look at some of those samples. But we're catching up. And it's been making our jobs a little bit more interesting when it comes to certain types of obfuscation. So, yeah, more maxi enterprise. and many more attacks related to macOS. Well, yeah, I think we definitely need to talk about obfuscation and the world of Mac. So we'll get to that here in a little bit in due time. I'm always curious what makes Macs appealing to startups and others. Do you have any? I mean, this isn't really related to reversing or anything, but I'm still, I date myself as well because I only have Intel Macs in my house. I don't have one for work. I just don't know what the draw is. In fact, if I'm looking at needing to replace one of my primary systems, it's probably not going to be a Mac because all the issues with the Apple Silicon and virtualization is still something that I need. I don't know. So let's go back, I guess, when Macs were first introduced. It appeared to cater to the creative people, at least that's how they were marketed. And over time, there's been a lot of developments with the architecture. And I do believe that when they went Apple Silicon, you can't deny the hardware capability. since that time with the unified memory and all the stuff that you know Macs are pretty expensive. But – They typically, I mean, from what I've seen, last a good amount of time as long as, you know, Apple allows the OS's to keep being updated on those older machines. It's like a premium device in the enterprise. And it's more expensive, but it's like one of those where you spend the money up front and then it should last you a bit. It's funny you mentioned that. Again, I don't work for Apple, so this is not an Apple marketing type of conversation. But they released, Apple released some statistics recently about how the enterprise adoption is increasing and how it saves IT a bunch of money or something like that, which is interesting to say. Yeah, I just think that they've just written that. We are premium [5:00] Like as far as they can and slowly it's just become like another option that people are given when they start at a company, you know, you know, for newer companies, it's like sometimes the only option, which has been pretty interesting to see as well. Yeah, I don't know why I just feel like again, it's a shiny device and people are like, oh, that's cool I'll use that. Well, I mean I can attest to that personal experience alone. It has certainly a premium feel, and the hardware does last. Yeah, and regarding those Intel Macs, I believe, because we just got to macOS 27, I believe the next... The next. So that's Golden Gate that just got released recently. You know, they always have fancy names for all the OS's. And the next one, there's warnings now if you're running any Intel related software on the machine that that's no longer going to be a thing starting on the next OS. So they use Rosetta. It's actually the second version of Rosetta. It's actually pretty genius how it works, but it's like an app translation, which allows you to run Intel apps on Apple Silicon. And it looks like they're going to no longer have that available now. for the next OS. So yeah, those old Intel Macs, I don't know. It's about that time now. Yeah, it is. I'm running Sequoia, which is 15. So there we go. Maybe one of the last episodes I'll do on old Intel Mac. Well, okay. So we're getting off. I know we're getting off topic here. Okay, so obviously we've established the popularity and that there is definitely a lucrative base of users that folks can target, malware authors can go after. You know, ClickFix seems to be one of the, I mean, I guess what would you call that? I'm outing myself again on kind of my ignorance on ClickFix itself other than knowing it as a kind of a shiny marketing term. What is that actually? Is it the chain? of it's primarily the technique. Is there a certain group that's behind it? Can you kind of give us the rundown? And I guess maybe before we dive into that, if we back up, is that... one of the more prevalent threats against Mac users, or are there others that would kind of exemplify the threats that Mac users are facing? Yeah, I would say... ClickFix is becoming or has become the most commonly observed initial vector. Because on macOS, due to the security mechanisms in place, it's hard to get code execution on a macOS without getting the user to do something. So I see ClickFix as just another social engineering tactic to get users to do something that they probably shouldn't do. we've seen this from just like more commonly used info sealers all the way to more advanced malware as like the initial vector. A lot of these that we've been seeing, right, is just we want you to do this thing from this website and we want you to paste this or click this in order to put it into your terminal. Like it gives you like a little, little. you know a little helpful explanation of how to do this right so like the the apple key command key and then just type in terminal and then you just paste that into the terminal and then you get to do whatever it is that this website is saying that you're going to do um and a lot of users are falling victim to this because it's super easy. And There's been some protections put in place actually really recently with Apple to try to help with users infecting themselves. like these types of delivery methods, right? So just getting terminal to run something, right? Like piping to bash and just like curling something down and infecting yourself. But that protection is very limited. And it's so you have you have to basically fit into this category of someone that would never open the terminal. Right. And so which makes sense if you're thinking about it. I would find again, I'm not I don't work at Apple. I would find it very difficult to put in protection for something like this. where you don't end up ruining the workflow of a bunch of developers or making things more annoying because one of the memes I think for macOS over the last five years or so is the amount of popups that we get now for everything. [10:00] I don't know if you've seen these where everything is asking for your permission for anything that you want to do in the machine. There's a bunch of prompts and pop-ups. Is that kind of like the UAC prompting? Yeah, yeah, but it's for everything. And there's a lot of conversation about that. And this has actually caused users over time to just click OK to everything because it's like, I don't want to deal with these problems anymore. Like, yes, just let me download this thing. Yeah, yeah. YOLO, right. Yeah, yeah. So, you know, it's hard to figure that balance out between protecting users, I feel. and allowing devs to do what devs do i mean how how many devs do you know i mean don't don't say any names that still grab things from somewhere and pipe to bash you know to get something to work i mean honestly homebrew works that way And that's why that became a lore that, or still a lore, that's used often by a lot of threat actors. It's like a homebrew lookalike site. And you just click on the little copy to clipboard button on the website. And then it just looks like you're downloading homebrew, but it ends up, you know, downloading some hour. I'm running friction free here, I guess, on the Intel Macs. I don't get those annoying pops, pop-ups or prompts. Yeah, and I guess the victims are coming from, I assume, largely search engines and, like, faked websites. So you're talking about homebrew. or I guess that would be primary. I suspect then the fishing is maybe not as dominant in this role as it maybe once was. Well, we have more targeted type of things, and we'll get into that as more APT, like North Korean stuff. uh contiguous interview type stuff i don't know if you looked at those types of campaigns uh we'll get into that so let's talk a little bit about these websites or like these search engine things i think is pretty interesting this like malvertising side of things right so i believe it was unit 42 recently i know it was this year they went over um something that was related to mac os malware and they talked a little bit about this uh where essentially these malicious actors a network of like Google, Google, I think you have to be verified by Google, like shell companies, so fake companies. And then they were essentially able to distribute these like sponsored type links on your search engine, which then users I'm searching for whatever it is like, we'll go back to homebrew, not to pick on them because they're pretty awesome. But, you know. You're looking for homebrew, you want to download it, they'll have something there on the sponsored links right at the top, of course, because that's where people are usually going to click. And then that's how they infect themselves. So there's a lot of focus on how do we leverage what users already do, right? So you're going to go to Google, you're going to search for something and you're probably going to click the first thing you see because that, you know, Google is telling me this is fine. You know, Google verifies this. So they're breaking that trust model. And unfortunately, a lot of victims fall prey to that, because I mean, if I didn't know any better, I would do the same thing, too. Yeah, it's easy, very easy to do, especially for someone who's... Well, even for someone who is well-versed in the field or in good security practices to just – take the trust that's inherent and click the link and follow it. So yeah, it's a great model, a great model to get into. It's, and I know it's been effective for, for quite some time. So that takes you to a site. There you get the instructions, the social engineering to copy some command, open up a terminal, and it's probably going to start simplistic curl pipe to bash or something. Is that generally where this whole thing starts off? Yeah, so once you get code execution, right, so like that initial command on a terminal to do something, then that kicks off basically. everything else. So they'll grab whatever, uh, There's a lot of different types of files that that threat actors will leverage. But since we have a lot of Apple script malware, right? So that's like that old, old, very old type of scripting language on Apple that has been leveraged a lot by threat actors over the last, I don't know, since the Info Stealer started. because it is a pretty deep language, so it's able to talk to a lot of those APIs on macOS and do really cool things. It's a really cool tool from a dev perspective and from a malware perspective, because again, it communicates with these APIs. You can display things to the user. You can do progress bars and all this stuff. You can make things look good. [15:00] Fancy. And it has a lot of functionality to grab stuff with like native APIs from, you know, Apple devices. So sometimes we'll see that we'll see like simple bash scripts sometimes, which is great because they're easy to read. And other times is super obfuscated scripts or binaries. They'll come in, but that initial one is usually a downloader, like, you know, that curl reaches out to some kind of download or some kind of loader that checks the machine and make sure, you know, it's an actual machine, not some kind of VM. Usually a check for that. And there's a lot of those types of checks that, you know, defense people, you know, detection engineers focus on as those initial stages, because a lot of them do the same things on macOS to make sure that it's running on MacOS. an actual Mac OS and not on a VM of some type. uh so we key off of those a lot right so we'll check to make sure um you know what kind of chip it's running we'll check to make sure how much memory it has because if you have so little memory how is that a real machine same thing that happens on windows same windows you know yeah they're just checking for things and then it'll download another stage from there. Yeah, right. Are Apple servers still a thing? - Well, we have Mac minis is kind of the thing now. Like the little Macs, they'll have server farms of those. But not really like, yeah, not those big server type machines. Now everyone uses like those little Mac minis. - Mac minis, okay. - Yeah, which are pretty capable devices. Pretty capable devices, pretty cool. - Are they? Okay. - Yeah. - Yeah, I'm just curious because you've got this world of Apple that is, Linux-like. Typically, when you look at Linux malware, it's going after production systems. There's a server of some sort. They're hosting a website, so it's trying to get a web shell, or it's a CICD pipeline or something. Macs are a blend of that world. They're not typically production systems per se, but they're developer workstations. It would seem to open the door the everyday user and the developer, the social engineering stuff we're talking about now, but even like supply chain compromise through packages because you're installing those where, you know, in a Windows system, it's a little bit different world, I guess, although you do tend to get a lot of the same packages. So yeah, I don't know. Have you seen anything, I guess, that would fit in that category as well? Maybe beyond the social engineering that's dominant or is that really just... They're going after the developers to get things. I would assume they're going after things like developer keys and GitHub tokens and Bitcoin or crypto wallets or that real sensitive stuff that developers tend to have. Yeah, it's going to be a little boring because the end goal is a lot of these wallets and things like that. Usually, you know, trying to find a way to profit off of these types of attacks as quickly as they can. So a lot of what we see is dev targeting. So keys, like you mentioned... They'll just grab the entire bunch of files from the home directory of the user is what they're looking for. So AWS, Kubernetes stuff, GitHub related files and configuration files. And of course, all of these types of info stealers are looking for some kind of wallet. We've actually been able to key off of those a lot because You know, a lot of those extension IDs for wallets are visible in a lot of the binaries in the early stages of InfoSteelers. So that was a lot of YAR rules in the beginning were based around looking for any file that would be that would have those extension IDs in a binary. or in the script or anything like that. And that's still something that, you know, they're obfuscating that now, but that's still something that, is like the main goal, it appears. We have seen the... from more of the supply chain related stuff. We have seen that before related to macOS and it'll end up at the end of it being for something related to some kind of wallet anyways or something like that. It's usually like the end goal is like, how can we make as much money as we can from this compromise? Seems to be the easiest thing. I guess so info I know info Steelers now so they're the hotness on max I haven't been I guess a social media as much as I used to but it seemed like you were posting there quite a at one point. often about Atomic Stealer, I believe. Yeah. Is that still one of the more [20:00] prevalent or is there a particular named family that you encounter frequently? Yeah, the good old days of early atomic stealer. So, you know, this was one of those clear text type samples in the beginning. And now, nowadays, I was actually looking at one earlier today, they're the most annoying samples to look at. now because they're doing all kinds of obfuscation and you know it's it'll take a little bit of time uh ai tools have helped out a little bit with that I'll be honest with speeding up the analysis of some of these files. Or honestly, at the end of the day, just to make things easy for myself, I have a VM, And I'll just verify like what kind of anti-VM analysis it does or anti-VM logic it has. And I'll like bypass that and just run it and just save myself time, honestly, and see what it does. Because static analysis for some of these more... I don't want to say advanced infel stealers, I guess that's i guess we can say that but more um Mature evil stealers, I'll say. So we see that and we have a there's like it's a really complicated story and I'm not super well like versed on all of this, like these trafficker groups and like, you know, how. all these things work and like there's a lot of deviations from atomic stealer I have a lot of friends that focus on that side of things, like who is responsible for what and like, you know, which group does what and things like that. But they all kind of do a very similar thing. So we've seen like MaxSync is one that was really prevalent. And there's a bunch of them. They all kind of do a very similar thing in maybe a slightly different way. So like the lore might be a little bit different. you know, the payload might be written in a different language, but it kind of still does the same thing, right? So like, something that I've really enjoyed as someone that really loves reverse engineering is that on macOS, you know, we, we have a lot of languages that we have to kind of get good at reversing. So, you know, we have like the C, C++. C++ is a nightmare, but, you know, still it can be. It can be. And, you know, we have Objective-C, which is my favorite language. I think it's beautiful. You know, we have Swift, which is not really replacing Objective-C, but it's another language that's been getting more mature and more threat actors have been leveraging. And We have Go, which everyone is dealing with. We have Rust, which is a mess, honestly. And then we have all these scripting related languages too. The payloads change between these groups usually, but they're all kind of doing the same thing in a way. It only really changes when we get into like more advanced... type of APT groups. So like North Korea... Loves macOS. um as a target uh they're the most advanced like persistent threat that we have um you know and they're related to i think it's kind of it's really messed up like what they target so like this is like the whole job interview thing where they're like targeting they'll do it on linkedin it's so messed up they do it on linkedin right they're like there's already someone that's struggling because you know The world's kind of tough right now. And, you know, they get reached out to by some person that looks promising. And they're like, hey, you know, take this test, take this quiz, whatever, you know, do this job application or whatever. And then we've seen a lot of these recently where people. They'll have you reach out with your IDE to, you know, like VS Code or whatever, reach out and connect to this or pull down this project from, you know, GitHub or whatever. And it's like, hey, show me that you know what you're doing, you know, cold this up for me a little bit. And again, that's again, the theme here is social engineering. We need the user to do something. If you're an attacker, that's your goal. So that would end up with a little bit more advanced techniques there. We've seen a lot more annoying samples from there. No one wants to look at JavaScript, I'm going to be honest. Obfuscated JavaScript is the ugliest language ever. And we see a lot of the DPRK, you know, threat actors leveraging that so they'll get the user to open this project in VS Code which then there is a prompt there in VS Code to be fair where it's like hey are you sure you want to allow this uh but the person that's allowing that is someone that's like I need [25:00] his job, you know, so I'm gonna, yeah, click, Click yes. Then we'll have that task. I think it's a task.json file. on these projects that then goes and is able to run, you know, commands, and then it's off to the races later now. Now you have malware on your system. So DPRK has been doing that. kind of stuff for a bit now that contiguous interview. I think it's really messed up, honestly, that type of target. But it does also happen not just for people looking for jobs like that aren't employed. It also happens, unfortunately, for those that are employed. And then we'll have a compromise in an enterprise environment, and that's just not good on multiple fronts, honestly. You shouldn't be doing that on your work computer. I'll just say that. Yeah, job hunting on top of bringing an infection in or compromising. Yeah, and then those, I suppose with the nations like DPRK, at what point is malware all just sort of the same thing? maybe you throw in some ransomware from time to time, depending on what you're after and what you're interested in doing. - Yeah, we don't see that on macOS. like ransomware stuff, there's been some like proof of concept I know Patrick Roto has talked about this before. Like he's the macOS guy. um yeah he's the mac yeah yeah he i'm a big fan of his um and he's talked about this several times there have been some samples that have come out but because of the protections in place by mac uh by apple on mac os it's really hard to touch a bunch of directories, the way that ransomware works on Windows. Like, there's specific directories if you're not already aware, where not even root can really modify or read. So that's behind system integrity protection. So because unless you turn that off, which most users don't. So ransomware, there are ways for it to spread within certain locations on the system, especially if they have some kind of a TCC related bypass. So like the transparency consent and control, which are related to pop ups. So let's say if you want a file to access the desktop and the documents and the downloads, you need an actual permission for that. this sample has the ability to prompt the user for that permission, or it has a bypass, then maybe it can ransom encrypt the user's files in those directories, but you can't lock the system really. So, yeah, that hasn't been figured out because now watch, we're going to see something happen next week where they figured something out. But you need a sit bypass and that's very expensive. Um, so probably not going to see that anytime soon. Okay. Um, but yeah, back doors or something. You mentioned that we are seeing that a lot more. Um, So infill stealers, we mentioned before, they have changed a lot where they were incredibly boring in the beginning. And now they're more persistent. So like infill stealers in the past would not even really do any kind of persistence. So like they would just steal stuff and leave. Now we're seeing... infill stealers that are like back doors too and like they are persistent and they're you know communicating with their c2 and like waiting for instructions and like you know and it's gotten much more advanced where they're like well we don't want to just steal something one time we want to make sure that we can continue doing what we're doing you know yeah so yeah that's been an interesting uh evolution as well where they're not really just infill stealers most of them anymore and their capabilities. Yeah, you talked about obfuscation, and I remember it's been a while since I've looked at anything Mac, but I think last time probably we talked, you were saying the same thing. A lot of times it tends to be relatively straightforward in terms of analysis, whether it's at the scripting stage or it's an actual... Maco binary. That sounds like that's changed though. And now you're dealing with, and I think we probably speculated at the time that they'll catch up and that you'll kind of go through the same evolution that Windows malware has gone through in seeing more of the same techniques to slow down detections and analysis. So now you're seeing everything that we see in Windows, control flow, scattering and flattening and runtime linking and string obfuscation. Is that all now? the expectation when you look at a binary packing and I guess do they do they have still like a monolithic layer of packing or is it more code obfuscation? Yeah. [30:00] Um, We got to go back to the good old days. See, back then when we talked about any kind of obfuscation, it was like a single byte XOR key. And you'll find it in the binary. You're like, oh, my goodness, I solved this. It was so awesome. Yeah, it's gotten more annoying. for sure. And I think that I think a lot of this coincides with the introduction of AI tooling from an offensive perspective. So threat actors have the same tools we have. And it's easy to ask one of these tools now, how do you make this less readable. I'm trying to write an application and I don't want the users to be able to reverse engineer it. I don't want my intellectual property. You can say whatever you want. I want my intellectual property to be, you know, whatever, make this a little bit more difficult for tools like Binary Ninja to analyze. So we have seen that. It started... like I said, in its infancy with some simple XOR, even base 64, which still does happen. But now it's like multiple obfuscation, like kind of on top of each other. So I was looking at a sample recently where it didn't really have that type of XOR that type of XOR encoding or anything like that. It still used Bay64, but it Bay64 an entire binary. And then it grabbed a key from the C2. So it decoded it. And then it got the key from the C2 that's only available that the C2 needs to send to you. And then it was like an AES related encryption to then unlock the file. So it was like built on top of the simple base 64. So it kind of shows you like, oh, they first probably did this with base 64. And they're like, oh, that's too easy. Let's add like another thing. So, and, And I think that's an interesting chain, because if they had embedded the ability to decrypt that payload at runtime, that would, you know, the key would be there and any other necessary parameters for the decryption, which would give AI all it needs to solve. You remove that. And that's been I mean, you go back years and you look at like a multistage infection chain where it would provide a key as part of a parameter to the next stage execution. When you remove that key. You can't do anything. You're stuck. This is a great example of you want to make something that our LLMs will have difficulty with. there you go. A key that never is persisted anywhere that only shows up. Of course, you have a little bit then of from the attacker's perspective, you know, a little bit of dependency, of course, not a little bit, you have that dependency upon the server, right? So you may run into issues there, but you know, if you make it in a way where like try to get the key, Oh, it fails 404 or something, just keep trying for a set period of time. And if eventually it doesn't, you know, that something's been burned. Yeah. That's a good model. We've seen, yeah, it's smart. And again, the AI tooling I feel like is a lot to do with that. Of course, you know, directors are creative. We've seen their creativity over the years, but they're also lazy like we are sometimes. These AI tools probably make it real easy to kind of come up with like, hey, I want to, I don't want this key. to be easily accessible in the binary, what can I do? uh so you know just make it so that it's a specific communication a specific request that you make out to your server, which then hands you the key based on something that's only available on that machine, that's even more interesting. Right? So like, there's like multiple layers that you can add to that. And I think that's just going to continue being like the game that we're playing here. Right? So like, as macOS detections have gotten better, Right. So let's go back a little bit. 2019. This is when Mac OS first introduced endpoint security. an API that allows, you know, Microsoft or CrowdStrike or whatever these companies, right, to be able to create a tool to basically leverage telemetry to detect, you know, this process created, this file was created, and this thing happened on the machine. That was 2019. So if I was a threat actor, right, if I was writing malware back in that time, why would I obfuscate anything? You know, like no one has really even adopted this yet. uh so now you know we are what is that seven years my goodness yeah seven years since the introduction of that right so that's like basically the foundation for an ER or EDR So since then [35:00] I feel that the obfuscation has only increased more and more and the type of, you know, what they're doing on the machine has changed. More sophisticated ways of, you know, getting to their actual goals. So I think this is going to continue happening. Obfuscation has become really annoying. And it's just one of those where... especially when it comes to samples like that, where it's based on that communication back to the server, you just got to make sure you're analyzing that binary very early in the timeline. Right? So very early, this server was just stood up or something. But I actually saw it recently. And again, this happens on Windows too. So this is nothing crazy, but we'll have like a multi-stage three or four files that are all in a stage, download or loader or whatever. Then one of those early on, so the initial loader will write a config file. And it'll store this config file. It'll store the C2 in the config file for then the downloaded file, right? The next stage will then look at that config file. and then have the C2 there, but it also has embedded C2s with it as like fail-safe C2s. I've noticed that too. Or we saw this, I think it was this year, MalwareHunterTeam on Twitter shared this with me. And it was one of these, I believe it was on a Steam profile. or something like that. So like the sample would reach out to a steam profile and then grab a grab the domain from there. So you can change the, I think it was the profile name of the Steam profile. right so like you it's still an association to that steam profile you can change like the name or the full name of that account, and then that's the new domain. I forgot what that's called. There's a name for that. It's D something. So yeah, they're getting more clever with that. They don't want to just have their C2s embedded. Because we're looking for that. We're looking for anything that matches HTTP whatever, you know, for our rules. I mean, it's like simple to do that. So, you know, I think this has been happening on Windows for a long time. But we have seen this now we've seen this in Telegram channels to. It will communicate out to a Telegram chat or a Telegram account. And then that C2 can change on that account over there. But the Mauer itself doesn't have to be changed. It doesn't have to be recompiled or anything like that. It's just dependent on this like outside, you know, whatever to have that fail safe C2. So yeah, it's getting... interesting to say the least uh over time that definitely sounds like um the world of Windows malware and adversary operations. It is... You know, we're getting to a point now with LLMs. I'm starting to wonder, because you mentioned it earlier, it's quite... straightforward, especially if you have the technical underpinnings to have LLMs create obfuscations for you and the tooling necessary. You just assume the model isn't, you know, whatever models you're working with aren't going to be a problem in generating the code for you. So, you know, sometimes a lot of times they have like these cyber safe models and stuff. It's pretty easy to do and it's not, yeah, I'm sorry, I'm wondering what is the future? Are we going to see more advanced created or Are we going to regress a little bit? because you can just create so many different samples with enough variation that it really doesn't matter as long as you can get The click fix example, I would imagine that a lot of those campaigns are designed to run for a set period of time to achieve some immediate goal and objective, and then they move on to the next one. So they have a window that the artifacts are no longer matter to them. And maybe you don't need as much obfuscation. It's just the sheer volume of it. I still don't see or have come across an environment where, I mean, we're still all reactive. We're waiting until something has executed on the host and then we play catch up. And there's nothing that... ultimately blocks that once the user has, in the case of like a click fix, taken that step to execute the command. You know, you're just, you're just catching up. So like, that's all the, that's all the adversary has ever needed. It's just a small window to stay out in front. Yeah. That reminds me that catch up that you mentioned there reminds me of my time. in a sock um my manager at the time he he said that we were like firefighters at that time you know like we're just waiting for fires so that we can put them out because it's really hard to be super ahead of the game there. I do think that there's some tooling that has help with that. It's still dependent on something actually happening on the machine for something to detect it. Right? So like, we're still behind [40:00] I ain't on that because I mean, I mean, there are ways to block stuff. So one of the things that's really cool about the endpoint security... APIs, you know, that all the ADRs leverage for Mac OS is you have two different types of Events that you get access to and you have like the notify events which are like hey this thing is happening but then you have the off events and which are like, hey, this is happening and you can stop it from happening. Um, which is really, that's where like really clever tooling comes into play of like, oh, this curl command is executing and we see this piping into this thing. can we stop this from happening? Because we know that this is not usual. And if it is usual and the dev gets mad, that's fine. We'll talk about how we have justification to not want that happening. So yeah, I feel like we are kind of always a little bit behind. And The whole threat actor thing now with the leveraging of AI tooling, I mean, we're both doing the same thing. Like both sides are doing the same thing. And we've been playing that game now for a while, especially in the Windows side. You know, y'all have been playing this forever with every time there's a new way of detecting something, third actor reads about it on some cool blog posts. And they're like, oh, man, they got that sample. OK, so now we need to change that so that, you know, we can't we can't be seen here. do that. And yeah, it's a game of cat and mouse, honestly. And I don't know if that will ever change. I just think that AI is probably expediting that a little bit. It's just making it a little bit faster. I don't know if this happens to you, but sometimes I take breaks from things that are happening in the tech world and the security world. And then you come back a week later and you're like, oh my God, I can't believe things are moving this quickly. And now I have 10 blog posts to read about something that I've never heard of before. That's great. You know? So, yeah. I have found definitely as I've progressed in my career and in life that I take – I take harder breaks from tech. I used to be, I used to consume it, work on it all day, listen to podcasts in the evenings, you're in a drive, read articles at night, work on projects. And now I get to... At the end of my working day, I'm going to go ride a bike and then work out and then play with the kids. I'm done. I'm not going to think about this until the next day. I think part of it, I imagine a lot of us are feeling it, is just the speed that AI has now forced things to evolve at. It's just hard to... keep up with it all and, um, It's a necessity, of course, but it's hard. It's exhausting. And it's just I'm feeling that mental fatigue harder than ever. And I know part of that's probably age, but I'm right. I'm right there behind you, man. Yeah. I wonder how you don't mind me asking. How's it been for the adoption of AI tooling as a reverse engineer for you? have, you know, Ida is still one of my primary tools and it's still just a friend of mine We had a conversation the other day and he really, it finally really clicked into my head, this, this line in the sand that I've now drawn between like legacy things and the future and doing, you know, agentic workflows, things like that. And, and, and I just still very much, and I'm sure it will change, but I still use it oftentimes as a, as a legacy tool. I have been doing a lot with, you know, agentic workflows and it's. It's completely changed my perspective. A year ago, I was probably in more of that pessimistic camp. I don't know if AI is really going to be able to handle the really obfuscated stuff. But I think if you're a CTF player, Flareon was launched recently, Flareon 13. And I think AI solved it in just over an hour, the entire challenge. That makes me so sad. capable at it. So I guess, you know, the short of it is I, that is the, I mean, that is obviously the future. There's been a lot of people that have been saying that and building tools, you know, I think it is, it is reversing at scale. Like that's the mindset that I have now. I don't, I don't want to, don't limit myself to the tooling to do one sample, but how do you do or hundreds of thousands? How do you do it at scale? How do you build workflows that are smart and effective? I would imagine those folks that were able to, for example, finish Flare On in a short amount of time, have really good, you know, magentic setups, [45:00] And then just figuring out how to structure that stuff right. How do you have the right engines to drive the right workflows that get you the results that you need? I think there's a lot of work that needs to be done there because right now I feel, at least in my own personal experience, I have this gap between handing off things to the LLMs and then waiting for response. I'd like a little bit more interaction and control there because there is still – I still have a – like a, a trust gap, you know, AI still makes a lot of mistakes. It's, I still feel the need and, and oftentimes like at work, it's, it's a requirement to do manual verification. So, so, but it's coming. Like I, I, that's to me, that's the only way forward is to get rid of my legacy way of doing it and adapt that knowledge to an LM centric workflow and try to do things at scale. Yeah. Thanks for sharing. Cause I, I love to hear how people are feeling about it. because there's been a lot of hard truths, I feel, that a lot of us have had to Uh... you know, basically deal with over the last couple of years. So I'm gonna give you my viewpoint on it. I love reversing. I it's like it it keeps me up at night sometimes. It's like it's like fun and And it's something that the joy of figuring out what a function does and renaming it. to some clever name that you thought would be cool, you know, to name that function and like, you know, figuring out the obfuscation and being able to see that show up in your session with Ida or with Binja and, like, seeing all the strings pop up. And, like, there's something about that. You mentioned legacy, and I get it. I get that. And it just kind of hurts a little bit, you know. Yeah. But I understand where things are going. I... I was not on the camp of like, this is never going to solve all problems. And I was not on the camp of like, This is the best thing ever. I was more in the what do I need to do to Make sure that... this is leveraged in a way that, makes sense in order for us to get to the same goal, which is like... figure out what a sample does and protect whatever from the sample in the future, like find out what's happening with the sample. How can we stop these third actors from doing whatever they're trying to do? But it does still make me a little sad. I have realized that there's, you know, a lot of the different workflows that work really well. And getting an answer quickly is awesome. Triage related to this is awesome. The speed is what's I think the biggest benefit still having someone to, you know, verify, um, is super critical, you know, making sure that just like we don't go down the wrong rabbit holes, making sure that the LM doesn't go down the wrong rabbit holes based on some kind of context that you may have not explained well enough or, you know, something. Yeah. So again, not trying to turn this into like a sad moment for reverse engineer, because that's not what I'm saying. But the change has been interesting. It's it's definitely changed the way that a lot of people I feel are. approaching reverse engineering. And I don't know, I think that it's going to continue to evolve and we just need to continue to adapt to this new way of doing things. And if the goal is still, you know, protect the enterprise or, you know, stop their actors from doing what they're doing, It it basically reinforces that and it makes that faster. So it's one of those where you just kind of adapt. I mean, I feel like the tech industry has been doing that for a long time. And I would, it's sad. It's something when I stop and reflect and think about where my reverse engineering journey started. And I know folks that got into it when they were, in their adolescence. It came a little bit later in life for me. It's hard to to say, okay, the last 15 years that I have been doing nothing but trying to get to the pinnacle of this field, well, now the AIs, the LMs just... We've recreated that they have that knowledge and they can do a lot of what I've spent a lifetime trying to figure out and learn and it's hard and and you know certainly the joy of the things the reversing and seeing the results and figuring out some obfuscation and getting rid of it or getting past is very rewarding and you don't. I haven't been getting that same level. You don't, you know, like an LM based workflow, it, [50:00] If LM just tells you the answer and you go and verify it, it's not the same thing. It doesn't have that same sense of accomplishment. No, you don't share that with your friends. You're not like, look at this cool thing that I figured out. You're like, ah, okay, you're right. And there's a lot of things that tooling, for example. You talked about JavaScript earlier, and I spent a good part of this year, beginning of this year, really focused on – I had a simple question. I wanted to figure out what happened between Ida, and this is like an oversimplification, but just to make it easy, what happens between Ida when it disassembles to when you get pseudocode? What are all those different layers? And this took me down a lot of paths, and my goal was just to really understand obfuscations and deobfuscations. You know, I finally got to a point just through this, just like normal research, I was looking at a lot of, I spent a lot of time with LLVM and compiler pipelines, and it dawned on me one day. I'm like, hey, you know what, I wonder if I could take a language, parse it into just a raw AST, and then do normal compiler optimization pipeline passes and constant propagation and constant folding and string concatenation and things that compilers do to get rid of the obfuscation And oh yeah okay I think I can And then instead of having to then spend what probably would have taken me weeks to create a tool I go to AI and say, hey, this is what I'm thinking. And it's like, hey, dummy, welcome to the party. Yeah, this is kind of how people do it. And here's a script for you. And then you iterate on that. And I think Saturday afternoon, I was able to create a pretty good deobfuscation script for JavaScript. And it works great. And so just – but it's not the same – yeah, it was a sense of joy coming to that conclusion naturally. But I then lost the satisfaction of building the tool because I didn't have to. I just had to prompt. And so it is a weird world. And it's also exciting because now you think about reversing and it is full of toil. I mean, you're analyzing a sample. Maybe it's multiple stages. If you get into every single stage and as you get more further down the chain, they tend to get more of the complexity, more of the functionality. You could take a lot of time and deal with the obfuscations and to get to the point where you can say I 100 percent confident And this is what this does if you could ever really get to that point that takes a lot of time Now you just can do things quicker and faster And I think there's a level of correctness that's coming out of these models now that make it very, very feasible. So that's also exciting too. But it is very much a different way of looking at it. And it's a big pivot. It's hard to see that out of the legacy world. start to go away in the rearview mirror, at least for me. That's how I'm starting to look at it. Yeah, I'll say something positive about it too. I think that's good to kind of level it out a little bit. I won't just be here crying as a reverse engineer about what's happening. So let's say a positive. So I've never been the most amazing developer. So I kind of got into reversing probably in the wrong way where I learned how to be a better developer to help me understand languages more so I can be a better reverser, not I started as a developer and I want to know how to reverse now. So I not great at writing super complicated things like simple scripts to do stuff for me that easy um but what ai has helped me specifically with is let say i want to figure out how i want to detect this new type of technique on mac os and this requires me to write some kind of like proof of concept code in order to like trigger this functionality that i'm looking for wherever this may be let's say that this functionality writes a file to this specific database that i want to collect and i and i know that that determines that this happened um ai has been really helpful with making that workflow a lot quicker where instead of me struggling because i'm not amazing as a dev i'm okay um you know instead of me sitting there all day trying to like figure this out i'm already like within five ten minutes i'm looking at the output of that um pretty quickly and making a decision on like is this a good way of detecting this so I do think that that's been a benefit um it's so regarding Yara I do think that it's okay with Yara from what I've seen maybe people have better um I don't know models for Yara uh but it might give you like a quick like hey this is interesting in the binary you may want to detect [55:00] or this is an interesting place to kind of like, filter out or you can make this rule a little bit better with this. I've noticed that it's Pretty good at that. as well so from a detection detection capability i think that there is a lot of benefit there like how can i use this to accelerate what i'm trying to solve quickly Again, for the end goal of protecting... or, you know, stopping card actors from doing what they're doing. Yeah. So, yeah, there is positive, of course, positive to everything. You know, that's it's helped me as a. not the most amazing dev do more dev stuff. So that's good. Yeah. Yeah. It, it helps with my, I know with my research cycle, uh, as well as just like a research assistant or aid. You mentioned, so like two things that have converged here. You mentioned Yara and Yara is great. It's, it works on, you know, code patterns, byte patterns, strings, syntax of something, instruction level where, um, Where, you know, we talked earlier about info stealers and like, there's only, there's so many variations of them, but they all kind of do the same things. Like the semantics of an info stealer would, would largely be the same. That's an area I think would be cool to, to do some research and something that I could. with an AI assisted research flow, you know, come to lit view the field, who's done what, are there different ways to approach it? And, and if not, or if so, where, where were there, where did they fall short? What are the expenses? Maybe it's just too hard to compute intermediate representations of something, or it's too incomplete because of obfuscations. And then, you know, like iterate on something and come to a conclusion on whether or not I should follow that at a university and our PhD programs. And so a big part of someone going through, well, the part of going through a PhD program is to write your dissertation. And that can be a really challenging thing is because you have to digest the whole entire field to carve out this little sometimes tiny area that you can have a novel contribution. And AI has got to make that also a lot easier and cleaner and more reliable to find those locations. So, yeah, it's, I don't know. We'll continue to repeat the same theme, but it's just been a wild year. And I imagine next year is only going to be crazier. It's hard for us not to talk about it since it's injected itself into so much of our workflows over the last couple of years. Why do you not discuss that? I mean, I've seen it injected into people's lives outside of work. Like, it's just like a thing, you know, like it's like part of it's part of the conversation. So it's inevitable that we'll end up. talking about it at least a little bit. Yeah. Well, yeah. Growing up, I'm, I was from that era where, uh, you know, one of the reasons I was told that I had to learn math was because I would, you're not always going to have a calculator in your pocket. And I'm pretty sure you'll always go, you're always going to have an LLM in your pocket at this point. So, yeah. Or embedded within your body somewhere. I don't know how it's going to unfold, but, uh, yeah. Let's see. I don't know. kids that are growing up. That's a whole other podcast, I think, to talk about that. Well, we're at an hour. Chris, I think this is a great place to wrap up the episode. There's always more we could talk about, but that's a good indication that you'll have to come back at some point. I guess final thoughts. I'll just give you the last words here and then we'll call it a episode. Final thoughts is going to be all right. How about that? It's all going to be all right. Until then, stay curious and keep exploring.