Toll fraud: what to do in the first hour and how to stop it

Reviewed

If calls you did not make are running up your phone bill, you are probably looking at toll fraud: someone else is using your phone system, or your account with your carrier, to dial numbers that pay them. Stop the spending first and investigate second. Ring your carrier and ask them to block outbound calls on the account, then work through the steps below in order.

What to do in the first hour

  1. Ring your carrier and ask them to stop outbound calls on the account. Ask for the call records for the calls in question and for a reference number, and ask for premium-rate and international barring and a spending limit to be set before calling resumes. This stops the cost faster than anything you can do on the phone system.
  2. Keep a way to dial 999. Stopping outbound calls must not leave you without emergency calling. Make sure someone has a mobile phone to hand, and check with your carrier that the block does not cover emergency numbers.
  3. Cut the phone system's outbound route if the carrier cannot act at once. Disable the outbound trunks, or unplug the phone system from the network. If the fraud is running now, a few minutes without outside calls cost less than another hour of it.
  4. Keep the evidence. Do not wipe or reinstall anything yet. Take a snapshot or a copy of the machine, and save the call records, the registration and authentication logs and the configuration. Note the times.
  5. Change every credential. That means extension passwords, trunk credentials, administrator passwords, API keys and voicemail PINs. Use long random values, and revoke any remote-access logins and tokens.
  6. Find out how they got in. The call records show which extension or trunk placed the calls and when. The registration logs show which addresses registered it and how many failures came before the first success. Look for what the attacker added: extensions, trunks, forwarding rules, inbound routes, scheduled tasks, modules or users that you did not create.
  7. Close the way in before you reconnect. The usual ways are in the next section. If you cannot tell how they got in, rebuild the system from software you trust and from a backup taken before the first fraudulent call, and patch it before it goes back on the network.
  8. Reconnect with limits. Set dialling restrictions, caps on the calls an extension and a trunk can have open, spend alerts and a limit at the carrier, and watch the call records closely for two days.
  9. Tell the right people. Your carrier, the police, your insurer if the policy covers it, and your data protection lead if recordings, voicemail or call records may have been taken. This is a crime, so it should be reported.

How toll fraud happens

The attacker needs a way to place calls through your system and a number that pays them. The ways in are few: a guessed or stolen SIP password on an extension or a trunk; a weakness in the software or its admin interface; a feature that lets an outside caller dial out, such as voicemail call-out, direct inward system access, an auto attendant that accepts any digits, remote call forwarding or a transfer to an outside number; and a trunk that trusts too much, such as one authorised by IP address with a default route for calls that were never authenticated.

The attacker profits by calling numbers that pay a share of the call charge to whoever controls them. When those numbers are in other countries, it is called international revenue share fraud. In the UK, premium-rate numbers start with 09 and international calls start with 00 or +.

Stop SIP brute force

Most toll fraud starts with automated tools that find systems answering on the SIP ports and try extension numbers and common passwords against them. To stop SIP brute force, remove what the tools can reach and what they can guess:

  • Do not leave SIP open to the whole internet. Allow only your carrier's signalling addresses on the trunk, and put remote workers behind a VPN, or use TLS with a separate login for each device.
  • Use long, random, different passwords for every extension and trunk. A phone is provisioned with its password, so nobody has to type or remember it.
  • Ban repeat offenders automatically. A tool such as fail2ban on a Linux phone system reads the logs and blocks an address after several failed registrations, and many phone systems have a version built in. Give your own carrier and offices an allow-list so that a ban cannot lock out your own calls.
  • Keep the software patched, and keep the admin interface off the internet.

A ban slows an attacker down and does not replace the other three. An attacker who has a valid password is not failing registrations, so there is nothing to ban.

Limits that cap the damage

Assume that one control will fail, and add the limits that bound the loss. Give each extension only the destinations it needs, and require a PIN for premium-rate numbers and for countries you never call. Cap how many calls an extension and a trunk can have open at once. Block international calls outside working hours. Ask your carrier for a daily spending limit and for premium-rate barring, because a limit at the carrier still works when the phone system has been taken over. Send spending alerts to a mailbox or phone that someone reads at weekends.

Questions people ask

Who pays for the fraudulent calls?

It depends on your contract with the carrier. Some contracts make the customer responsible for every call placed through the account, whoever really made it. Read yours, and tell the carrier in writing as early as you can.

Can fail2ban alone stop toll fraud on a PBX?

No. A ban stops guessing and nothing else. It does not help against a stolen password, an unpatched flaw or a feature that lets outside callers dial out, which is why the limits above matter.

Should I switch the phone system off?

If calls are running now and the carrier cannot stop them at once, take the phone system off the internet or disable its outbound trunks. Do it deliberately, and keep emergency calling in mind (step 2).

In Wafflr

Wafflr is a phone system in development, and it has not launched, so this section describes its console as it is being built. Several parts of its console work on this problem. Each extension has a class of service that says which kinds of number it may dial, and the console describes it as the thing standing between a compromised extension and a large bill for premium numbers dialled overnight. Emergency numbers are never refused: 999, 112 and 911 work from an extension that permits nothing else.

A toll-fraud watch estimates what each extension is spending from the kind of number it dials, over a short burst window and over a day, and suspends the extension when either limit is passed. A person can lift a suspension, and a suspended extension can still dial 999. Fraud is also one of the categories of alert, which an administrator can send by email or to an HTTPS address, which is also how a Slack or Teams incoming webhook receives messages, and each destination has a test button.

The audit trail lists every change to the configuration, newest first, with who made it, and nothing in it can be edited or removed from the console, so an extension, trunk or forwarding rule that an attacker added has the account that made it against it. The Diagnostics page captures the full text of SIP messages when an administrator starts a capture.

If phones will not fetch their settings after you change credentials, see phone will not provision.