# Researcher revives macOS reflective code loading

Published: 2024-12-16 · Severity: medium · Sectors: technology
Canonical: https://vorant.io/reports/68e3468c-4de2-51e4-baef-c5b6cfdf58a5/researcher-revives-macos-reflective-code-loading

> A security researcher demonstrated a technique compiling Apple's own dyld loader code to restore in-memory reflective code loading on macOS 15, after Apple's APIs began forcing payloads to disk.

This Objective-See research post, based on an OBTS v7.0 talk, examines reflective code loading (MITRE ATT&CK T1620) on macOS — a technique historically used by malware to execute compiled binaries directly from memory, avoiding disk-based detection. The author traces the technique's history from Apple's 2005 MemoryBasedBundle sample project through its use in real-world malware including Lazarus Group's AppleJeus (which copied open-source osx_runbin code from a 2017 Cylance post), EvilQuest, and the Windows-based Gauss malware with its still-unbroken environmentally-encrypted payloads.

The post explains that Apple silently modified dyld3's NSLinkModule API so that in-memory payloads are now always written to a predictable temp-file path before execution, effectively neutering the classic reflective loading APIs that malware authors had relied upon for nearly two decades — a change many malware developers appear not to have noticed. The researcher then demonstrates a novel bypass: extracting and compiling the core loader logic directly from Apple's open-source dyld into a custom function (custom_dlopen_from_memory), fully restoring true memory-only execution on macOS 15 without generating file-system artifacts. The author also covers hardened runtime and code-signing obstacles and how specific entitlements can be used to preserve unsigned in-memory execution while still allowing notarization.

An open-source proof-of-concept (ReflectiveLoader) was released on GitHub, providing a working custom loader library and example payload. The article is intended as offensive/defensive security research; the author notes a follow-up post will address detection strategies for this stealthy capability, which currently has few effective countermeasures given macOS's restrictions on remote memory scanning.

## Mentioned in this report

- Threat actors: Lazarus Group
- Malware: AppleJeus, EvilQuest, Gauss

Source reporting: https://objective-see.org/blog/blog_0x7C.html

---

This is the free public brief from Vorant Threat Intelligence. When citing, attribute "Vorant" and link https://vorant.io/reports/68e3468c-4de2-51e4-baef-c5b6cfdf58a5/researcher-revives-macos-reflective-code-loading.
Full IOC sets, deployable detections, the entity graph, TAXII 2.1 feed and real-time alerts: https://vorant.io/signup
