Skip to main content
Protect My Mac — FreeNo credit card required
Deep Dives8 min read

How to Find Suspicious Network Connections on Your Mac

Hassanain

Your Mac is constantly talking to the internet, even when you think it's just sitting there doing nothing. Some of these conversations are perfectly normal — iCloud syncing, software updates, telemetry data. Others might be signs of malware, adware, or worse.

The tricky part isn't finding the network connections. macOS gives you several built-in tools for that. The real challenge is figuring out which Mac network connections suspicious behavior actually represents and which ones are just Apple being Apple.

I've spent way too much time staring at network logs while building CoreLock's behavioral analysis engine, and honestly, it's made me paranoid about every outbound connection. But it's also taught me how to spot the patterns that actually matter.

Understanding Your Mac's Network Chatter

Before you start hunting for suspicious connections, you need to understand what normal looks like. Your Mac maintains dozens of active connections at any given time, even when you're not actively browsing the web.

Apple services alone account for most of this traffic. iCloud sync hits multiple endpoints. App Store checks for updates. Spotlight sends search queries to Apple's servers. Safari's phishing protection validates URLs against Google's Safe Browsing database. The System Settings app phones home for various configuration updates.

Then there are third-party apps. Slack, Zoom, Chrome, Firefox — they all maintain persistent connections. Some are obvious, like your browser loading web pages. Others are less visible, like background sync processes or analytics collection.

The key is learning to distinguish between expected behavior and anomalies that warrant investigation.

Using netstat to See Active Connections

The netstat command is your first line of defense for examining network connections. It's been around forever, works on every Unix-like system, and gives you a raw view of what's happening.

netstat -an | grep ESTABLISHED

This shows all established TCP connections. You'll see output that looks like this:

tcp4       0      0  192.168.1.100.50123    17.57.145.40.443       ESTABLISHED
tcp4       0      0  192.168.1.100.50122    52.97.185.48.443       ESTABLISHED
tcp4       0      0  192.168.1.100.50121    23.45.67.89.443        ESTABLISHED

Each line shows your local IP and port, the remote IP and port, and the connection state. The format is local_ip.local_port remote_ip.remote_port state.

Port 443 connections are HTTPS traffic, which is normal. Port 80 is HTTP. Port 22 is SSH. Port 25 is SMTP email. If you see connections to weird ports like 1337, 4444, or 6666, that's worth investigating.

To get more detail about what process is behind each connection:

netstat -anv | grep ESTABLISHED

The -v flag adds process information, though it's not always reliable. For better process visibility, you'll want lsof.

Getting Process Details with lsof

The lsof (list open files) command is more powerful for network analysis because it shows you exactly which process owns each connection:

lsof -i -n

This lists all network connections with numeric IP addresses (the -n flag prevents DNS lookups, which makes it faster). You'll see output like:

COMMAND     PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Safari    12345   user   42u  IPv4 0x1234567890      0t0  TCP 192.168.1.100:50123->17.57.145.40:443 (ESTABLISHED)
Slack     23456   user   18u  IPv4 0x9876543210      0t0  TCP 192.168.1.100:50124->52.97.185.48:443 (ESTABLISHED)

Now you can see that Safari is connecting to 17.57.145.40 and Slack is connecting to 52.97.185.48. This is way more useful than just seeing IP addresses.

To focus on just TCP connections:

lsof -iTCP -sTCP:ESTABLISHED -n

Or to see what's listening for incoming connections:

lsof -iTCP -sTCP:LISTEN -n

Listening processes are particularly interesting from a security perspective. Your Mac shouldn't be running random servers unless you explicitly installed something.

Monitoring Real-Time Traffic with nettop

While netstat and lsof give you snapshots, nettop shows real-time network activity:

nettop -n

This opens an Activity Monitor-style interface for network traffic. You can see which processes are actively sending and receiving data, along with bandwidth usage.

Press d to toggle delta mode, which shows changes since the last update. Press c to cycle through different data displays. It's particularly useful for catching intermittent connections that might not show up in a static netstat output.

One thing I've learned from building security software is that malware often communicates in bursts rather than maintaining persistent connections. Tools like nettop help you catch these patterns.

Decoding Common Apple Network Connections

Apple's services generate a lot of legitimate network traffic that can look suspicious if you don't know what you're looking for. Here are the most common patterns:

iCloud Traffic: You'll see connections to various *.icloud.com and *.apple.com endpoints. These handle everything from document sync to photo uploads. The specific subdomains change frequently as Apple load-balances traffic.

App Store Updates: Connections to osxapps.itunes.apple.com and related domains handle app downloads and updates. You might also see mesu.apple.com for macOS system updates.

Certificate Validation: macOS constantly validates certificates through OCSP (Online Certificate Status Protocol). You'll see connections to ocsp.apple.com and various certificate authority endpoints like ocsp.digicert.com.

Phishing Protection: Safari and Mail connect to Google's Safe Browsing API to check URLs against known phishing sites. These show up as connections to safebrowsing.googleapis.com.

Siri and Spotlight: If you use Siri or Spotlight's web suggestions, you'll see traffic to api.smoot.apple.com and related endpoints.

Telemetry and Analytics: Apple collects anonymous usage data through connections to metrics.icloud.com and xp.apple.com. You can disable this in System Settings > Privacy & Security > Analytics & Improvements.

The challenge is that legitimate Apple traffic and malware can look similar at first glance. Both might connect to random IP addresses on port 443. The difference is usually in the patterns — Apple's traffic tends to be more predictable and follows normal usage patterns.

Using Wireless Diagnostics for Advanced Analysis

macOS includes a hidden tool called Wireless Diagnostics that's incredibly useful for network analysis. To access it, hold Option and click the Wi-Fi icon in your menu bar, then select "Open Wireless Diagnostics."

The main interface is for Wi-Fi troubleshooting, but the real treasure is in the Window menu. Go to Window > Utilities to access several powerful network monitoring tools:

Wi-Fi Scanner shows all nearby wireless networks with detailed information about signal strength, channels, and security settings. This helps you spot rogue access points or evil twin attacks.

Network Quality runs throughput and latency tests to help identify network performance issues that might indicate problems.

Logs provides detailed system logs related to network activity. You can filter by process and see much more detail than Console.app typically shows.

Most people don't know these tools exist, but they're genuinely useful for security analysis. I honestly wish Apple made them more discoverable.

Third-Party Network Monitoring Tools

While built-in tools are powerful, sometimes you need more sophisticated monitoring. Two tools dominate the Mac network security landscape:

Little Snitch is the gold standard for outbound connection monitoring. It alerts you whenever an app tries to make a new network connection and lets you create rules to allow or deny specific traffic. The UI is excellent, and the rule system is incredibly granular.

Lulu is a free, open-source alternative that focuses specifically on blocking unauthorized outbound connections. It's less feature-rich than Little Snitch but covers the essential functionality without cost.

Both tools use kernel extensions (or system extensions on newer macOS versions) to intercept network traffic at a low level. This gives them visibility that command-line tools can't match.

The downside of these tools is that they can generate a lot of alerts, especially when you first install them. Every app on your system will trigger notifications as it tries to connect to the internet. It takes some patience to configure them properly.

Red Flags to Watch For

After analyzing thousands of network connections while developing security software, certain patterns consistently indicate problems:

Connections to suspicious ports: While malware increasingly uses standard ports like 443 to blend in, connections to obviously sketchy ports (1337, 4444, 8080 for non-development purposes) are worth investigating.

Unexpected listening services: Your Mac shouldn't be running servers unless you installed something specific. Use lsof -iTCP -sTCP:LISTEN to check what's listening for incoming connections.

High-frequency connections from system processes: If you see launchd, kernel_task, or other system processes making lots of outbound connections, that could indicate compromise.

Geographic anomalies: Connections to countries you don't normally interact with might indicate malware command and control servers. Tools like whois can help identify the location of suspicious IP addresses.

Traffic during idle periods: If you see substantial network activity when your Mac should be idle, investigate which processes are responsible.

What About False Positives?

Here's the thing though — network monitoring generates tons of false positives. Modern software is incredibly chatty, and distinguishing between legitimate analytics collection and actual malware can be challenging.

For example, Adobe Creative Cloud apps maintain persistent connections to Adobe's servers for license validation and update checks. Google Chrome phones home constantly for various services. Even text editors like Sublime Text check for updates and send anonymous usage statistics.

The key is understanding your own usage patterns. If you see Photoshop connecting to Adobe's servers, that's normal. If you see Calculator connecting to a server in Eastern Europe, that's worth investigating.

This is actually one of the things we built CoreLock's behavioral analysis to handle — it learns what's normal for your specific system and alerts you to genuine anomalies rather than every single network connection.

Investigating Suspicious Connections

When you find a connection that looks suspicious, here's how to investigate further:

First, identify the IP address and use whois to get registration information:

whois 23.45.67.89

This tells you who owns the IP range and where it's located geographically.

Next, check the process making the connection. If it's a system process or legitimate app, the connection might be normal. If it's something you don't recognize, investigate the binary:

ls -la /path/to/suspicious/binary
codesign -d -vv /path/to/suspicious/binary

The codesign command shows you the binary's signature information. Legitimate apps should have valid signatures from known developers.

You can also check the binary's reputation using online tools like VirusTotal, though be aware that this sends file hashes to a third-party service.

When to Take Action

Not every suspicious network connection requires immediate action. Sometimes it's legitimate software behaving in unexpected ways. Sometimes it's adware that's annoying but not dangerous. Sometimes it's actual malware that needs immediate attention.

My general rule: investigate everything, but prioritize based on the severity of what you find. Unknown processes connecting to foreign servers get immediate attention. Adobe Creative Cloud chattering with Adobe's CDN can wait.

If you do find malware, don't just kill the process — it'll probably restart. Look for persistence mechanisms like LaunchAgents and remove those too. Better yet, use tools that can handle the cleanup automatically.

To be fair, this level of network monitoring is probably overkill for most people. If you're not handling sensitive data or working in a high-risk environment, the built-in macOS security features are likely sufficient. But if you're curious about what your Mac is really doing, or if you need to maintain strict control over network access, these techniques are invaluable.

The more I dig into macOS internals, the more I appreciate how much Apple gets right at the system level. SIP, Gatekeeper, XProtect — these are genuinely impressive engineering achievements. But network monitoring isn't one of them. Apple gives you the tools, but you have to know how to use them.

Understanding your Mac's network connections isn't just about security — it's about understanding your computer. Every connection tells a story about how your software works, what data it's collecting, and who it's talking to. Once you start paying attention to these conversations, you'll never look at your Mac the same way again.

Ready to try CoreLock?

Free to download. No credit card required.

Download CoreLock Free