Detections · Harmful behavior

Hidden payloads in Mac malware: the second program you cannot see

Many Mac threats arrive as a harmless-looking first stage that carries the real program out of sight. The payload is encoded, encrypted, appended after the end of an image or tucked into a resource, and it only takes shape when the first stage runs.

Updated November 25, 2026 · 76 detections in this category

In short

A second program carried out of sight: encoded, encrypted, appended after the file's end or tucked into resources.

MacVigil has 76 detections in this category. It reads the file to find them and never runs it.

What a hidden payload is

A hidden payload is a second program carried inside the first one in a form you cannot read: Base64 text, encrypted bytes, data after an image’s declared end, or an extended attribute the Finder never shows. The first stage decodes it, writes it somewhere or loads it straight into memory, and runs it.

For the attacker, this keeps the real behavior away from a casual look and from simple scanners that only search plain text. It also lets the same wrapper deliver different payloads over time.

How Mac malware does it

What MacVigil looks for

MacVigil reads the file and never runs it, and it decodes what it can. It reverses Base64, hexadecimal, Base32, byte escapes and reversed text, decrypts embedded resources when the key is in the same file, and even steps through a program’s own string decoder on a private copy of its bytes. The decoded text is then analyzed like the rest.

Its strongest findings tie the steps together: one function that writes an executable image carried in the file to a temporary file, makes it executable and launches it; a buffer decoded from the program’s data handed as script source to the Open Scripting Architecture; or encrypted strings whose decoded form names several sensitive targets. Many of these weigh more when no accountable publisher stands behind the file.

A lone base64 -d or openssl enc is only a moderate mention, and combinations of separate mentions are reported with the caveat that nothing shows they are linked or ran.

When it is normal

Installers and self-extracting archives legitimately carry compressed data, apps encrypt resources to protect licensed content, and an image that hides text after its end can also be a tracking pixel. What raises concern is decoding followed by execution, especially in a file with no identifiable publisher.

How to check a file

On the blog

Know what a file does before you open it

MacVigil reads any app, disk image, installer or script without running it, and shows the evidence behind every finding. Nothing leaves your Mac.

Download free for Mac

More: all detection categories · what MacVigil detects · the blog