Detections · What MacVigil reads to decide
Running other programs: how Mac malware launches commands and scripts
Almost every Mac app starts another program at some point: a helper, an updater, a command-line tool. Malware does the same, but what it starts is often the real payload: a downloaded file, a shell line that collects data, or an AppleScript that asks for your password.
Updated November 25, 2026 · 87 detections in this category
In short
The commands and other programs this file can start. Most software has some.
MacVigil has 87 detections in this category. It reads the file to find them and never runs it.
What it is
On macOS a program can hand a line of text to the shell, as if you had typed it in Terminal, or launch another program directly through system functions or the NSTask class. It can also ask osascript to run AppleScript or JavaScript for Automation, which can display windows and control other apps. For an attacker this is the cheapest way to act: one short command can fetch a file, make it executable and start it.
Documents and settings can do it too: an Office macro, a PDF launch action, or a configuration file for Terminal, git or an AI coding assistant can name a command that runs on its own.
How Mac malware does it
- A shell command written into the program, such as a download piped to a shell, passed to
system,popenor a Go or Rust process call - Inline AppleScript or JavaScript run through
osascript -eorosascript -l JavaScript, often to show a fake password window or drive other apps - A file dropped in a temporary folder, given execute permission with
chmod +x, then started - Code that runs as soon as a library loads, before
main, and immediately launches a program or starts background network activity - A program started through launchd, so it outlives its launcher and does not appear under it in the process list
- Commands hidden from a reader: text decoded twice, keywords written backwards, names rebuilt from character codes or assembled from quoted pieces
- Office macros, PDF launch actions and Terminal profiles whose command runs when the document or the window opens
- Settings that make a tool run a command for you: a git alias starting with
!, an MCP server entry, an AI agent launched without permission checks - Serialized data that would call a command as soon as a program loads it
What MacVigil looks for
MacVigil reads the file and never runs it. Where it can, it reads the command at the call that runs it: the shell line a compiled program passes to system or popen, the command a Go or Rust function hands to a shell, the command an Office macro or a PDF action declares. When part of a command is only decided at run time, the report says so instead of guessing.
Being able to launch a program is not, on its own, a sign of malware, so the imports that allow it are recorded for information. What raises the rating is the shape around the call: a launch from code that runs at load time, a command handed to a shell from a macro that runs when the document opens, or a single Rust function that connects to a remote address, writes a path and launches that same path. Even then, the report states what the file shows and what it does not, such as whether the bytes received are the ones that run.
When it is normal
Most software launches other programs. Installers run their scripts, updaters start the new version, code editors and terminal apps start shells, developer tools call compilers and archive extractors, and browser extensions talk to a companion app through native messaging. Git aliases, notebooks with shell cells and deployment scripts are ordinary too. What matters is which command runs, where it came from and what it does next, not that a program can start one.
How to check your Mac
- Open Activity Monitor, choose View > All Processes, Hierarchically, and look for shells or
osascriptrunning under an app that has no reason to start them. - Review System Settings > General > Login Items & Extensions (Login Items on older macOS) for items that start programs you do not recognize.
- In Terminal,
ls -la /tmplists the temporary folder; an executable file there that you did not create deserves a closer look. - Read the commands that run when you open Terminal or use git:
cat ~/.zshrcandgit config --global --listshow them. - Never paste a command from a web page, a chat or a video into Terminal unless you understand every part of it.
Related categories
- Download and execute: Code fetched from the network and run here: what executes is decided by a server, not by the file that was checked.
- Hidden payload: A second program carried out of sight: encoded, encrypted, appended after the file's end or tucked into resources.
- Terminal emulation: A terminal of its own: pseudo-terminals, a program's input and output rewired, a named shell. Terminal apps and code editors have one.
- Runtime code loading: Code the program loads or makes while it runs: libraries opened by name, functions looked up with dlsym, memory made executable, program images built from a buffer. Browsers, plug-in hosts and JIT engines all do this.
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.
Free for 7 days, then $29.95 a year for 2 Macs, a launch price: the regular price will be $59 a year. Requires macOS 15 Sequoia or later on a Mac with Apple silicon.
More: all detection categories · what MacVigil detects · the blog