
DEF CON 33 - Reversing approaches to extract embedded scripts in macOS malware - Patrick Wardle
Source: YouTube · DEFCONConference · published Oct 10, 2025 · 21:23
[BLUF: The main goal is to identify and extract malicious scripts hidden within Mac OS binaries—commonly created using tools like Platypus, PI Installer, Electron, Tori, and Apple Script—by avoiding time-consuming reverse engineering and instead analyzing human-readable scripts that contain the actual malware logic.]2:00
Key Takeaways:
• Script-based binaries are often created using tools like Platypus or PI Installer to hide malicious scripts; identify them via hardcoded script names or embedded strings in the resource directory 8:22.
• For PI Installer, extract the Python script using a dedicated tool and decompile the bytecode to recover readable source code 10:33.
• Electron apps can be identified by Electron framework dependencies; use npx asar to extract embedded JavaScript, which is easier to analyze than compiled binaries 12:24.
• Tori apps embed scripts in the main binary using a custom compression algorithm; use a Python decompiler to extract and analyze JavaScript payloads 15:09.
• Apple Script binaries have a .scpt file in the resource directory; use specialized decompilers to reconstruct readable Apple Script code 17:59.
[Conclusion: Malware analysts should avoid reverse engineering the binary components of script-based apps and instead focus on extracting and analyzing the embedded scripts—simple, human-readable, and containing the real malicious logic—making analysis faster and more effective.]
Sources:
Generate CPE Credits
Generate a professional CPE document from this video's transcript.
Estimated credit: 0.5 CPE hours
Estimate uses the video runtime (1 hour ≈ 1 CPE, rounded to the nearest 0.5, minimum 0.5, maximum 2.0). The final amount can be lower after review, never higher.
Topic: Cybersecurity. Commonly maps to: Security and Risk Management, Security Operations. Exact CISSP domains are assigned during generation.
Free account. One generation at a time, with a daily limit.
CPEBuddy is independent and not affiliated with or endorsed by ISC2, ISACA, or any certification body. Exports are formatted for common CPE submissions; acceptance is at your certification body's discretion.
Transcript Preview
First 800 characters of the transcript
We have a great speaker uh this morning uh Patrick Portal is going to talk to us about Mac malware. >> Good morning. Aloha and welcome to my talk. Thank you for being here especially so early. Really appreciate it. Wow. Okay, we might have to try that again at the end. Uh but yeah, super stoked you're here. Today we're going to be talking about how to identify what I refer to as script wrapped binaries and then how to extract their embedded malicious payloads. My name is Patrick Wle. I am the founder of the Objective C Foundation. More recently also the co-founder of W where we're building core Mac OS detection components to integrate into larger security tools. I'm also the author of the art of MacMau book series that's relevant today because what we're talking about the specific topic is…