Is Your Network a Residential Proxy Exit? How to Check
Residential proxy services sold exits on the White House network this fall. Layer3 Intel's probes left through AS2650, the Executive Office of the President's network, 236 times between October 5 and November 3, 2026, fr
Residential proxy services sold exits on the White House network this fall. Layer3 Intel's probes left through AS2650, the Executive Office of the President's network, 236 times between October 5 and November 3, 2026, from six addresses, through 28 different proxy services. Anyone with a few dollars could do the same.
The State Department asked Layer3 for its logs the morning after the post went up, The Register reported. It wasn't a one-off: a study found 975 exit addresses tied to 295 government, military, and international organizations in 82 countries. Is my network a residential proxy exit too?
To check, list the public IPs your traffic leaves from, look each one up in residential proxy data, and confirm you held the address on the date it was seen. If one is flagged, your DNS, flow, and endpoint logs are where you find the device behind it.
TL;DR
- Step 1: list the prefixes your ASN announces and collapse the overlaps. AS2650 announces a /16 and three /24s inside it.
- Step 2: check your egress IPs, not the whole announcement. Every address in a /16 would cost 131,072 credits; your NAT and Wi-Fi exits are a handful.
-
proxy_days_seen_7dcounts days the IP was seen this week;proxy_provider_count_30dcounts providers offering it. Neither identifies a device. - Step 3: the data has dates, not times, so you find the device through DNS, flow, and endpoint logs.
- A failed lookup isn't a clean result: the script exits 0, 1, or 2 so monitoring can tell them apart. The check takes about 150 lines of Python and a paid API key. A flag says an address was for rent on a given day. Finding the device behind it happens in your own logs, and that's most of the work.
What a residential proxy exit looks like from outside
A residential proxy exit, or exit node, is the address a proxy customer's traffic leaves from. To the website on the other end, the request comes from your network. A device becomes one when software on it accepts proxy jobs: an SDK bundled into a free app, a free VPN with the enrollment buried in its terms, a streaming box that shipped with it, or an app that pays you for "unused bandwidth". The FBI's March 2026 warning lists those four and a fifth: malware hidden in pirated games, films, and software.
Two things go wrong for the network owner. Strangers' traffic (scraping, credential stuffing, phishing) leaves from your addresses, so the abuse reports and blocks land on you. And a device inside your network is taking jobs from outside it. Layer3 pointed out that poorly secured residential proxy SDKs can let buyers reach other machines on the same local network.
DNS traces of this software are common. Infoblox found that over 65% of its Threat Defense Cloud customers queried residential proxy domains in 2026, including over 60% of its government and banking customers. That counts lookups, not confirmed exits.
Step 1: List the prefixes you announce
If your organization has its own ASN, start with what it announces. The ASN endpoint returns them with include=routes. For AS2650 it returns five routes today, and four of them overlap: 165.119.0.0/16 plus three /24s inside it. Check those naively and you'd pay for the same addresses twice, so collapse them first.
I'm using the IPGeolocation API because its residential proxy data is what the government study above was built on, and one key covers the ASN and security lookups. The catch: both endpoints are paid-only. If you only need the route list, RIPEstat's announced-prefixes data call returns the same five prefixes for free. It covers the last two weeks by default; for an older sighting, query the dates around it, since a route's origin can change.
import ipaddress
import logging
import os
import sys
import requests
API = "https://api.ipgeolocation.io/v3"
TIMEOUT = (3, 30) # seconds: connect, read
ERRORS = {
401: "key rejected, or your plan doesn't include this endpoint",
403: "this machine's IP isn't on the key's allow-list",
429: "out of credits",
}
log = logging.getLogger("exit-check")
class ApiError(Exception):
pass
def call(session, method, path, params=None, body=None):
query = {"apiKey": os.environ["IPGEO_API_KEY"], **(params or {})}
try:
resp = session.request(method, f"{API}/{path}", params=query,
json=body, timeout=TIMEOUT)
except requests.RequestException as exc:
# Never print str(exc): requests puts the full URL, key included, in it.
raise ApiError(f"{path}: network error ({type(exc).__name__})") from None
if resp.status_code != 200:
reason = ERRORS.get(resp.status_code, "unexpected response")
raise ApiError(f"{path}: HTTP {resp.status_code}, {reason}")
try:
return resp.json()
except ValueError:
raise ApiError(f"{path}: response wasn't JSON") from None
def announced_networks(session, asn):
data = call(session, "GET", "asn", {"asn": asn, "include": "routes"})
info = data.get("asn") if isinstance(data, dict) else None
routes = info.get("routes") if isinstance(info, dict) else None
if not isinstance(routes, list):
raise ApiError("asn: no route list in the response")
nets = []
for route in routes:
try:
nets.append(ipaddress.ip_network(str(route), strict=False))
except ValueError:
raise ApiError("asn: invalid prefix in route list") from None
# Routes overlap (a /16 plus /24s inside it), so collapse per family.
v4 = ipaddress.collapse_addresses(n for n in nets if n.version == 4)
v6 = ipaddress.collapse_addresses(n for n in nets if n.version == 6)
return [*v4, *v6]
call() never formats the exception it catches. requests puts the full URL in its error messages, and the key travels in the apiKey query parameter, so str(exc) in a log line is a leaked key. Most offices don't have an ASN at all. If yours doesn't, skip this step: your firewall's NAT config, your ISP's assignment, and your cloud NAT settings are the list.
Step 2: Check the IPs your traffic leaves from
Maaz ur Rehman, who wrote the government-networks study, put the order this way:
"Start by looking up the addresses your network actually sends traffic from, not just the ranges you own on paper. If one shows up as a proxy exit, the flag isn't the problem. Somewhere behind that address there's a device running proxy software, and you fix it by finding that device."
The cost math agrees with him. A security lookup is 2 credits per address, so a /24 costs 512 and all of 165.119.0.0/16 would cost 131,072. Your egress list (NAT gateways, guest Wi-Fi, VPN concentrators, the cloud NAT your CI runs behind) is usually a few dozen addresses: 20 cost 40 credits. Pull it from the firewall config, not from memory.
The script needs Python 3.10+ and requests. Its first half cleans the list and keeps one entry per address:
FIELDS = ",".join(f"security.{name}" for name in (
"is_residential_proxy", "proxy_provider_names", "proxy_last_seen",
"proxy_days_seen_30d", "proxy_days_seen_7d", "proxy_provider_count_30d",
))
BULK_LIMIT = 50_000 # max IPs per security-bulk request
def parse_targets(egress, networks):
"""Valid, de-duplicated public IPs, plus a count of entries we can't check."""
targets, skipped = {}, 0
for raw in egress:
try:
ip = ipaddress.ip_address(raw.strip())
except ValueError:
log.warning("not an IP address: %r", raw)
skipped += 1
continue
if not ip.is_global or ip.is_multicast:
log.warning("%s is private or reserved, so it isn't an egress IP", ip)
skipped += 1
continue
if networks and not any(ip in net for net in networks):
# Often a provider-assigned address. Still worth checking.
log.warning("%s is outside the prefixes your ASN announces", ip)
targets.setdefault(ip, None) # one lookup per address, however it's spelled
return list(targets), skipped
The second half makes the bulk call, which takes up to 50,000 addresses and bills only valid ones:
def check_egress(session, targets):
"""Return (flagged, unresolved): unresolved IPs got no usable answer."""
flagged, answered = [], set()
for start in range(0, len(targets), BULK_LIMIT):
batch = targets[start:start + BULK_LIMIT]
try:
items = call(session, "POST", "security-bulk", {"fields": FIELDS},
{"ips": [str(ip) for ip in batch]})
except ApiError as err:
log.warning("%d IPs left unchecked: %s", len(batch), err)
continue # keep whatever other batches found
requested = set(batch)
for item in items if isinstance(items, list) else []:
# A rejected address comes back as {"message": ...}, with no "ip".
if not isinstance(item, dict) or not isinstance(item.get("security"), dict):
continue
try:
# Parse rather than compare strings: IPv6 may come back expanded.
ip = ipaddress.ip_address(str(item.get("ip")))
except ValueError:
continue
flag = item["security"].get("is_residential_proxy")
if ip not in requested or not isinstance(flag, bool):
continue # only an explicit true or false counts as an answer
answered.add(ip)
if flag:
flagged.append((ip, item["security"]))
return flagged, [ip for ip in targets if ip not in answered]
Only an explicit true or false counts as an answer. A rejected address comes back as {"message": ...} inside an HTTP 200 batch, and an IP you didn't ask about is ignored. IPv6 can come back expanded (2001:4860:4860:0:0:0:0:8888), so addresses are parsed, not compared as strings.
The last part reads the config, prints findings, and picks an exit code:
def main():
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s")
asn = os.environ.get("ASN", "").strip()
egress = [ip for ip in os.environ.get("EGRESS_IPS", "").split(",") if ip.strip()]
if not os.environ.get("IPGEO_API_KEY") or not egress:
print("Set IPGEO_API_KEY and EGRESS_IPS (ASN is optional).", file=sys.stderr)
sys.exit(2)
incomplete, networks = False, []
with requests.Session() as session:
if asn:
try:
networks = announced_networks(session, asn)
log.info("%s announces %d prefixes after collapsing", asn, len(networks))
except ApiError as err:
# Routing context only, so keep checking the IPs.
log.warning("prefix check skipped: %s", err)
incomplete = True
targets, skipped = parse_targets(egress, networks)
flagged, unresolved = check_egress(session, targets)
for ip, sec in flagged:
# A missing count prints "unknown", never 0, so it can't pass for a cleanup.
n = {k: sec[k] if type(sec.get(k)) is int else "unknown" for k in (
"proxy_days_seen_7d", "proxy_days_seen_30d", "proxy_provider_count_30d")}
listed = sec.get("proxy_provider_names")
names = ", ".join(map(str, listed)) if isinstance(listed, list) else ""
print(f"{ip}: last seen {sec.get('proxy_last_seen') or 'unknown'}; "
f"seen {n['proxy_days_seen_7d']} of the last 7 days and "
f"{n['proxy_days_seen_30d']} of 30; "
f"{n['proxy_provider_count_30d']} providers in 30 days; "
f"names on record: {names or 'none listed'}")
for ip in unresolved:
log.warning("%s: no usable answer, so it wasn't checked", ip)
# 0 = all checked, none flagged; 1 = flagged; 2 = incomplete, never "clean".
if incomplete or skipped or unresolved or not targets:
sys.exit(2)
sys.exit(1 if flagged else 0)
if __name__ == "__main__":
try:
main()
except Exception as exc: # a crash must not exit 1 and look like a finding
print(f"crashed: {type(exc).__name__}", file=sys.stderr)
sys.exit(2)
| Exit code | Meaning | What to do |
|---|---|---|
| 0 | Every address was checked and none was flagged | Record the run |
| 1 | The check finished and at least one address was flagged | Investigate the printed addresses and dates |
| 2 | Something wasn't checked: bad config, an API error, an address with no answer, or a crash | Fix the cause. Printed findings still count |
Run it with your own values:
export IPGEO_API_KEY="your-paid-key"
export EGRESS_IPS="$(paste -sd, egress-ips.txt)" # one IP per line
# export ASN="AS64500" # optional: your organization's ASN
python check_exits.py
echo "exit code: $?"
A flagged address prints one line. Here's what the November 26 snapshot for 145.223.7.7, the example IP in the API docs, produces:
145.223.7.7: last seen 2026-11-25; seen 7 of the last 7 days and 27 of 30; 11 providers in 30 days; names on record: FleetProxy, ProxyEmpire, ProxyScrape, Proxy-Store, SpyderProxy, Oxy Labs, FlashProxy, Proxy4u, Proxy001, Databay, Byteful
How to read a flag
The full record for that address has 30 fields:
{
"ip": "145.223.7.7",
"security": {
"threat_score": 90,
"is_tor": false,
"is_proxy": true,
"proxy_provider_names": [
"FleetProxy",
"ProxyEmpire",
"ProxyScrape",
"Proxy-Store",
"SpyderProxy",
"Oxy Labs",
"FlashProxy",
"Proxy4u",
"Proxy001",
"Databay",
"Byteful"
],
"proxy_confidence_score": 99,
"proxy_last_seen": "2026-11-25",
"proxy_days_seen_30d": 27,
"proxy_days_seen_7d": 7,
"proxy_provider_count_30d": 11,
"is_residential_proxy": true,
"is_vpn": true,
"vpn_provider_names": [
"SurfShark VPN"
],
"vpn_confidence_score": 99,
"vpn_last_seen": "",
"is_relay": false,
"relay_provider_name": "",
"is_anonymous": true,
"is_known_attacker": true,
"is_bot": false,
"bot_confidence_score": 0,
"bot_operator_name": "",
"bot_type": "",
"is_known_good_bot": false,
"bot_last_seen": "",
"is_spam": true,
"is_cloud_provider": true,
"cloud_provider_name": "Brander Group Inc.",
"is_corporate_gateway": false,
"corporate_gateway_type": "",
"corporate_gateway_provider_name": ""
}
}
The fields that matter to a network owner:
| Field | What it tells you |
|---|---|
is_residential_proxy |
The address was seen as a residential proxy exit |
proxy_last_seen |
The last date it was seen, with no time. The data is rebuilt daily; Maaz says a new sighting shows up within a day |
proxy_days_seen_7d |
Distinct days seen in the last 7. Above 0 gives you a recent window to investigate |
proxy_days_seen_30d |
Distinct days seen in the last 30. A 27 means repeated activity at the address, not one device running nonstop |
proxy_provider_count_30d |
Distinct providers that offered it in the last 30 days. Above 1, a takedown request to one provider may not close the exit |
proxy_provider_names |
Every provider on record, with no date per name, so it can span more than 30 days |
Whether 27 of 30 days is one device relaying all month or several behind the same egress is a question for your logs. And after a cleanup, don't wait for the flag to disappear: Maaz says an address stays in the data for 70 days after its last sighting. Watch for proxy_days_seen_7d dropping to 0 and proxy_last_seen no longer moving, then confirm in your own logs that the software is gone.
Step 3: Find the device behind the flag
First, confirm you held the flagged IP on the date it was seen, and which segment used it. If your ISP assigned you the address after that date, the sighting belongs to someone else. Then the date-only data bites: proxy_last_seen says November 25, not 21:14, so you can't pull one NAT translation and get a laptop. You look for behavior.
Start with DNS, because SDKs check in by name. Google's report on the IPIDEA network lists the domains its SDKs used. On a BIND resolver with query logging on, this finds the clients that looked up the readable ones (add the hashed-looking domains from the report too):
# Proxy SDK domains from Google's IPIDEA indicators. A starting list, not a
# complete one: vendors rotate domains, and other SDKs use their own.
zgrep -hiE '(^|[^a-z0-9_.-])([a-z0-9_-]+\.)*(packetsdk\.(io|net|xyz)|hexsdk\.com|asdk2\.com|willmam\.com)\.?([^a-z0-9_.-]|$)' \
/var/log/named/query.log* | head -n 50
A match gives you a timestamp and a client IP. If that's a DNS forwarder, go one hop further; otherwise match it against DHCP leases or Wi-Fi logs.
In Google's IPIDEA investigation, the SDK used a domain to discover nodes, then polled those nodes directly by IP for proxy jobs. Those polling connections can happen without another DNS lookup. In flow or NAT logs, look for one internal host holding long-lived connections to the same few external IPs and busiest after hours. Ordinary apps do that too, so tie it together: a device that queried the domain, connected to the nodes, and runs an app that explains the traffic.
Expect a consumer app on a work machine. About half of Layer3's White House sightings fell between 5 p.m. and midnight Eastern, but its probes only saw the exits. Synthient said with high confidence that Windows machines there were beaconing to Infatica, Geonode, and Mellowtel, and named Rave, a watch-party app that bundles 12 proxy SDKs, as the likely source. Check guest Wi-Fi and BYOD segments too. When you find the device, remove the app and check that its connections stop. If they don't, reinstall the OS: the FBI notes that some malware survives app removal and even a factory reset.
What this check can't tell you
It sees a subset. The data behind this check comes from more than 170 VPN providers and proxy services combined, Maaz says, which is still not every seller. Layer3 saw six White House addresses through 28 services between October 5 and November 3; the government study saw three addresses from eight brands between September 8 and October 28. Same network, two different slices. A second source helps: Spur, Synthient, Layer3's checker, IPinfo, and MaxMind all do residential proxy detection too.
It can't count devices. One NAT address can front a hundred laptops, and nothing in the data says whether one or twenty of them are relaying traffic.
And exit code 0 isn't a clean network. An unsampled exit, a branch office missing from your list, or a device that moved to another egress can still slip past, which is why Step 3's DNS search is worth running anyway.
Put the script in a weekly cron job against your egress list, and alert differently on exit codes 1 and 2. While you're in the logs, look at the other direction too: Google's COLD RELIC report recommends enriching login logs with residential proxy and VPN reputation, because the attackers it tracked rented exits near their victims to dodge impossible-travel alerts.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.