Monitoring SIP Traffic Using Support Vector Machines
Monitoring SIP Traffic Using Support Vector Machines
MADYNES Team
INRIA, Nancy Grand Est
17 September 2008
Outline
• Introduction to SIP
• Threats
• Monitoring system
• Experiments
• Future works and Conclusion
2/25
SIP Hard phone
Soft phone
1000@192.168.1.12
bob@192.168.1.10
3/25
DNS
SIP Trapezoid Database
server server
IP address of
SIP service at
berlin.org Where Alice
is registered?
INVITE sip:Alice@berlin.org
Proxy server
Proxy server
INVITE
INVITE sip:Alice@berlin.org SIP/2.0 sip:Alice@berlin.org
Via: SIP/2.0/UDP loria.nancy.org:5060;branch=z9hG4bKfw19b
Max-Forwards: 70
To: Alice <sip:Alice@berlin.org>
From: Bob <sip:Bob@nancy.org>;tag=76341
Bob Call-ID: 123456789@loria.nancy.org
CSeq: 1 INVITE Alice
Contact: <sip:Bob@nancy.org>
Content-Type: application/sdp
4/25
Threats in the VoIP domain
5/25
DoS
Using invalid destination domains with 100 Invite/second
• Flooding attacks target the signaling plane elements (e.g. proxy, gateway, etc.) with
the objective to take them down or to limit their quality, reliability and availability
Strategy Destination
Legitimate SIP messages A valid URI in the target domain
Malformed SIP messages A non existent URI in the target domain
6/25
SPIT or SPam over Internet Telephony
• Like SPAM (cost-free) but more annoying (phone ringing all the
day, interruption of work)
• Expected to become a severe issue with the large deployment of
VoIP services
• SPIT transactions are technically correct
• We don’t know the content until the phone rings
• We need to be reachable
• SPAM filtering solutions are not directly applicable
• Current approaches: multi-level grey list, Turing tests, Trust
management, VoIP SEAL from NEC, VoIP SPAM detector from
University of North Texas
*From winnipeg.ca
7/25
Monitoring Approach
SIP Flow Queue is full
Vector
Events
(Features) Event Correlator/
Queue Processor Classifier
Decider
Update Couples
(vector, Class Id)
Border
Effect Learning
False Alarms
Positives
SIP Start/Stop
flow Long-term
window Events
Vector Event Correlator
Analyser Classifier
(Features) / Decider
Update Couples
(vector, Class
• Short-term/long-term monitoring Learning Id) Alarms
• Count-related/chronological windows
• Different classification and anomaly detection techniques
• Learning-updating/ testing
• Defense against manipulation attacks (poisoning)
• Feature selection and extraction
• Event correlation
• Prevention
9/25
Why SVM ?
Kernel
Function
10/25
Feature Selection
• We have 38 Features INVITE (SDP)
characterizing the SIP
traffic
100 Inter request arrival
• Distributed over 5 groups:
1. General statistics Inter SDP arrival
2. Call-ID based statistics OPTIONS
Inter response arrival
3. Dialog final state
distribution
200 OK (SDP)
4. Request distribution
Inter request arrival
5. Response distribution
Inter response arrival
• We take into account 200 OK
inbound and outbound
messages
ACK
• Other features can be
investigated as well
•Average inter request arrival
• Features must be
•Average inter response arrival
characterized by a small
extraction complexity •Average inter SDP arrival
Real World
VoIP service
provider
12/25
VoIP specific bots
Launches attacks
Asterisk
Available from www.loria.fr/ Cisco
Linksys
Victim
~nassar Thomson,
Grandstream
DoS
VoIP Bot SPIT
commands
Retrieves exploit
Malicious user
SIP
IRC IRC RTP
HTTP
14/25
Normal Data Coherence Test
Day 1
Day 1
Day 1
Day 2
15/25
Monitoring Window Size
The overall
trace is about
8.6 minutes
and message
arrival is
about 147
Msg/s
16/25
Feature selection
17/25
Feature Selection
• Greater number of features doesn’t mean
higher accuracy
• Feature selection increases the accuracy
and the performance of the system
• Selected features are highly dependent on
the underlying traffic and the attacks to be
detected
• A preliminary approach combines F-score
and SVM
18/25
Flooding Detection
Background traffic ~ 147 Msg/sec
Window = 30 messages
A N
t
Attack
Period
19/25
Selected Features for Flooding /
Short Term Monitoring
Number Name
F-score
11 NbReceivers
14 NbCALLSET
20 NbInv
4 NbSdp
2 NbReq
3 NbResp
13 NbNOTACALL
12 AvMsg
20/25
SPIT Detection
Background traffic ~ 147 Msg/sec
Window = 30 messages
False Positive = 0 %
A N
t
Attack
Period
21/25
Selected Features for SPIT /
Long Term Monitoring
Number Name
16 NbRejected F-score
4 NbSdp
20 NbInv
23 NbAck
36 Nb4xx
34 Nb2xx
7 AvInterSdp
35 Nb3xx
13 NbNOTACALL
22/25
Event Correlation
23/25
Conclusion and Future works
• Online monitoring methodology is proposed based on
SVM learning machine
• Offline experiments shows real-time performance and
high detection accuracy
• Anomaly detection and unsupervised learning approach
are future works
• Studying traces of other VoIP attacks
• More investigation about the set of features and the
selection algorithms
• Extending the event correlation framework in order to
reveal attack strategies and attacker plan recognition
24/25
Annex
25/25
Features
Group 1 - General Statistics
1 Duration Total time of the slice
2 NbReq # of requests / Total # of messages
3 NbResp # of responses / Total # of messages
26/25
Features
Group2 - Call-Id based statistics
8 NbSess # of different Call-IDs
27/25
Features
Group 3 – Dialogs’ Final State Distribution
13 NbNOTACALL # of NOTACALL/ Total # of Call-ID
14 NbCALLSET # of CALLSET/ Total # of Call-ID
15 NbCANCELED # of CANCELED/ Total # of Call-ID
28/25
Features
Group 4 – Request Distribution
20 NbInv # of INVITE / Total # of requests
21 NbReg # of REGISTER/ Total # of requests
22 NbBye # of BYE/ Total # of requests
23 NbAck # of ACK/ Total # of requests
24 NbCan # of CANCEL/ Total # of requests
25 NbOpt # of OPTIONS / Total # of requests
26 NbRef # of REFER/ Total # of requests
27 NbSub # of SUBSCRIBE/ Total # of requests
30/25
Phreaking by social engineering scheme
I am a technician doing a
Gateway
test, please transfer me to SIP / PSTN
that operator by dialing 9 0 #
and hang up
Trudy
IP PSTN
network network
Bob has a
contract to
make phone
calls towards
the PSTN
31/25
Machine Learning
• Pros
– Better accuracy, small false alarm rate
– Compact representation
– Detecting Novelty
• Cons
– Embedding of network data in metric spaces
– Difficulty of getting labels
– Vulnerable to malicious noise
– Huge data volumes
32/25
*From Wikipedia
33/25
Traces
34/25
Traces
36/25
Traces
38/25