Offensive Security: Pentesting Office Phones with SIPVicious
Welcome back, aspiring cyberwarriors!Β
If youβve worked in an office, youβve seen those phones on every desk. Some are wireless with a station, others look like regular landline phones. SIP is the language office phones use to sign in and start a call over the network. A phone call over the internet has two parts. First the two sides have to find each other and agree to talk, then the actual voice moves. SIP only handles the first part. The voices themselves travel on a separate path. Thatβs how most VoIP systems set up calls.
Thatβs why a stolen SIP password can be an issue. They are stealing the systemβs belief that they are that desk phone. Once the handshake accepts them as an extension, say 1000, the phone system treats their laptop like that employeeβs handset. They can place calls as other people and in many setups receive their incoming calls too.
Today weβre going to use SIPVicious against SIP and show you how it can be compromised.
AsteriskΒ
Asterisk is a program that understands SIP and runs the office switchboard. It decides who can sign in, what numbers exist, and who can call whom. Itβs one of the most popular programs for SIP.
We set it up in our lab with Docker.

SIPVicious
Next thing we need to have installed is SIPVicious. The installation is pretty simple.
ubuntu > python3 -m venv sipvicious
ubuntu > source sipvicious/bin/activate
ubuntu > pip3 install sipvicious

The tool comes with 5 different commands: svmap, svwar, svcrack, svreport, svcrash.
Each of these commands has a help menu
ubuntu > sipvicious_svmap -h

Weβll use the first three commands for our test. The rest arenβt really important.
Identification
Using svmap we can find out what service the target is running.
ubuntu > sipvicious_svmap 127.0.0.1

Sometimes the results vary depending on whether you provide the extension. The extension is the phoneβs account number.
ubuntu > sipvicious_svmap 127.0.0.1 -e 1000
You can look up the version and check whether itβs vulnerable to known exploits

Finding Account Numbers
Extensions are account numbers. They usually start at 1000. Old software will allow enumeration, but modern software ignores your requests, so you wonβt be able to find out which accounts exist.
Still, itβs worth trying.
ubuntu > sipvicious_svwar 127.0.0.1 -e 1000-1010

You can also try βforce and see what comes back. Youβll most likely see 401 Unauthorized, but that can vary depending on the software youβre testing.
ubuntu > sipvicious_svwar 127.0.0.1 -e 1000-1010 --force
Cracking Passwords
Even if we can look up extensions, weβll start by trying common ones with our own credentials list. Letβs create a wordlist first.
# creating the list of credentials
ubuntu > printf β%s\nβ 1000 1001 admin password asterisk mrsip-lab > sip-pass.txt
ubuntu > sipvicious_svcrack 127.0.0.1 -u 1000 -d sip-pass.txt

mr-siplab was indeed our password for three of those accounts. This letβs take a look at two other ways of getting credentials without a wordlist.Β
One option is to test the passwords the tool ships with. The default password set is a numeric range from 100 to 999
ubuntu > sipvicious_svcrack 127.0.0.1 -u 1000
You can also try the βenabledefaults flag. It adds common passwords, including the extension number itself.
ubuntu > sipvicious_svcrack 127.0.0.1 -u 1000 --enabledefauls

This didnβt work in our case, because the password was not predictable.Β
We did have three contacts in our Asterisk setup though, and the tool successfully compromised all of them.

What Can Hackers Do
One of the biggest risks is toll fraud. Hackers can use compromised extension credentials to register to the system and place expensive international calls. Thatβs still the most common attack. Hackers can use compromised accounts to run vishing campaigns against other companies. If hackers are already inside and have the phonebook, they can convince employees and support teams to reset passwords, for example.
Summary
Modern software blocks enumeration of existing users, but itβs still possible given how much outdated software is out there. SIPVicious can identify the software in use and test common extensions for weak passwords. There are a few password attacks it can run with or without a wordlist. Sometimes knowing the version alone is enough to compromise a server and get into the network. Donβt overlook yours and regularly upgrade things.
The post Offensive Security: Pentesting Office Phones with SIPVicious first appeared on Hackers Arise.