PBX Hacking: What It Is, How It Works & How to Prevent It
What is PBX hacking and how do hackers make money from it? This complete guide covers how phone system attacks work, warning signs your PBX has been hacked, and 11 proven ways to secure your Asterisk, FreePBX, or hosted PBX from toll fraud.
Toll fraud can result in phone bills of $10,000 to $100,000+ in a single weekend. Attackers target PBX systems 24/7 using automated tools. If your system is exposed to the internet without proper security, it is only a matter of time before you become a victim.
What Is PBX Hacking?
PBX hacking (also called toll fraud, PBX fraud, or VoIP hacking) is the unauthorized access and exploitation of a Private Branch Exchange (PBX) phone system. Attackers break into business phone systems to make calls at the victim's expense, typically routing traffic to expensive international premium-rate numbers.
PBX hacking is one of the most costly forms of telecommunications fraud. The Communications Fraud Control Association (CFCA) estimates global telecom fraud losses exceed $38 billion annually, with PBX hacking and toll fraud accounting for a significant share. Any business running an IP PBX — whether Asterisk, FreePBX, 3CX, or a legacy system — is a potential target.
Unlike data breaches that steal information, PBX hacking directly costs you money. A compromised system can generate $10,000 to $100,000+ in fraudulent call charges in a single weekend, and the business is typically liable for the bill.
How PBX Hacking Works
PBX hackers use a combination of automated scanning tools and manual exploitation techniques to find and compromise phone systems. Here is a typical attack sequence:
Step 1: Scanning
Automated tools (like SIPVicious, Sippts, or custom scripts) scan millions of IP addresses for SIP services running on port 5060. Any PBX exposed to the internet is discovered within hours.
Step 2: Enumeration
Once a SIP server is found, attackers enumerate valid extensions by sending SIP REGISTER or OPTIONS requests. Common extensions (100-999, 1000-9999) are tested rapidly.
Step 3: Brute Force
With valid extensions identified, attackers launch dictionary and brute-force attacks against SIP passwords. Weak passwords (matching the extension number, simple words, or default credentials) are cracked in seconds.
Step 4: Exploitation
Once authenticated, the attacker registers as a valid extension and begins placing outbound calls — typically hundreds of simultaneous calls to premium-rate international numbers.
This entire process — from scanning to exploitation — can happen in under an hour for poorly secured systems. Attackers operate 24/7 using botnets and automation, making it a numbers game: scan enough IPs, and vulnerable PBX systems are found constantly.
How Do PBX Hackers Make Money?
PBX hacking is a profitable criminal enterprise. Here are the primary ways hackers monetize compromised phone systems:
International Premium Rate Fraud
The most common scheme. Hackers own or partner with premium rate numbers in high-cost destinations (Cuba, Somalia, Latvia, Sierra Leone, Guinea). They route thousands of calls through your PBX to these numbers, earning $0.10–$1.00+ per minute in revenue sharing while you pay the inflated per-minute charges.
Call Selling Services
Compromised PBX systems become unauthorized gateways for cheap international calling. Hackers sell calling cards, VoIP minutes, or callback services to third parties, using your system (and your bill) to terminate the calls. This is common in regions with expensive international rates.
Wangiri (One-Ring) Fraud
Your PBX places brief one-ring calls to thousands of phone numbers. Curious recipients call back the missed number, which connects to expensive premium-rate lines controlled by the fraudsters. Your PBX generates the initial calls; the callbacks generate the revenue.
Caller ID Spoofing for Scams
Hackers use your legitimate business caller ID to conduct phone scams (IRS impersonation, tech support fraud, etc.). Your real business number makes the scam more convincing. This damages your reputation and can trigger STIR/SHAKEN violations and legal liability.
The Economics of PBX Fraud
A single compromised PBX running 50 concurrent calls to premium-rate numbers at $0.50/min generates $1,500/hour for the attacker. Over a weekend (48 hours), that is $72,000 in fraudulent charges on your account. The attacker takes a revenue-share cut; you get the bill.
Building this? Your PBX will need a number
Find a phone number for your trunk
Local numbers $1.50 a month, toll-free $2.00, $1.00 one-time setup. Pick one here and it carries into signup.
Enter an area code, or wait a moment for numbers near you.
Early detection is critical to limiting damage. Watch for these warning signs that indicate your PBX may be compromised:
Unexpected spike in call volume
Suddenly seeing dozens or hundreds of concurrent calls, especially outside business hours.
Calls to unfamiliar international destinations
CDRs showing calls to countries you do not do business with, especially high-fraud destinations like Cuba (+53), Somalia (+252), Latvia (+371), or Sierra Leone (+232).
Unusually high phone bill
A sudden jump in your SIP trunk charges, especially international usage you cannot explain.
Failed registration attempts in logs
Asterisk logs showing thousands of failed SIP registration attempts from unknown IP addresses — a sign of active brute-force attacks.
Complaints about your caller ID
People calling back saying they received calls from your number that you did not make. Your caller ID is being spoofed.
Calls at unusual hours
Active calls showing on your PBX at 3 AM when no employees should be making calls.
Common Attack Vectors
1. Brute Force SIP Registration
The most common attack. Automated tools scan the internet for SIP servers on port 5060 and attempt thousands of username/password combinations. Default or weak credentials are cracked within minutes.
Common weak credentials attackers try: 100/100, 1001/1001, admin/admin, extension numbers matching passwords, voicemail PIN as SIP password
2. Social Engineering
Attackers call your company posing as telecom support, IT vendors, or even employees. They trick staff into revealing PBX credentials, transferring calls to premium numbers, or enabling call forwarding to external lines.
3. Misconfiguration Exploitation
Poorly configured PBX systems often have:
Open SIP ports allowing anonymous calling
Unrestricted outbound dialing (no international call blocking)
DISA (Direct Inward System Access) without PIN protection
Outbound routes accessible without authentication
AMI (Asterisk Manager Interface) exposed to the internet
4. Voicemail System Abuse
Attackers exploit voicemail-to-external transfer features. They access voicemail boxes with default PINs (0000, 1234) and use transfer features to reach outside lines, bypassing normal call restrictions.
5. Web Interface Vulnerabilities
FreePBX and other web GUIs can be compromised through default credentials, unpatched vulnerabilities, or exposure to the public internet. Once attackers access the admin panel, they control the entire phone system.
Essential Security Measures
Strong Password Policy
This is your first line of defense. Every SIP extension must have a strong, unique password.
Password Requirements
Minimum 16 characters for SIP secrets
Mix of uppercase, lowercase, numbers, and symbols
Never use extension number as password
Use a password generator, not human-created passwords
Change passwords immediately if staff leave
Fail2Ban Configuration
Fail2Ban monitors log files and automatically blocks IP addresses that show malicious behavior. This is essential for protecting against brute force attacks.
Only allow SIP traffic from trusted sources. Never expose port 5060 to the entire internet.
# Allow SIP from your SIP trunk provider (IPComms example)
iptables -A INPUT -p udp -s 208.67.60.0/24 --dport 5060 -j ACCEPT
iptables -A INPUT -p udp -s 66.212.71.0/24 --dport 5060 -j ACCEPT
# Allow SIP from your office IP
iptables -A INPUT -p udp -s YOUR.OFFICE.IP.HERE --dport 5060 -j ACCEPT
# Allow RTP media ports
iptables -A INPUT -p udp --dport 10000:20000 -j ACCEPT
# Drop all other SIP traffic
iptables -A INPUT -p udp --dport 5060 -j DROP
iptables -A INPUT -p tcp --dport 5060 -j DROP
# Block AMI from external access
iptables -A INPUT -p tcp --dport 5038 -j DROP
Asterisk/FreePBX Specific Hardening
PJSIP Security Settings
Configure your endpoints to require authentication and restrict access:
Enable the built-in Intrusion Detection module in FreePBX:
Admin > System Admin > Intrusion Detection
Enable "Intrusion Detection"
Set ban time to 86400 (24 hours) or longer
Set max retry to 3
Whitelist your office IP and SIP provider IPs
Restrict Outbound Dialing
Create outbound route restrictions to limit damage if compromised:
Block international by default - Only enable for users who need it
Block premium rate numbers - 900, 976, and international premium prefixes
Set concurrent call limits - No extension should make 50 simultaneous calls
Time-based restrictions - Block international calls after hours
Network Security Best Practices
VPN for Remote Users
Instead of exposing SIP to the internet, require remote phones to connect via VPN. This eliminates external SIP port exposure entirely.
Network Segmentation
Place your PBX on a separate VLAN from general network traffic. Limit which devices can communicate with the phone system.
Use TLS/SRTP
Encrypt SIP signaling (TLS on port 5061) and media (SRTP). This prevents eavesdropping and man-in-the-middle attacks. See our TLS/SRTP configuration guide for setup details.
Disable Unused Services
Turn off AMI if not needed. Disable HTTP/HTTPS management interfaces or restrict to internal IPs only. Remove unused protocols (IAX2, SCCP, H.323).
Session Border Controller (SBC)
For enterprise deployments, consider placing an SBC between your PBX and the internet. The SBC acts as a security proxy that:
Hides your PBX topology from external attackers
Normalizes SIP messaging to prevent protocol exploits
Provides call rate limiting and anomaly detection
Handles NAT traversal without exposing the PBX
Monitoring and Detection
Early detection is critical. Set up monitoring to alert you before a small breach becomes a massive phone bill.
What to Monitor
Metric
Alert Threshold
Why It Matters
Failed registrations
> 10/minute
Indicates brute force attack
Concurrent calls
> normal + 50%
Unusual spike suggests compromise
International calls
Any after hours
Fraud often happens overnight
Calls to premium destinations
Any
High-cost fraud destinations
Single extension call volume
> 5 concurrent
One compromised extension
Log Analysis Script
Create a simple cron job to alert on suspicious activity:
#!/bin/bash
# /usr/local/bin/pbx-security-check.sh
# Count failed auth attempts in last hour
FAILED=$(grep "SecurityEvent=\"InvalidPassword\"" /var/log/asterisk/full | \
grep "$(date -d '1 hour ago' '+%Y-%m-%d %H')" | wc -l)
if [ "$FAILED" -gt 50 ]; then
echo "ALERT: $FAILED failed auth attempts in last hour" | \
mail -s "PBX Security Alert" admin@yourcompany.com
fi
# Check for international calls (adjust country codes as needed)
INTL=$(asterisk -rx "core show channels" | grep -E "011|00" | wc -l)
if [ "$INTL" -gt 5 ]; then
echo "ALERT: $INTL international calls active" | \
mail -s "PBX International Call Alert" admin@yourcompany.com
fi
What to Do If You've Been Hacked
Time is Money: Every minute counts. A compromised PBX can generate hundreds of dollars in fraudulent calls per hour. Act immediately.
Immediate Steps
Disconnect from the network - Pull the ethernet cable or disable the network interface. Stop the bleeding.
Contact your SIP provider - Call IPComms support immediately. We can disable your trunk to stop outbound calls.
Document everything - Screenshot active calls, save logs, note timestamps. You may need this for insurance or law enforcement.
Change all passwords - Every SIP extension, admin interface, AMI, SSH, and database password must be changed.
Review CDRs - Identify which extension(s) were compromised and what numbers were called.
Recovery Process
Apply all security measures from this guide before reconnecting
Consider a fresh install if the system may have been rootkitted
Implement Fail2Ban and firewall rules before enabling SIP
Enable TLS/SRTP for all connections
Set up monitoring and alerts
Document the incident and update your security policy
Dealing with the Bill
Unfortunately, you are generally liable for fraudulent calls made through your system. However:
Contact your carrier immediately - Some providers offer fraud protection limits
File a police report - Required for insurance claims and may help with carrier negotiations
Check your business insurance - Some policies cover toll fraud losses
Document your security measures - Demonstrating reasonable security may help negotiations
IPComms Security Features
As your SIP trunk provider, IPComms includes multiple layers of security to protect our customers from toll fraud and unauthorized access.
IP-Based Authentication
Your trunk only accepts calls from your registered IP addresses. Even if credentials are leaked, attackers cannot use them from other locations.
Fraud Monitoring
Our systems monitor for unusual call patterns 24/7. We proactively alert customers and can suspend trunks when fraud is detected.
Spending Limits
Set daily and monthly spending caps on your account. Once the limit is reached, outbound calls are blocked, limiting your exposure.
International Call Blocking
Block international destinations by default. Enable only the countries you actually need to call, dramatically reducing fraud risk.
TLS/SRTP Support
Full encryption support for both signaling and media. Prevent eavesdropping and man-in-the-middle attacks on your calls.
24/7 Support
Security incidents do not wait for business hours. Our support team can disable your trunk immediately if you suspect fraud.
Frequently Asked Questions About PBX Hacking
How do PBX hackers make money?
PBX hackers primarily profit through International Revenue Sharing Fraud (IRSF). They own or partner with premium-rate phone numbers in high-cost destinations and route thousands of calls through compromised PBX systems to those numbers, earning $0.10–$1.00+ per minute in revenue sharing while the victim pays the inflated charges. Hackers also resell stolen minutes as cheap international calling services and use compromised systems for Wangiri (one-ring) callback fraud, where brief missed calls trick recipients into calling back expensive premium lines.
How can I detect if my PBX has been hacked?
The most reliable PBX hacking detection method is reviewing your Call Detail Records (CDRs) for unusual patterns. Look for calls to international destinations you do not recognize, high call volumes during off-hours (nights and weekends), unexpected spikes in concurrent calls from a single extension, and calls to known high-fraud country codes like Cuba (+53), Somalia (+252), or Latvia (+371). Set up automated alerts for after-hours international dialing, and monitor your Asterisk logs for thousands of failed SIP registration attempts from unknown IPs — a clear sign of an active brute-force attack.
What is the most common type of PBX attack?
Toll fraud (also called PBX fraud) is by far the most common PBX attack, accounting for billions in losses annually. Attackers use automated tools to scan for SIP servers, brute-force credentials, and route expensive international calls through your system. Other common PBX attacks include eavesdropping on unencrypted SIP calls, caller ID spoofing to conduct phone scams using your legitimate business number, and denial-of-service (DoS) attacks that flood your SIP server with traffic to disrupt communications.
How much does PBX fraud cost businesses?
According to the Communications Fraud Control Association (CFCA), global telecom fraud losses exceed $10 billion annually, with PBX hacking and toll fraud representing a significant share. For individual businesses, a single compromised PBX running 50 concurrent calls to premium-rate numbers can generate $10,000 to $100,000+ in fraudulent call charges over a single weekend. Businesses are typically liable for these charges, making investment in PBX security and early fraud detection far cheaper than dealing with the aftermath of an attack.
Stop worrying about SIP trunk capacity. We have you covered.
SIP trunking from a US carrier since 2002: $0.009 per minute inbound, $0.010 outbound, numbers from $1.50 a month, $0 per channel, no contracts.