SIP Scanning Attacks: How to Detect and Stop Them
Quick answer. SIP scanning is automated probing of your SIP exposure — tools like SIPVicious and sipsak walking your endpoints, extensions, and dialable number ranges looking for weak credentials and open routes. “Destination scanning” is the variant that matters most: sequential INVITEs cycling through dialed-number ranges hunting for a route that completes without proper auth, which is how toll fraud starts. You detect it in your SBC and PBX logs as bursts of failed requests, sequential called-number patterns, and unfamiliar OPTIONS/REGISTER floods; you stop it by never exposing a PBX directly, allowlisting signaling peers, and rate-limiting at the session border.
If you run any SIP infrastructure on the public internet, you are being scanned right now. Not hypothetically — the probes start within hours of a new IP address announcing 5060. Most are credential-stuffing scripts; a minority are looking for something more expensive. This page is about recognizing both in your logs and cutting them off.
What the scans look like
Extension and credential scanning
A script registers against your proxy, cycling extensions and passwords. In the logs: a wall of 401 Unauthorized (fine — that’s the challenge working) from one or few source IPs, with REGISTER attempts against extension after extension:
REGISTER sip:pbx.example.com SIP/2.0 From: <sip:100@sip.example.com> → 401
REGISTER sip:pbx.example.com SIP/2.0 From: <sip:101@sip.example.com> → 401
REGISTER sip:pbx.example.com SIP/2.0 From: <sip:102@sip.example.com> → 401
...
User-Agent: friendly-scanner ← SIPVicious' default, and scripts too lazy to change it
Red flags: User-Agent values like friendly-scanner, sundayddr, sip-scan, empty or absurdly long UAs; REGISTER/INVITE rates no human generates; sources from subnets with no business relationship to you.
Destination scanning (the toll-fraud precursor)
This is the pattern that costs money. Instead of auth, the attacker probes where your routes will let calls go — sequential INVITEs to a number range, watching which attempts return something other than an immediate reject:
INVITE sip:+18005550100@your-sbc → 403 (route refused)
INVITE sip:+18005550101@your-sbc → 403
INVITE sip:+18005550102@your-sbc → 403
INVITE sip:+18005550103@your-sbc → 183 ← a route answered; the attacker now knows
INVITE sip:+18005550104@your-sbc → 403
Sequential dialed digits with mixed responses is the signature. If the scanner finds a route with weak origination control — a badly configured trunk, a test extension that forwards, a context that allows outbound without auth — the next phase is a few hundred calls to a premium-rate destination, and that shows up on your client’s bill, not the attacker’s.
OPTIONS and flood probes
Cheap reconnaissance: OPTIONS pings across your whole subnet, or REGISTER floods, mapping what’s alive and how it responds. Each is harmless alone; together they’re the recon map for the attacks above.
How to detect it
- Baseline, then alert on deviation. Know your normal failed-request rate per hour. Alert when
401/403/404counts or requests-per-source-IP exceed it by a multiple. Most SBCs and PBXs can export counters; a five-line script over the logs works too. - Grep for the sequential destination pattern. The destination-scanning signature isn’t any single call — it’s the sequence. Pull a window of INVITEs, sort by called number per source, and look for runs:
…0100, 0101, 0102, 0103…. Any script that flags consecutive called numbers from one source catches scans your per-call view never will. - Watch the User-Agents and methods. Known scanner UAs, and method mixes that make no sense for your deployment (a trunk that should only see INVITE/ACK/BYE getting OPTIONS floods).
- Monitor call detail, not just signaling. Toll fraud detection ultimately lives in CDRs: alert on unusual international/premium destinations, call duration distributions, and after-hours origination — the backstop for the scan that already got through.
How to stop it
In order of effectiveness:
- Never expose the PBX. The SBC (session border controller) is the piece designed to sit in the DMZ — topology hiding, challenge/response, and access control — while the PBX stays unreachable from the internet. If your “SBC” is a port-forward to a PBX, that’s the first thing to fix.
- Allowlist signaling peers at the edge. Your trunks, your clients’ endpoints, your egress ranges — and drop everything else on 5060/5061/5062 before it ever reaches an application layer that can be fooled. This single measure kills the majority of scanning traffic at zero runtime cost.
- Fail and ban. Rate-limit REGISTER/INVITE per source; auto-ban sources that exceed thresholds (fail2ban against the logs works, SBC-native controls are better because they act in the signaling path).
- Lock down origination policy. Route classes with explicit auth, number-range restrictions per tenant/trunk, and no “test” contexts that allow outbound. Destination scanning only pays off for the attacker if some route answers on weak control.
- TLS with certificate validation on trunks and endpoints, so scanners that do get through are at least talking to a hardened path.
Per-tenant matters if you’re an MSP
Scanning gets worse when one compromised tenant can touch the others’ routes. Enforce per-tenant routing policy and per-tenant rate limits — not one global policy that the weakest tenant drags down. This is a core design point of VoipFlow, our white-labeled multi-tenant cloud SBC: per-tenant isolation and signaling controls, flat-rate, with the edge handling exactly this class of internet noise so each client’s PBX never sees it. If you want to see the tenancy model hands-on, the 14-day sandbox is free — no credit card, no sales follow-up.
Related reading
- How to test for SIP ALG — the other thing that probe traffic on 5060 might be
- What is SIP ALG and why it breaks VoIP calls
- Free SIP ALG Port Scanner and pcap-to-ladder for call-flow analysis