VoIP Protocols Reference for Pentesting
This skill provides comprehensive reference information about VoIP protocols commonly encountered during network security assessments and penetration testing.
Quick Protocol Identification
| Protocol |
Port(s) |
Type |
Primary Use |
| SIP |
5060/5061 (TCP/UDP/TLS) |
Signaling |
Call setup/teardown |
| MGCP |
2427 (UDP) |
Signaling |
Gateway control |
| SCCP |
2000 (TCP) |
Signaling |
Cisco IP phones |
| H.323 |
1720 (TCP) |
Signaling |
Video/audio conferencing |
| IAX |
4569 (UDP) |
Signaling |
Asterisk trunking |
| RTP |
10000-20000 (UDP) |
Media |
Audio/video transport |
| RTCP |
+1 from RTP (UDP) |
Control |
Quality monitoring |
| SDP |
N/A (embedded) |
Description |
Session negotiation |
Signaling Protocols
SIP (Session Initiation Protocol)
Overview: Industry standard for VoIP call signaling. Text-based protocol using methods like INVITE, ACK, BYE, REGISTER.
Key Characteristics:
- Uses ports 5060 (UDP/TCP) and 5061 (TLS)
- Text-based (human-readable)
- Decentralized architecture
- Widely supported across vendors
Pentesting Considerations:
- Check for authentication bypass vulnerabilities
- Test for SIP flooding attacks
- Verify TLS encryption on port 5061
- Look for registration hijacking opportunities
- Examine INVITE message handling
Common Attack Vectors:
- SIP INVITE flooding (DoS)
- Registration hijacking
- Call interception
- Eavesdropping on unencrypted traffic
- Malicious REGISTER requests
MGCP (Media Gateway Control Protocol)
Overview: Centralized call control protocol (RFC 3435) for managing media gateways.
Architecture:
- Call Agent/MGC: Master controller managing call setup, modification, termination
- Media Gateways (MGs): Convert media between circuit-switched and packet-switched networks
- Signaling Gateways (SGs): Convert signaling between SS7 and IP networks
Key Characteristics:
- Uses port 2427 (UDP)
- Centralized control model
- Text-based protocol
- Common in carrier networks
Pentesting Considerations:
- Target the Call Agent (single point of control)
- Test gateway command injection
- Verify authentication between MGC and gateways
- Check for unauthorized gateway registration
SCCP (Skinny Client Control Protocol)
Overview: Cisco proprietary protocol for IP phone communication with CallManager.
Architecture:
- Call Control Server: Cisco Unified Communications Manager
- SCCP Endpoints: Cisco IP phones, video endpoints
- Gateways: Media conversion devices
Key Characteristics:
- Uses port 2000 (TCP)
- Binary protocol (not human-readable)
- Lightweight, minimal bandwidth
- Cisco-only ecosystem
Pentesting Considerations:
- Requires Cisco environment knowledge
- Binary protocol needs specialized tools
- Focus on CallManager vulnerabilities
- Check for rogue device registration
- Examine SCCP message integrity
H.323
Overview: ITU-T protocol suite for multimedia communication over packet networks.
Components:
- Terminals: IP phones, video conferencing systems
- Gateways: Network conversion devices
- Gatekeepers: Optional call control and management
- MCUs: Multipoint conference management
Key Characteristics:
- Uses port 1720 (TCP) for call signaling
- Complex protocol suite
- Legacy systems still in use
- Supports audio/video codecs
Pentesting Considerations:
- Target gatekeeper services
- Test H.225/H.245 message handling
- Check for buffer overflow vulnerabilities
- Verify encryption implementation
- Examine MCU configuration
IAX (Inter-Asterisk eXchange)
Overview: Binary protocol for Asterisk PBX communication.
Key Features:
- Single UDP port 4569 for signaling and media
- Binary protocol (efficient)
- Built-in trunking support
- Native encryption (RSA/AES)
- Peer-to-peer capable
Pentesting Considerations:
- Focus on Asterisk-specific vulnerabilities
- Test IAX2 authentication mechanisms
- Verify encryption implementation
- Check for trunking abuse
- Examine peer-to-peer routing
Transmission & Transport Protocols
SDP (Session Description Protocol)
Overview: Text format (RFC 4566) for describing multimedia sessions.
Key Elements:
- Session information (name, timing)
- Media stream characteristics
- Connection information (IP, port)
- Attributes (encryption, bandwidth)
Usage Pattern:
- Initiator creates SDP description
- SDP sent via signaling protocol (SIP, RTSP)
- Receiver processes and responds
- Negotiation completes
Pentesting Considerations:
- Analyze SDP for information disclosure
- Check for IP address leakage
- Verify codec negotiation security
- Examine encryption attribute handling
RTP / RTCP / SRTP / ZRTP
RTP (Real-time Transport Protocol)
- Purpose: Audio/video delivery over IP
- RFC: 3550
- Features: Synchronization, sequencing, timestamping
- Ports: Typically 10000-20000 (UDP)
RTCP (Real-time Transport Control Protocol)
- Purpose: QoS monitoring and feedback
- RFC: 3550
- Features: Packet loss, jitter, round-trip time reporting
- Ports: RTP port + 1 (UDP)
SRTP (Secure Real-time Transport Protocol)
- Purpose: Encrypted media transmission
- RFC: 3711
- Features: AES encryption, HMAC-SHA1 authentication, replay protection
- Usage: Combined with SIP over TLS for end-to-end security
ZRTP (Zimmermann Real-time Transport Protocol)
- Purpose: End-to-end encryption without PKI
- RFC: 6189
- Features: Diffie-Hellman key exchange, Short Authentication Strings (SAS)
- Advantage: Works independently of signaling protocol
Pentesting Considerations:
- Capture and analyze RTP streams for eavesdropping
- Test for weak encryption implementation
- Verify SRTP key exchange mechanisms
- Check for RTCP information disclosure
- Examine ZRTP SAS verification
Protocol Analysis Workflow
Step 1: Identify Active Protocols
Port Scanning: Check common VoIP ports
nmap -p 5060,5061,2427,2000,1720,4569,10000-20000 <target>
Service Detection: Identify running services
nmap -sV -p 5060,5061 <target>
Traffic Analysis: Use Wireshark/tcpdump to identify protocols
tcpdump -i <interface> -s 0 -w voip.pcap port 5060 or port 4569
Step 2: Enumerate Services
- SIP: Send OPTIONS request to enumerate endpoints
- MGCP: Query Call Agent for gateway information
- SCCP: Analyze Cisco phone registration patterns
- H.323: Query gatekeeper for terminal information
- IAX: Check Asterisk peer configurations
Step 3: Test Security Controls
- Authentication: Test credential validation
- Encryption: Verify TLS/SRTP implementation
- Authorization: Check access control mechanisms
- Integrity: Test message tampering detection
Step 4: Document Findings
- Protocol versions and configurations
- Encryption status and implementation
- Authentication mechanisms
- Identified vulnerabilities
- Risk assessment
Common Tools
| Tool |
Purpose |
Protocols |
| Wireshark |
Packet capture/analysis |
All |
| SIPVicious |
SIP testing |
SIP |
| Responder |
LLMNR/NBT-NS spoofing |
Network |
| tcpdump |
Packet capture |
All |
| Asterisk CLI |
Asterisk management |
IAX, SIP |
| VoIPcrack |
SIP password cracking |
SIP |
Security Best Practices
- Encryption: Use TLS for signaling (SIPS) and SRTP for media
- Authentication: Strong credentials, certificate-based where possible
- Network Segmentation: Isolate VoIP traffic from general network
- Firewall Rules: Restrict VoIP ports to necessary sources
- Monitoring: Log and monitor VoIP traffic for anomalies
- Updates: Keep PBX and endpoint firmware current
- VLANs: Separate voice and data traffic
- QoS: Prioritize voice traffic appropriately
References
- RFC 3261: SIP Specification
- RFC 3435: MGCP Specification
- RFC 4566: SDP Specification
- RFC 3550: RTP/RTCP Specification
- RFC 3711: SRTP Specification
- RFC 6189: ZRTP Specification
1---2name: voip-protocols-reference3description: Reference guide for VoIP protocols in pentesting. Use this skill when analyzing VoIP infrastructure, identifying protocols in network traffic, or understanding VoIP attack surfaces. Covers SIP, MGCP, SCCP, H.323, IAX, SDP, RTP, RTCP, SRTP, and ZRTP. Make sure to use this skill whenever the user mentions VoIP, SIP, phone systems, PBX, Asterisk, Cisco Unified Communications, or any voice-over-IP related pentesting or analysis.4metadata:5 source: https://skillmd.com/skills/abelrguezr/voip-protocols-reference6---78# VoIP Protocols Reference for Pentesting910This skill provides comprehensive reference information about VoIP protocols commonly encountered during network security assessments and penetration testing.1112## Quick Protocol Identification1314| Protocol | Port(s) | Type | Primary Use |15|----------|---------|------|-------------|16| SIP | 5060/5061 (TCP/UDP/TLS) | Signaling | Call setup/teardown |17| MGCP | 2427 (UDP) | Signaling | Gateway control |18| SCCP | 2000 (TCP) | Signaling | Cisco IP phones |19| H.323 | 1720 (TCP) | Signaling | Video/audio conferencing |20| IAX | 4569 (UDP) | Signaling | Asterisk trunking |21| RTP | 10000-20000 (UDP) | Media | Audio/video transport |22| RTCP | +1 from RTP (UDP) | Control | Quality monitoring |23| SDP | N/A (embedded) | Description | Session negotiation |2425## Signaling Protocols2627### SIP (Session Initiation Protocol)2829**Overview**: Industry standard for VoIP call signaling. Text-based protocol using methods like INVITE, ACK, BYE, REGISTER.3031**Key Characteristics**:32- Uses ports 5060 (UDP/TCP) and 5061 (TLS)33- Text-based (human-readable)34- Decentralized architecture35- Widely supported across vendors3637**Pentesting Considerations**:38- Check for authentication bypass vulnerabilities39- Test for SIP flooding attacks40- Verify TLS encryption on port 506141- Look for registration hijacking opportunities42- Examine INVITE message handling4344**Common Attack Vectors**:45- SIP INVITE flooding (DoS)46- Registration hijacking47- Call interception48- Eavesdropping on unencrypted traffic49- Malicious REGISTER requests5051### MGCP (Media Gateway Control Protocol)5253**Overview**: Centralized call control protocol (RFC 3435) for managing media gateways.5455**Architecture**:561. **Call Agent/MGC**: Master controller managing call setup, modification, termination572. **Media Gateways (MGs)**: Convert media between circuit-switched and packet-switched networks583. **Signaling Gateways (SGs)**: Convert signaling between SS7 and IP networks5960**Key Characteristics**:61- Uses port 2427 (UDP)62- Centralized control model63- Text-based protocol64- Common in carrier networks6566**Pentesting Considerations**:67- Target the Call Agent (single point of control)68- Test gateway command injection69- Verify authentication between MGC and gateways70- Check for unauthorized gateway registration7172### SCCP (Skinny Client Control Protocol)7374**Overview**: Cisco proprietary protocol for IP phone communication with CallManager.7576**Architecture**:771. **Call Control Server**: Cisco Unified Communications Manager782. **SCCP Endpoints**: Cisco IP phones, video endpoints793. **Gateways**: Media conversion devices8081**Key Characteristics**:82- Uses port 2000 (TCP)83- Binary protocol (not human-readable)84- Lightweight, minimal bandwidth85- Cisco-only ecosystem8687**Pentesting Considerations**:88- Requires Cisco environment knowledge89- Binary protocol needs specialized tools90- Focus on CallManager vulnerabilities91- Check for rogue device registration92- Examine SCCP message integrity9394### H.3239596**Overview**: ITU-T protocol suite for multimedia communication over packet networks.9798**Components**:991. **Terminals**: IP phones, video conferencing systems1002. **Gateways**: Network conversion devices1013. **Gatekeepers**: Optional call control and management1024. **MCUs**: Multipoint conference management103104**Key Characteristics**:105- Uses port 1720 (TCP) for call signaling106- Complex protocol suite107- Legacy systems still in use108- Supports audio/video codecs109110**Pentesting Considerations**:111- Target gatekeeper services112- Test H.225/H.245 message handling113- Check for buffer overflow vulnerabilities114- Verify encryption implementation115- Examine MCU configuration116117### IAX (Inter-Asterisk eXchange)118119**Overview**: Binary protocol for Asterisk PBX communication.120121**Key Features**:122- Single UDP port 4569 for signaling and media123- Binary protocol (efficient)124- Built-in trunking support125- Native encryption (RSA/AES)126- Peer-to-peer capable127128**Pentesting Considerations**:129- Focus on Asterisk-specific vulnerabilities130- Test IAX2 authentication mechanisms131- Verify encryption implementation132- Check for trunking abuse133- Examine peer-to-peer routing134135## Transmission & Transport Protocols136137### SDP (Session Description Protocol)138139**Overview**: Text format (RFC 4566) for describing multimedia sessions.140141**Key Elements**:142- Session information (name, timing)143- Media stream characteristics144- Connection information (IP, port)145- Attributes (encryption, bandwidth)146147**Usage Pattern**:1481. Initiator creates SDP description1492. SDP sent via signaling protocol (SIP, RTSP)1503. Receiver processes and responds1514. Negotiation completes152153**Pentesting Considerations**:154- Analyze SDP for information disclosure155- Check for IP address leakage156- Verify codec negotiation security157- Examine encryption attribute handling158159### RTP / RTCP / SRTP / ZRTP160161#### RTP (Real-time Transport Protocol)162- **Purpose**: Audio/video delivery over IP163- **RFC**: 3550164- **Features**: Synchronization, sequencing, timestamping165- **Ports**: Typically 10000-20000 (UDP)166167#### RTCP (Real-time Transport Control Protocol)168- **Purpose**: QoS monitoring and feedback169- **RFC**: 3550170- **Features**: Packet loss, jitter, round-trip time reporting171- **Ports**: RTP port + 1 (UDP)172173#### SRTP (Secure Real-time Transport Protocol)174- **Purpose**: Encrypted media transmission175- **RFC**: 3711176- **Features**: AES encryption, HMAC-SHA1 authentication, replay protection177- **Usage**: Combined with SIP over TLS for end-to-end security178179#### ZRTP (Zimmermann Real-time Transport Protocol)180- **Purpose**: End-to-end encryption without PKI181- **RFC**: 6189182- **Features**: Diffie-Hellman key exchange, Short Authentication Strings (SAS)183- **Advantage**: Works independently of signaling protocol184185**Pentesting Considerations**:186- Capture and analyze RTP streams for eavesdropping187- Test for weak encryption implementation188- Verify SRTP key exchange mechanisms189- Check for RTCP information disclosure190- Examine ZRTP SAS verification191192## Protocol Analysis Workflow193194### Step 1: Identify Active Protocols1951961. **Port Scanning**: Check common VoIP ports197 ```198 nmap -p 5060,5061,2427,2000,1720,4569,10000-20000 <target>199 ```2002012. **Service Detection**: Identify running services202 ```203 nmap -sV -p 5060,5061 <target>204 ```2052063. **Traffic Analysis**: Use Wireshark/tcpdump to identify protocols207 ```208 tcpdump -i <interface> -s 0 -w voip.pcap port 5060 or port 4569209 ```210211### Step 2: Enumerate Services212213- **SIP**: Send OPTIONS request to enumerate endpoints214- **MGCP**: Query Call Agent for gateway information215- **SCCP**: Analyze Cisco phone registration patterns216- **H.323**: Query gatekeeper for terminal information217- **IAX**: Check Asterisk peer configurations218219### Step 3: Test Security Controls2202211. **Authentication**: Test credential validation2222. **Encryption**: Verify TLS/SRTP implementation2233. **Authorization**: Check access control mechanisms2244. **Integrity**: Test message tampering detection225226### Step 4: Document Findings227228- Protocol versions and configurations229- Encryption status and implementation230- Authentication mechanisms231- Identified vulnerabilities232- Risk assessment233234## Common Tools235236| Tool | Purpose | Protocols |237|------|---------|----------|238| Wireshark | Packet capture/analysis | All |239| SIPVicious | SIP testing | SIP |240| Responder | LLMNR/NBT-NS spoofing | Network |241| tcpdump | Packet capture | All |242| Asterisk CLI | Asterisk management | IAX, SIP |243| VoIPcrack | SIP password cracking | SIP |244245## Security Best Practices2462471. **Encryption**: Use TLS for signaling (SIPS) and SRTP for media2482. **Authentication**: Strong credentials, certificate-based where possible2493. **Network Segmentation**: Isolate VoIP traffic from general network2504. **Firewall Rules**: Restrict VoIP ports to necessary sources2515. **Monitoring**: Log and monitor VoIP traffic for anomalies2526. **Updates**: Keep PBX and endpoint firmware current2537. **VLANs**: Separate voice and data traffic2548. **QoS**: Prioritize voice traffic appropriately255256## References257258- RFC 3261: SIP Specification259- RFC 3435: MGCP Specification260- RFC 4566: SDP Specification261- RFC 3550: RTP/RTCP Specification262- RFC 3711: SRTP Specification263- RFC 6189: ZRTP Specification