Radius/LDAP authentication in open-source IP PBX



Similar documents
User authentication in SIP

Grandstream Networks, Inc. GXP2130/2140/2160 Auto-configuration Plug and Play

SIP Security in IP Telephony

An outline of the security threats that face SIP based VoIP and other real-time applications

NAT TCP SIP ALG Support

CHAPTER 1 INTRODUCTION

For internal circulation of BSNL only

A Novel Approach for Evaluating and Detecting Low Rate SIP Flooding Attack

SIP Essentials Training

Session Initiation Protocol Security Considerations

SIP Registration Stress Test

OpenSIPS For Asterisk Users

SIP: Ringing Timer Support for INVITE Client Transaction

Session Initiation Protocol and Services

Chapter 2 PSTN and VoIP Services Context

SIP : Session Initiation Protocol

Enabling Security Features in Firmware DGW v2.0 June 22, 2011

SIP Introduction. Jan Janak

Authentication and Authorisation for Integrated SIP Services in Heterogeneous Environments 1

Part II. Prof. Ai-Chun Pang Graduate Institute of Networking and Multimedia, Dept. of Comp. Sci. and Info. Engr., National Taiwan University

NTP VoIP Platform: A SIP VoIP Platform and Its Services 1

Session Initiation Protocol (SIP) 陳 懷 恩 博 士 助 理 教 授 兼 計 算 機 中 心 資 訊 網 路 組 組 長 國 立 宜 蘭 大 學 資 工 系 TEL: # 340

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Vulnerability Analysis on Mobile VoIP Supplementary Services and MITM Attack

SIP Trunking Manual. For Samsung OfficeServ. Sep 18, 2006 doc v Sungwoo Lee Senior Engineer

SIP: Protocol Overview

Session Initiation Protocol

How To Attack A Phone With A Billing Attack On A Sip Phone On A Cell Phone On An At&T Vpn Vpn Phone On Vnet.Com (Vnet) On A Pnet Vnet Vip (Sip)

Unregister Attacks in SIP

Authentication, Authorization and Accounting (AAA) Protocols

EE4607 Session Initiation Protocol

VOICE OVER IP SECURITY

Analysis of SIP Traffic Behavior with NetFlow-based Statistical Information

3.1 SESSION INITIATION PROTOCOL (SIP) OVERVIEW

Prevention of Anomalous SIP Messages

Network Working Group. Switch October Session Initiation Protocol (SIP) Extension Header Field for Service Route Discovery During Registration

Asymetrical keys. Alices computer generates a key pair. A public key: XYZ (Used to encrypt) A secret key: ABC98765 (Used to decrypt)

SIP: Ringing Timer Support for INVITE Client Transaction

SIP Basics. CSG VoIP Workshop. Dennis Baron January 5, Dennis Baron, January 5, 2005 Page 1. np119

SHORT DESCRIPTION OF THE PROJECT...3 INTRODUCTION...4 MOTIVATION...4 Session Initiation Protocol (SIP)...5 Java Media Framework (JMF)...

Transport Layer Security Protocols

Technical Manual 3CX Phone System for Windows

The use of IP networks, namely the LAN and WAN, to carry voice. Voice was originally carried over circuit switched networks

Media Gateway Controller RTP

SIP OVER NAT. Pavel Segeč. University of Žilina, Faculty of Management Science and Informatics, Slovak Republic

End Device Support for AAA in SIP Conferencing

BROADWORKS SIP ACCESS SIDE EXTENSIONS INTERFACE SPECIFICATIONS RELEASE Version 1

Sangheon Pack, EunKyoung Paik, and Yanghee Choi

The VoIP Vulnerability Scanner

Anat Bremler-Barr Ronit Halachmi-Bekel Jussi Kangasharju Interdisciplinary center Herzliya Darmstadt University of Technology

Performance Measurement Tools for SIP Server. Samit Jain Columbia University, New York

NTP VoIP Platform: A SIP VoIP Platform and Its Services

Session Initiation Protocol (SIP) Chapter 5

SIP Session Initiation Protocol Nicolas Montavont

SIP Trunk 2 IP-PBX User Guide Asterisk. Ver /08/01 Ver /09/17 Ver /10/07 Ver /10/15 Ver1.0.

Update in Methodology of SIP Performance Testing and its Application

SIP Trunking & Peering Operation Guide

A Call Conference Room Interception Attack and its Detection

Voice over IP (SIP) Milan Milinković

Technical Communication 1201 Norphonic emergency rugged telephone on Alcatel-Lucent OmniPCX Enterprise

Network Convergence and the NAT/Firewall Problems

Fanvil VoIP Auto Provison Standard

Inter-domain Authentication and Authorization Mechanisms for Roaming SIP Users 1

Formación en Tecnologías Avanzadas

Session Initiation Protocol (SIP) The Emerging System in IP Telephony

SIP Session Initiation Protocol

Multimedia Conferencing with SIP

Application Note: Cisco Integration with Onsight Connect

SIP Trunking. Service Guide. Learn More: Call us at

SIP: Session Initiation Protocol. Copyright by Elliot Eichen. All rights reserved.

Using SIP Protocol for Bi-directional Push-to-Talk Mechanism over Ad-Hoc Network

The Authentication and Processing Performance of Session Initiation Protocol (SIP) Based Multi-party Secure Closed Conference System

Programming SIP Services University Infoline Service

Efficient load balancing system in SIP Servers ABSTRACT:

Is your data safe out there? -A white Paper on Online Security

Basic Vulnerability Issues for SIP Security

AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk)

New possibilities for the provision of value-added services in SIP-based peer-to-peer networks

Detection and Prevention Mechanism on Call Hijacking in VoIP System

A Brief Overview of VoIP Security. By John McCarron. Voice of Internet Protocol is the next generation telecommunications method.

Integrating a Hitachi IP5000 Wireless IP Phone

AN IPTEL ARCHITECTURE BASED ON THE SIP PROTOCOL

Proposition of a new approach to adapt SIP protocol to Ad hoc Networks

TSIN02 - Internetworking

Man-in-the-Middle Attack on T-Mobile Wi-Fi Calling

Improving Authentication Performance of Distributed SIP Proxies

A Lightweight Secure SIP Model for End-to-End Communication

Storming SIP Security Captions

Voice over IP & Other Multimedia Protocols. SIP: Session Initiation Protocol. IETF service vision. Advanced Networking

How To Send A Connection From A Proxy To A User Agent Server On A Web Browser On A Pc Or Mac Or Ipad (For A Mac) On A Network With A Webmail Web Browser (For Ipad) On An Ipad Or

Session Initiation Protocol (SIP)

VoIP. What s Voice over IP?

SIP Messages. 180 Ringing The UA receiving the INVITE is trying to alert the user. This response MAY be used to initiate local ringback.

Intelligent P2P VoIP through Extension of Existing Protocols

An Overview on Security Analysis of Session Initiation Protocol in VoIP network

The #1 Issue on VoIP, Fraud!

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

Creating your own service profile for SJphone

SIP Infrastructure Performance Testing

End-2-End QoS Provisioning in UMTS networks

Transcription:

Radius/LDAP authentication in open-source IP PBX Ivan Capan, Marko Skomeršić Protenus d.o.o. Telecommunications & networking department Zrinskih i Frankopana 23, Varaždin, 42000, Croatia ivan.capan@protenus.com, marko.skomersic@protenus.com Abstract In this paper the performance and scalability of a SIP (Session Initiation Protocol) registrar server integrated with an existing directory systems such as LDAP (Lightweight Directory Access Protocol), Active Directory, etc. will be explored and discussed. Applications based on open-source software will be used in all segments of the system, and open and standardized protocols will be used for communication. Security will also be discussed. I. INTRODUCTION The idea of this work was to use open and standardized communication protocol so we have decided to use SIP [1] which is an application layer control protocol developed and designed within the IETF (Internet Engineering Task Force, the Internet standards body). SIP is used for creating, modifying, and terminating sessions with one or more participants. By sessions we understand a set of communicating senders and receivers and the states kept by them during the communication process. While going trough a typical SIP session the caller doesn t know the exact address of the calee initially. The job of finding out the exact location of the recipient is done by SIP proxy server. To accomplish this job successfully, every UAC (User Agent Client) registers its current location to a registrar server by sending a REGISTER message. Registrar stores the bind between the UAC and its current address in a location server which is used by proxies to locate the UAC. Each REGISTER message consists of fields and its attributes. Each registration has a limited lifespan. Expires header field or Expires parameter of Contact header field determines for how long the registration is valid. The user agent must refresh the registration within the lifespan otherwise it will expire and the user will become unavailable. While registering UAC onto the system an UAC authentication can be included. UAC s unique credentials are also included in its REGISTER message. In case of required authentication, registrar server must compare received credentials (username, password, realm, etc.) with unique UAC s credentials stored in the registrar database [2]. In the telephone systems with large numbers of UAC s there are peaks of incoming REGISTER messages which must all be handled by the registrar server. These requests generate a load on it, especially when authentication is required (non-anonymous access). To successfully accomplish registration or re-registration process registrar server must be properly scaled. This scaling can be done by choosing a hardware which is powerful enough to process registration requests in reasonable time, by carefully chosen architecture or by combination of the first two choices. Integration of VoIP system with already present directory system is usually a requirement. These present directory systems are mostly LDAP based [3], such as OpenLDAP, Microsoft Active Directory, etc. Open-source VoIP solutions are used because of its numerous advantages compared to proprietary solutions. For example there is more control of entire system, wider span of experts who can perform maintenance and integration, there is no need for licensing fees, and it s easier to customize the source code [3]. One of main advantages of open source - availability of source code - can also be exploited in finding security issues by malicious hackers. Most of open source projects don't have some commercial company or funding behind it. That does not necessarily influence quality of software, but can prolong development, as it is mostly driven by enthusiasm and free time of programmers. Because of that, roadmaps and strict schedules are not something that can be relied upon. Lack of funding can also mean that there is no staff to write proper documentation. That makes installing and integrating of software harder, but there is always plenty of people in the open source community willing to help. Some open source companies provide commercial support lines. In the extreme cases, source code and the comments within it can be read and better understand the program, but it usually requires good knowledge of programming. Among large number of open-source solutions there are few which are well supported and tested such as Asterisk or OpenSER solution. In this work we have made a stress test of those two by sending a large number of SIP REGISTER messages, and have measured RPS (Registrations Per Second) value for a different number of concurrently sent messages. RPS value is valuable parameter in scaling a registrar server which will be capable of successfully registering UAC s within a required time. For example, if we have a registrar server which has RPS value 15 it can successfully register 15 UAC s per second.

II. LEARNING AND TESTING In our research we have used SIPp, standard opensource tool for testing SIP VoIP communication [4]. SIPp is capable of creating custom SIP scenarios which include sending and receiving SIP messages. It features the dynamic display of statistics about running tests. SIPp is also very useful for simulating thousands of UAC s making calls to VoIP system. We have generated a CSV (Comma Separated Value) file which contains username password pairs for each test UAC as shown in Fig. 1. We have also developed a custom register scenario described in Fig. 2. Scenario is created using XML (Extensible Markup Language) syntax. 2000;[authentication username=2000 password=1234] 2001;[authentication username=2001 password=4321] Fig.1. CSV file used by SIPp scenario with username-password pair for two users. Fig. 2. shows the SIPp scenario which consists of two blocks. First block contains a REGISTER message (without UAC s credentials) sent to a SIP server which responds with two messages (100 Trying and 401 Unauthorized). Second block contains a REGISTER message with UAC credentials and is also sent to a SIP server which now responds with messages 100 Trying and 200 OK. When SIPp receives 200 OK message, registration process is successfully finished. Registration flow process is described in Fig. 3. Using LDAP as an authentication server cannot be done directly, because authentication in LDAP is simply a binding procedure with UAC s password. It cannot handle the SIP digest authentication mechanism. UAC s authentication against an LDAP server can be achieved by putting RADIUS entities (client and server) in between the SIP registrar and the LDAP server, or in the case of Asterisk, a custom LDAP module. This specific architecture and authentication flow is shown in Fig. 4. In our SIP scenario we have fixed T1 timer value to 500 milliseconds although T1 timer is dynamically changed by UAC s. The RFC states that the T1 timer should be equal to "the estimated round-trip time to the destination" or it should be 500 milliseconds if the round-trip time is unknown. This is only for the value of T1 in first sent message, but it must be changed by every next sent message to a double value of previous T1 value [1]. This is not always properly handled especially by software SIP clients, who have often fixed T1 timer. <send retrans= 500 ><![CDATA[ REGISTER sip:[remote_ip] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port] From: <sip:[field0]@[remote_ip]> To: <sip:[field0]@[remote_ip]> Call-ID: [call_id] CSeq: [cseq] REGISTER User-Agent: SIPp/Linux Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Contact: <sip:[field0]@[local_ip]:[local_port]> Content-Length: 0 Expires: 300 ]]></send> <recv response="100" optional="true"></recv> <recv response="401" auth="true"></recv> <send retrans= 500 ><![CDATA[ REGISTER sip:[remote_ip] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port] From: <sip:[field0]@[remote_ip]> To: <sip:[field0]@[remote_ip]> Call-ID: [call_id] CSeq: [cseq] REGISTER User-Agent: SIPp/Linux Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Contact: <sip:[field0]@[local_ip]:[local_port]> [field2] Content-Length: 0 Expires: 300 ]]></send> <recv response="100" optional="true"></recv> <recv response="200" optional="true"></recv> Fig. 3. Flow of SIP registration messages between the client and server. For the first and second measurement as a registrar server we have used the Asterisk IP PBX and OpenSER, respectively. We have conducted tests by generating a 1200 virtual UAC s that were only defined in the LDAP directory. The next step was to generate 1200 UAC s username password pairs in the CSV file (Fig. 1.), which will be used by SIPp test tool. To successfully connect Asterisk with RADIUS client it was needed to adopt a custom software patch that will force Asterisk to authenticate UAC s against RADIUS/LDAP server. Fig. 2. Custom SIPp XML scenario for registration of SIP UAC, which is composed of two REGISTER messages.

With OpenSER we had far better results that were not dependent with number of LDAP records. Because of that, we kept that number at arbitrary large value. Measurement results are shown in Fig. 6. to Fig. 11. m easured RP S value 34,95 32,95 30,95 28,95 26,95 Fig. 4. SIP LDAP architecture with the flow of authentication messages 24,95 30 50 70 90 110 130 150 170 190 Our goal was to measure RPS value for exact number of UAC s when more REGISTER messages were sent to the registrar in the same time. In the case of Asterisk server results have shown that it was almost useless with larger number of UAC s (e.g. more than 900). We have concluded that the main reason for lower RPS value is the number of user records stored in LDAP. Because of that, we wanted to find a dependency between that number and the RPS value with fixed speed of registering. m easured RP S value 34,47 32,47 30,47 28,47 26,47 24,47 Fig. 6. OpenSER test results for 200 UAC s 19,98 17,98 15,98 13,98 11,98 22,47 20,47 18,47 25 75 125 175 225 275 325 375 9,98 7,98 5,98 Fig. 7. OpenSER test results for 400 UAC s 3,98 1,98 100 300 500 700 900 1100 Fig. 5. Asterisk test results for 1200 UAC s Fig. 5. shows that when we have up to 800 user records, RPS value is acceptable. For example, in the case of 700 user records in LDAP and sending 100 REGISTER requests at the same time for 200 UAC s, measured RPS value is 14,86 so to successfully register all of the 200 UAC s we ll need 13,46 seconds. In the case of 1000 stored user records is only 2,52 so the total time is 79,37 seconds which is almost unacceptable. This result is mainly caused by LDAP-Asterisk connector and its unoptimized algorithm for processing LDAP requests which saturate the LDAP server. These figures show the dependency of proposed and while the total number of UAC s REGISTER requests was kept constant for each measurement. For example, in Fig. 6. we have sent the total amount of 200 REGISTER requests, and in case of set to 180, measured RPS was 33,65 so to successfully register all of the 200 UAC s we ll need 5,94 seconds. To successfully register 800 UAC s with set to 600 we ll need 31,43 seconds. This is shown in Fig. 9. The large drop shown in Fig. 8. to Fig. 11. (every testing with more than 600 UAC s) can be explained by pauses in retransmitting REGISTER messages. This pauses are caused by multiplying of T1 timer value in the n-th retransmission iteration. This is normal behaviour proposed in section 17 of RFC 3261. Pauses can be reduced by fine tuning the values of proposed RPS and/or the T1 timer.

33,59 31,59 29,59 27,59 25,59 34,54 32,54 30,54 28,54 26,54 23,59 24,54 22,54 21,59 20,54 19,59 30 130 230 330 430 530 18,54 20 220 420 620 820 1020 Fig. 8. OpenSER test results for 600 UAC s Fig. 11. OpenSER test results for 1200 UAC s 34,74 32,74 30,74 28,74 26,74 24,74 22,74 20,74 40 140 240 340 440 540 640 740 Fig. 9. OpenSER test results for 800 UAC s 33,04 31,04 29,04 27,04 25,04 23,04 21,04 19,04 17,04 30 230 430 630 830 IV. SECURITY ISSUES The main concern with UAC registrations is the plaintext nature of SIP network transport. TLS (Transport Layer Security) which encrypts network transport with SSL (Secure Socket Layer) support for SIP registrars (OpenSER has it natively, Asterisk only as an unofficial patch) is mainly for the inter-server communication and does not involve UAC registration. Fortunately, SIP has a way of encrypting logins and passwords by hashing them with a one-way md5 algorithm [6]. Encrypted in this way (Digest authorization - logins, realms and password are stored in the same hash), they can be matched against a password stored in LDAP. They can t be decrypted even if intercepted on a network, but can only be used in reply attacks (sending the same hash even without knowing the original password). Password in LDAP must already be encrypted, making it useless for other services which need authentication, if any. In that case, passwords in LDAP are in plaintext, vulnerable to sniffing. Extra hashing of passwords on the client side does not produce measurable overhead so it is not included in our testing. Communication between Radius and LDAP directory can be natively TLS encrypted and it is not a security issue. Fig. 10. OpenSER test results for 1000 UAC s

IV. CONCLUSION AND FURTHER WORK A comparative study of registration speed with Asterisk and OpenSER VoIP registrars with LDAP backend has been performed. It has been shown that the OpenSER has greatly outperformed Asterisk. More stable features of OpenSER were more optimized when scaling to a large number of UAC s. We have founded that measured RPS value depends on T1 timer value (retransmission time) so in the future work, it s needed to find a dependency of T1 timer and in order to reduce those pauses. Asterisk in the current development state of LDAP module is either very slow or almost useless when the directory is populated with larger number of entries (e.g. more than 1000). Hardware scaling didn t help in this case because of poorly performing algorithms in LDAP connector. It also has issues with T1 timer, but overall they are negligible. REFERENCES [1] J. Rosenberg, H. Schulzrinne, G. Camarillo, A. Johnston, et. al. RFC 3261, SIP: Session Initiation Protocol, June 2002. [2] Henry Sinnreich, Alan B. Johnston, Internet Communications Using SIP: Delivering VoIP and Multimedia Services with Session Initiation Protocol, 2nd Edn., John Wiley and Sons, Inc., New York, 2006. [3] G. Camarillo, SIP Demystified, The McGraw-Hill Companies, Inc. 2002. [4] O. Jacques, SIPp reference documentation, http://sipp.sourceforge.net/doc/reference.html [5] G. Carter, LDAP System Administration, 1st Edn., O Reilly, Sebastopol, 2003. [6] J. Arkko, V. Torvinen, G. Camarillo, A. Niemi, et. al. RFC 3329, Security Mechanism Agreement for the Session Initiation Protocol (SIP, January 2003.