Detections · What MacVigil reads to decide
Listening for connections: open ports and local servers on a Mac
Most programs connect out. A few wait for others to connect in: a local server, a helper that talks to its own app, a development tool. A backdoor can do the same, opening a door on your Mac that someone else can knock on.
Updated November 25, 2026 · 6 detections in this category
In short
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.
MacVigil has 6 detections in this category. It reads the file to find them and never runs it.
What it is
A listening program creates a socket, binds it to a port or a local address, and accepts the connections that arrive. Code editors, databases, file sharing, media servers and apps that talk to their own helpers all do this.
For an attacker, a listener is a way in. A bind shell waits on a port for its operator to connect and hands them a command line. A local server that asks for no password, or that answers requests from any website, can be driven by another program on the Mac or by a malicious web page open in the browser. Unlike a program that calls out, a listener does not need to know where its operator is: it waits.
How Mac malware does it
- A program that creates a socket, binds it and accepts connections in the same function, the shape of a server written into an implant
- A command handler placed behind that listener, so whoever connects can run commands with the user’s rights
- A local web server configured to accept requests without any authentication
- A permissive web origin, so any page open in the browser can send requests to the local server
- A script that calls
listenandacceptitself, instead of a compiled program - A Tor configuration that publishes a local port as a hidden service, reachable from outside without an open port on the router
What MacVigil looks for
MacVigil reads the file and never runs it. In compiled programs it looks for one function that listens for or accepts connections on a socket it creates or binds itself, which is what a server shows in its own code, and it records the imports that make listening possible. In scripts and configuration text it notes words for listeners, settings that turn authentication off and origins open to every website.
All of these are recorded for information. A listener is ordinary, and a word in a configuration file establishes no execution or use on its own, so none of these findings makes a file dangerous by itself. They give context to other findings in the same file, such as a remote control channel.
When it is normal
Many legitimate apps listen: development servers, databases, sync and file-sharing tools, media servers, remote desktop apps you installed on purpose, and apps whose window talks to a background helper through a local port. Web frameworks also often allow every origin while you build and test. A listener becomes a concern when you did not expect the program to accept connections at all, or when it accepts them from anywhere without asking who is connecting.
How to check your Mac
- In Terminal,
lsof -i -P | grep LISTENlists the programs waiting for connections and the port each one uses. - In Activity Monitor, select a process, click the Inspect button, then open the Open Files and Ports tab to see its sockets.
- Turn on the firewall in System Settings > Network > Firewall; under Options, choose which apps may receive incoming connections and remove those you do not recognize.
- In System Settings > General > Sharing, turn off services you do not use, such as Remote Login, Screen Sharing or File Sharing.
- If an unknown program is listening, look up where it lives with Activity Monitor’s Inspect window before you delete anything.
Related categories
- Remote control: What lets someone drive this Mac from a distance: a channel that receives commands, and the means to run them.
- Network access: The addresses, domains and networking functions found in the file. Most software has 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.
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