Detections · Harmful behavior
Mac backdoors and reverse shells: remote control by malware
Remote control is what turns malware into a tool someone can steer: a channel that receives orders and the means to carry them out on your Mac. Once it is in place, the attacker can run commands, steal files or install more software whenever they choose, long after the first infection.
Updated November 25, 2026 · 137 detections in this category
In short
What lets someone drive this Mac from a distance: a channel that receives commands, and the means to run them.
MacVigil has 137 detections in this category. It reads the file to find them and never runs it.
What remote control means
Every backdoor has two halves. One half listens: it connects out to a server, waits on a port, polls a web page or reads messages from a public service. The other half acts: it passes what it receives to a shell, an interpreter or a program launcher. When the two are joined, whoever sits at the other end of the connection can do what you can do on your account.
How Mac malware does it
- A reverse shell: the program connects out and plugs that connection into the input and output of
/bin/shorzsh, sometimes through a pseudo-terminal so the attacker gets a full interactive session. - Shell one-liners built on
/dev/tcp, netcat or a named pipe, sometimes split into text fragments that only form the command once assembled. - A command loop: the program checks in with a server, often at irregular intervals with a machine identifier, runs the order it gets back and sends the result.
- Downloaded text handed straight to an interpreter: an HTTP response passed to Python
exec, a fetched body given tochild_processin JavaScript, or a launch agent whose command pipescurlinto a shell, then waits and repeats. - Received bytes written to a file, made executable and launched.
- Orders hidden in unusual places: DNS answers, a messaging bot, a public profile page that holds the server address so it can change without updating the program.
- SSH access opened for the attacker: a key appended to
~/.ssh/authorized_keys, Remote Login switched on with the firewall and logging turned off, or ansshdconfiguration that allows root and empty passwords. - Full desktop control: incoming messages that drive screen capture, simulated clicks and typing, or script other applications.
What MacVigil looks for
MacVigil reads the file without running it, and follows data rather than words. The strongest findings come from tracing bytes received from the network to the place where they become a command: the same function that receives and launches, a socket duplicated onto a shell’s input and output, a response stored in a variable and then passed to sh -c, a value carried from one function to another or through a global variable until it reaches a launch.
Separate ingredients count for much less. A mention of /dev/tcp, a network call and a way to run programs sitting in the same file are clues, and when they are only separate mentions MacVigil says so and does not claim they are linked or that any of them ran. Several of the strongest combinations also require that no accountable publisher stands behind the program.
When it is normal
Remote administration and support tools, screen sharing apps, SSH clients and servers, and automated test systems legitimately receive instructions and run commands. Some even install a background service that does exactly this. The difference lies in who signed the program, whether it says what it is, and whether the channel is hidden or tied to something like credential collection.
How to check your Mac
- Open System Settings > General > Sharing and turn off Remote Login, Screen Sharing and Remote Management unless you use them.
- Look at
~/.ssh/authorized_keysin a text editor. Every line is a key allowed to log in to your account; remove any you did not add. - Open System Settings > Network > Firewall and check that it is on.
- In Activity Monitor, look for unknown processes, then run
lsof -i -Pin Terminal to see which programs hold network connections. - Check the background items in System Settings > General > Login Items, since most backdoors also persist.
Related categories
- Persistence: How a program arranges to start again on its own: launch agents and daemons, login items, scheduled jobs.
- 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.
- Listening for connections: What lets other programs connect to this one: a listening socket, a local server, a WebSocket or local address. Development tools and apps that talk to their own helpers have some.
- 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.
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