Red Teaming macOS Environments with Hermes the Swift Messenger
summary
A Swift 5 implant called Hermes targets macOS via the Mythic C2, implements an RSA-encrypted key exchange to negotiate per-implant AES session keys (forward secrecy), and runs multi-threaded jobs with job-kill control. Features include in-memory JXA execution, 512KB-chunk file upload/download, screenshot and clipboard capture (TCC-dependent), plist and TCC enumeration, and process/file ops. Builds compile on Linux using Darling inside privileged Docker (payloads built in ~1 minute after preinstall). Detection examples use Apple ESF tools like Crescendo to flag process exec, file-create in LaunchAgents, and notify open events.
AI-written summary · about
chapters (27)
- 0:00Introduction to talk
- 1:03Speaker introduction
- 1:44Swift programming language overview
- 4:56Post-exploitation language comparison
- 8:51Why use Swift for post-exploitation
- 9:32Swift tooling examples
- 9:53Mythic framework introduction
- 13:26Existing Mythic macOS payloads
- 14:49Introducing Hermes payload
- 16:11Cross-compiling Swift for macOS
- 19:41Darling for Swift compilation
- 20:02Hermes encrypted key exchange
- 21:48Hermes command execution
- 24:18File system interaction
- 25:43Mythic file browser demo
- 26:24Process execution methods
- 27:45JXA execution in memory
- 29:09Process enumeration
- 31:14Screenshot and clipboard monitoring
- 33:01Situational awareness checks
- 35:27P-list file enumeration
- 36:52Apple Endpoint Security Framework
- 37:55Detecting shell commands
- 38:38Detecting launch agents
- 40:03Detecting FDA checks
- 41:04Installing Hermes
- 41:47Q&A session
