Man
Professional
- Messages
- 3,218
- Reaction score
- 783
- Points
- 113
SIP engineering (or VoIP attacks) are methods of exploiting vulnerabilities in the Session Initiation Protocol (SIP), which governs the establishment, maintenance, and termination of voice and video calls over the Internet (VoIP). These attacks allow attackers to eavesdrop on conversations, intercept data, block communications, or make calls on behalf of the victim. However, it is important to emphasize that any use of these methods for illegal purposes is a criminal offense. The technical aspects of SIP engineering are described below for educational purposes.
Example of SIP request:
1. What is SIP?
SIP is a signaling protocol used to establish and manage communication sessions in VoIP networks. It operates on a client-server model and uses text messages (similar to HTTP) to:- Registration of devices on the network.
- Establishing and ending calls.
- Transferring information about session parameters (e.g. audio/video codecs).
Example of SIP request:
HTTP:
INVITE sip:user@example.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.100:5060
From: <sip:caller@example.com>
To: <sip:callee@example.com>
Call-ID: 1234567890@example.com
CSeq: 1 INVITE
Content-Type: application/sdp
Content-Length: 142
v=0
o=caller 2890844526 2890844526 IN IP4 192.168.1.100
s=-
c=IN IP4 192.168.1.100
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
2. How do SIP attacks work?
A. SIP Session Interception (Man-in-the-Middle, MITM)
- Purpose: Wiretapping calls or intercepting data.
- How it works:
- The attacker intercepts SIP requests (INVITE, REGISTER) by sniffing the network (for example, using Wireshark).
- Gets information about session parameters (IP addresses, ports, codecs).
- Intercepts RTP traffic (real audio/video stream) and plays it.
B. SIP Request Forgery (Spoofing)
- Purpose: Making calls on behalf of the victim or manipulating sessions.
- How it works:
- The attacker modifies SIP request headers (e.g. From, Call-ID fields) to impersonate a legitimate user.
- Sends a fake INVITE request to start a call or a REFER request to redirect a call.
- The victim receives a call that appears to be from a trusted person, but is actually the attacker.
C. Registration Attacks (SIP Registration Hijacking)
- Purpose: To intercept a user's account to control their calls.
- How it works:
- The attacker sends a REGISTER request with fake credentials (e.g. intercepted login/password).
- The SIP server accepts the request and associates the attacker's device with the victim's account.
- All incoming and outgoing calls from the victim are directed to the attacker's device.
D. Denial-of-Service (DoS) attacks
- Purpose: Blocking communication or overloading the SIP server.
- How it works:
- The attacker sends a lot of fake SIP requests (such as INVITE or REGISTER) to exhaust the server's resources.
- The server becomes unavailable to legitimate users.
E. SIP Phishing
- Purpose: To extract confidential data through fake calls.
- How it works:
- The attacker calls the victim, posing as a bank or support service employee.
- Uses fake Caller ID to make the number appear legitimate.
- Convinces the victim to provide passwords, 2FA codes, or transfer money.
3. SIP attack tools
These tools are used by both attackers and security professionals to test vulnerabilities:A. SIPVicious
- Description: A set of tools for scanning and testing SIP servers.
- Possibilities:
- svwar: Search for active SIP devices.
- svcrack: Brute force credential selection.
- sprecon: Intercept RTP traffic.
- Website: sipcrack.org
B. VoIPong
- Description: A tool for analyzing and manipulating VoIP traffic.
- Possibilities:
- Detecting RTP streams.
- Play audio recordings in real time.
C. Wireshark
- Description: Network traffic analyzer supporting SIP and RTP decoding.
- Possibilities:
- Interception of SIP requests and responses.
- Recovering audio recordings from RTP packets.
- Website: wireshark.org
D. Talk
- Description: An open SIP platform that can be used by attackers to create fake servers.
- Possibilities:
- Disguise as a legitimate SIP server.
- Call interception and redirection.
4. Attack example: Call interception
- Network Scanning: The attacker uses svwar to search for active SIP devices in a range of IP addresses.
- Session Interception: Using Wireshark, it captures the SIP INVITE request and extracts the RTP parameters (IP addresses and ports).
- Playing audio: Using tools like rtpplay, the attacker plays the audio stream and listens to the conversation.
5. Why is SIP vulnerable?
- Lack of encryption: Many SIP systems do not use TLS or SRTP, leaving traffic open to eavesdropping.
- Weak Authentication: SIP account passwords are often stored in cleartext or use simple hashing methods (e.g. MD5).
- Header Trust: SIP requests are not checked for authenticity, allowing From and Call-ID to be spoofed.
- Distributed architecture: SIP networks often include multiple entry points (e.g. PBXs, cloud services), making security more difficult.
6. How to protect yourself from SIP attacks?
A. Traffic encryption
- Use TLS to secure SIP signaling.
- Enable SRTP to encrypt RTP audio/video streams.
B. Strong Authentication
- Set complex passwords for SIP accounts.
- Enable two-factor authentication (2FA) if supported.
C. Firewall Configuration
- Configure your firewall to block suspicious traffic (e.g. mass REGISTER requests).
- Use SIP ALG (Application Layer Gateway) to filter SIP packets.
D. Updating systems
- Regularly update SIP servers and client applications to eliminate vulnerabilities.
- Disable unnecessary features (eg anonymous calls).
E. Activity Monitoring
- Use intrusion detection systems (IDS/IPS) such as Snort or Suricata to analyze SIP traffic.
- Set up alerts for suspicious activity (such as multiple login attempts).
F. Spoofing protection
- Enable STIR/SHAKEN - Call authentication standards to prevent Caller ID spoofing.
7. Legal consequences
SIP attacks violate the laws of many countries:- USA: Computer Fraud and Abuse Act (up to 10 years in prison for wiretapping).
- Russia: Article 138 of the Criminal Code of the Russian Federation (unauthorized access to computer information).
- EU: GDPR (unlawful collection of personal data, fines up to €20 million).
8. Educational resources
If you want to learn VoIP security legally:- Books: "Hacking Exposed VoIP" (John Herlich), "VoIP Security" (Peter Laptev).
- Platforms: TryHackMe (VoIP security courses), OWASP.
- Certifications:
- Certified Ethical Hacker (CEH) - network vulnerability analysis.
- Cisco CCNP Security - Telecommunication Network Security.