Back to blog
Threat Intel
Phishing Forensics

Anatomy of a Proxy IP: Unmasking VPNs, Proxies, and Tor

IP reputation systems require more than static blacklists to actively hunt and classify anonymizing infrastructure.

MailSleuth Research
Email Security Team
August 31, 20267 min read
An abstract illustration of a digital mask revealing server infrastructure.

You are staring at an Authentication-Results header that reads dkim=pass and spf=pass. The sending domain is aged, the DMARC alignment is pristine, and the message sailed right past the secure email gateway. The payload is a sophisticated credential harvester, and you need to understand how the attacker bypassed your perimeter.

The answer usually lies buried in the transit headers. You walk up the chain of Received fields to find the origin. The edge mail transfer agent accepted the handoff from an IP block registered to a residential internet service provider in Kansas. Yet, the geolocation of the actual user who authenticated to that sending server traces back to a commercial datacenter in Amsterdam. You are looking at a routed attack.

Threat actors know how to buy clean infrastructure. To figure out how to detect vpn ip addresses, open proxies, and Tor exit nodes reliably, you have to understand how modern reputation engines actually operate. They do not just download static text files. They actively probe, fingerprint, and map the internet to strip away the layers of anonymization before an attack ever hits your inbox.

The Death of the Static Blocklist

For a decade, the security industry relied on static lists of bad actors. Real time blackhole lists functioned like bouncers reading from a clipboard. If an IP address engaged in spam campaigns, a researcher added it to a DNS based blocklist, and mail servers around the world would drop connections from that host at the edge.

Active Probing Replaces Passive Collection

The static model collapsed under the weight of cloud computing and IPv4 exhaustion. A compromised consumer router acting as a proxy might be active for exactly forty eight hours before the broadband provider issues a new dynamic lease. If your threat intelligence feed updates weekly, you are blocking legitimate residential users while missing the active threats entirely.

Modern reputation systems split their architecture into passive telemetry and active probing. Passive ingestion involves aggregating connection logs, firewall drops, and email transit headers from millions of global sensors. Active probing takes the opposite approach. When a new IP address surfaces in a telemetry feed, the reputation engine immediately turns around and interrogates the host to determine its true function.

Interrogating the Host via Port Scanning

If you want to know if an IP address is hosting an anonymizing proxy, the most direct method is to simply ask it. Active scanning engines continuously cycle through the routable internet space, knocking on network ports strictly associated with tunneling protocols.

Scanners look for HTTP proxies lingering on ports 8080 and 3128. They hunt for exposed Squid cache instances, and they send connection requests to port 1080 to identify SOCKS4 and SOCKS5 endpoints. But simply finding an open port is insufficient. A firewall might drop the packet silently, or a tarpit might hold the TCP connection open indefinitely to exhaust the memory of the scanning engine.

Protocol Fingerprinting and Banner Grabbing

True identification requires protocol fingerprinting. When a scanner finds an open port, it initiates a handshake. For a SOCKS5 proxy, the scanner sends the initial version identifier and authentication method selection packet defined exactly as specified in RFC 1928.

Client sends: X'05' X'01' X'00' (Version 5, 1 Method, No Authentication Required) — RFC 1928 SOCKS5 Initial Handshake

If the host responds with the corresponding server choice packet confirming unauthenticated access, the scanner definitively tags the IP as an open proxy. Advanced engines go further by sending malformed packets or unexpected TLS handshakes. They analyze how the remote TCP stack handles the error state. Commercial VPNs often leak subtle timing variations or packet size signatures that expose their presence even when the host attempts to mask its service banners.

Mapping Tor and Commercial Datacenters

Not all anonymization requires aggressive network interrogation. Some networks openly declare their infrastructure, while others are betrayed by the companies that lease them hardware. The Tor project is the classic example of transparent routing infrastructure that requires immense precision to track accurately.

The Tor directory authorities maintain a public consensus of all active relay and exit nodes. Ingesting this data is trivial, but keeping state is the actual engineering challenge. An IP address might operate as a Tor exit node at breakfast, drop out of the consensus mid morning, and be reassigned to a legitimate shared hosting client by the afternoon. Reputation systems must parse the Tor consensus with minute by minute precision to avoid catastrophic false positives.

Parsing Autonomous System Numbers

Commercial VPN providers require massive amounts of bandwidth. They routinely purchase large contiguous blocks of IP space from datacenter providers like DigitalOcean, Linode, and various offshore bulletproof hosts. Reputation engines parse Border Gateway Protocol routing tables and ASN registrations to map these exact allocations.

When a connection originates from an IP address that falls within an ASN historically dedicated to commercial VPNs, the system elevates the risk score automatically. Commercial databases package this ASN adjacency data, allowing security teams to instantly categorize a host as a datacenter IP rather than a residential user. If a purported corporate executive is checking email from a datacenter IP in Panama, the security operations center has a high fidelity anomaly to investigate.

The Behavioral Tells of Impossible Travel

Infrastructure scans and ASN mappings routinely fail against the most dangerous anonymization layer of all. Residential proxy networks completely bypass static datacenter checks. Attackers pay initial access brokers for access to millions of infected IoT devices and consumer routers. When an attacker routes malicious traffic through a compromised smart television in Ohio, the IP address looks perfectly legitimate to a standard firewall.

Volume, Velocity, and Context

This is where behavioral telemetry becomes the ultimate arbiter of truth. A standard home network has a predictable traffic baseline. It should not be originating outbound SMTP traffic for three dozen distinct corporate domains in a five minute window. When a reputation engine observes massive velocity originating from a single consumer IP, it overrides the clean ASN status and flags the host as a likely residential proxy.

Contextual behavioral signals are equally powerful for threat hunting. Identity access management logs provide incredible telemetry for proxy detection. If an IP address successfully authenticates to a corporate single sign on portal using credentials tied to an employee in London, and two hours later the exact same IP address is used to access cloud infrastructure by a different user in Tokyo, the system triggers an impossible travel alert.

{"eventSource": "signin.amazonaws.com", "eventName": "ConsoleLogin", "sourceIPAddress": "198.51.100.42", "userIdentity": {"arn": "arn:aws:iam::123456789012:user/tokyo-admin"}} — AWS CloudTrail Event Log Excerpt

The IP address itself might be clean across every external blacklist, but the behavioral physics of the connections prove it is functioning as a centralized proxy for disparate threat actors operating across different timezones.

Signal Convergence and Collisions

Aggressive IP classification carries a severe risk of collateral damage. If a detection engineer writes a blocking rule based on a single weak signal, they will inevitably sever legitimate business communications and cause self inflicted denial of service conditions.

The Threat of Carrier Grade NAT

Consider the reality of Carrier Grade NAT in modern telecommunications infrastructure. To combat IPv4 exhaustion, mobile carriers route thousands of distinct mobile devices through a handful of public facing IP addresses using shared address space defined in RFC 6598. This aggregation creates massive headaches for security analysts.

If one infected Android phone on a mobile carrier network starts spamming malicious calendar invites, a naive reputation system will penalize the shared gateway IP. Suddenly, thousands of legitimate corporate users on that same mobile tower are blocked from accessing internal resources or delivering legitimate mail.

To mitigate these routing collisions, mature systems mandate a convergence of signals before issuing a block verdict. An isolated spike in authentication failures is an anomaly. But an open SOCKS5 port combined with an ASN linked to bulletproof hosting and a sudden surge in failed logins across multiple tenants creates a definitive, high confidence verdict that the infrastructure is actively weaponized.

The takeaway

Investigating suspicious network infrastructure is rarely as straightforward as querying an address against a static database. The threat actors rotating their campaigns through residential proxy networks and commercial VPNs are banking entirely on your security tooling being passive and slow to update. Breaking their operational security requires active visibility into the network fingerprints and behavioral anomalies that expose their hidden infrastructure layers.

You have to correlate the underlying routing data with the application layer context. When you drop a suspicious header or IP into MailSleuth.AI, you are not just getting a generic pass or fail verdict based on yesterday's intelligence. You are seeing the aggregated, real time result of port scans, ASN mapping, and behavioral telemetry that rips the mask off the underlying infrastructure and gives you the exact context you need to contain the breach.

#ip-reputation#threat-hunting#email-forensics#anonymization#soc-analyst
MailSleuth Research
Email Security Team

We dissect phishing campaigns and email infrastructure so you don't have to.