SIP extension passwords: an audit for one afternoon
SIP extension passwords are what stop a stranger registering a phone as one of your extensions and making calls you pay for. On most systems that have been running for a few years, a handful of them are weak, shared between devices, or written somewhere they should not be, and nobody has looked since the system was installed. This post is an audit you can do in an afternoon on any phone system: what to list, what to look for, where passwords leak without anyone choosing to publish them, and how to change them without a morning of phones that will not ring. None of it needs special tools, and most of it is reading what the system already shows you.
Why SIP extension passwords matter more than they look
A desk phone proves who it is with a username, usually the extension number, and a password. The phone system checks the pair with a challenge, called digest authentication, so the password itself is not sent across the network. That protects it from someone listening, but it does nothing for a password that can be guessed.
Guessing is exactly what happens. Phone systems that answer SIP on the internet are found by automated scanners, which try extension numbers and lists of common passwords. An extension whose password is its own number, 1234, or the company name is found quickly. Once a scanner has a working pair, it registers its own phone and starts dialling expensive numbers, usually overnight or at a weekend when nobody is watching. Our post on preventing toll fraud covers the rest of that story; this audit is about closing the door it walks through.
Even FreeSWITCH, one of the engines many phone systems are built on, ships a default configuration with a single shared password of 1234 for its test extensions, as SignalWire's own install manual points out. Defaults like that survive in production more often than anyone admits.
The audit, step by step
1. List every extension, and every device on it
Export or copy the list of extensions, and beside each one note the devices that register to it: the desk phone, the softphone, the mobile app, the DECT handset. Most systems show the current registrations with the device's address and model. You are looking for three things.
- Extensions with no person. A former employee's extension that still has a valid password is an open account.
- Extensions that never register. Created for a phone that was never installed, often with a placeholder password.
- Extensions registering from somewhere unexpected. An address outside your offices and staff's homes, or a device type nobody in the building uses.
Anything in the first two groups is disabled or deleted today. Anything in the third is investigated before anything else in this list.
2. Find the weak passwords
Most systems will not show you a password once it is set, and the good ones store it in a form that cannot be read back. If yours shows them in plain text, that is itself a finding. Either way, you can still find the weak ones:
- Check the setup notes, the installer's handover document and any spreadsheet called something like "phones". Passwords written there were often reused.
- Look for a pattern: every extension's password the same as its number, or the same password with the number added on the end. A pattern a person can see, a scanner can try.
- Ask whoever set the system up whether a default was used. Many systems and many installers have one.
Any password that is short, numeric, guessable from the extension or the company, or known to more than one person is changed in step 5.
3. Find the shared credentials
One extension with several devices is normal. Several devices sharing one set of credentials is not, because there is no way to tell which device is which, and no way to revoke one without breaking the others. The fix is a credential per device: the desk phone and the softphone on the same extension each have their own username and password, and either can be revoked on its own.
4. Find where passwords leak
This is the part most audits miss, because the leak is not a person writing something down. It is the system doing exactly what it was set up to do.
- Provisioning files. A desk phone that provisions itself downloads a configuration file containing its SIP password. If that file is served over plain HTTP, or from an address anyone on the internet can request by guessing the phone's hardware address, the passwords are public. Check how your phones collect their configuration, and whether the server asks them to prove who they are first. Our guide to phones that will not provision explains the moving parts.
- Phone web interfaces. Many desk phones show the SIP password in their own web page, protected by the phone's admin password. If that is still the maker's default, anyone on the same network can read the SIP password from the phone.
- Backups and exports. A configuration backup is usually a complete copy of every credential. Find out where backups go, who can read them, and whether they are encrypted.
- Tickets and email. A support ticket with "the password for 2004 is..." in it is a leak that lives for years.
5. Change the passwords without an outage
Changing a password on the phone system without changing it on the device takes the device offline, which is why audits stall at this step. Do it in this order:
- Start with the extensions that matter least, to prove the method.
- For phones that provision automatically, change the password on the system, then make the phone collect its configuration again, either by rebooting it or by the system's own resync. Watch it register before moving on.
- For devices configured by hand, such as a softphone or a door entry unit, change both ends at the same visit.
- Change the main and reception extensions last, outside opening hours, with someone at the desk to test.
- Record nothing in a ticket. Note that the password was changed and when, not what it was changed to.
Use long random passwords, not memorable ones. Nobody types a SIP password more than once; the phone remembers it, so a twenty-character random string costs nothing.
How to stop SIP brute force once the passwords are strong
Strong passwords make guessing hopeless, but a scanner still fills logs and uses capacity while it tries. Three layers stop it reaching the passwords at all.
- Limit where registrations come from. If every phone is in the office or on a VPN, the system should not accept registrations from anywhere else. Where remote phones are needed, give them a VPN, an allowed list of addresses, or a session border controller in front of the system.
- Ban addresses that fail repeatedly. On Linux systems this is often done with fail2ban, which watches the phone system's log for failed registrations and blocks the address in the firewall after a number of attempts.
- Bar what nobody needs. An extension that never calls abroad should not be able to, and the system's call barring or class of service is the last line when everything else fails.
Using fail2ban on a PBX
If your system relies on fail2ban, check that it is actually running after every update, because a stopped service fails silently: nothing is banned and nothing tells you. Users on the FreePBX forum report exactly this after updates, in a thread titled FreePBX 17 fail to ban not starting after updates. A monthly look at the list of banned addresses is a cheap way to know it is working.
When the audit causes a "SIP registration failed"
Expect one or two phones to drop off during the changes. A phone showing "registration failed" after a password change has almost always kept its old password, either because it did not collect its new configuration or because it was configured by hand and nobody updated it. The error code tells you which: a 401 or 403 that repeats means the credentials were refused. Our guide to SIP registration failures covers the codes in detail.
In Wafflr
On Wafflr's Desk phones page, the password is typed in once when the phone is added, and the console says it cannot be read back afterwards, only replaced. What the product stores is the digest value derived from the password, encrypted, so a database copy does not give anyone a list of passwords. The box asks for at least twelve characters, and a phone added without one shows a No password marker in the list, so the second step of this audit is a glance down a column. The product's feature catalogue sets per-device credentials as the rule, never shared across devices.
What to do next
Book the afternoon, work through the five steps, and write down what you found so the next person does not start from nothing. Then add the audit to the calendar for once a year, and for whenever someone with access leaves. If the audit finds signs that someone has already been in, stop and follow the first-hour steps in our toll fraud guide before changing anything else.