Home / exploits SIPDroid Agent User Enumeration
Posted on 04 May 2011
=====[Tempest Security Intelligence - Advisory #01/2011] ======================================================================================================================== User enumeration in SIPDroid Agent ---------------------------------- Author: Anibal Vaz Marques de Aguiar < anibal.aguiar *SPAM* tempest.com.br > =====[Table of Contents] ======================================================================================================================== 1. Overview 2. Detailed description 3. Other contexts & Solutions 4. Concept Proof & Tool 5. Timeline 6. Thanks 7. References =====[Overview] ======================================================================================================================== * Systems affected: SIPDroid 1.6.1 beta, 2.0.1 beta, 2.2 beta (running in Android 2.1 - official Motorola release) (other versions may be affected) * Release date: 03 May 2011 * Impact: This vulnerability may allow information leak, especifically the SIP "extension" and the VoIP gateway in use by the SIPDroid Agent/Client. The Sipdroid Open Source Project[1] presents SIPDroid as a functional (in development) SIP agent/client for Android systems. SIPDroid is known as the most popular SIP client on Android market[2]. We noted is possible to leak sensitive information due the way SIPDroid responds to INVITE packets, specifically on the SDP portion of the "Ringing" messages, after a successful INVITE. It seems the main problem here is the way that SIPDroid deals with the ORIGIN field of the SDP, when it informs the extension/login and the address where the softphone registers itself. The SDP Specification as described by RFC 4566[3] states the ORIGIN field syntax as follows: "o=<username> <session id> <version> <network type> <address type> <address>" where the username portion of the ORIGIN field is defined as follows: "<username> is the user's login on the originating host, or it is "-" if the originating host does not support the concept of user IDs. The <username> MUST NOT contain spaces." =====[Detailed description] ======================================================================================================================== SIPDroid sends, specially in the "Ringing" response (or even in "200 OK" response), specifically in the "ORIGIN" SDP portion field, the extension (user) and the defined VoIP gateway in users's profile. A tipical "Ringing" response from SIPDroid is as follows: ------------------------------------------------------------------------------------------------------ SIP/2.0 180 Ringing Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK2987630636;rport=5060 To: sip:XXX.XXX.XXX.XXX;tag=d49a182ceb609de8 From: XXX.XXX.XXX.XXX;tag=as1386001 Call-ID: 581400284@XXX.XXX.XXX.XXX CSeq: 1 INVITE Server: Sipdroid/1.6.1 beta/A853 Content-Length: 252 Content-Type: application/sdp v=0 o=abc@1.1.1.1 0 0 IN IP4 XXX.XXX.XXX.XXX s=Session SIP/SDP c=IN IP4 XXX.XXX.XXX.XXX t=0 0 m=audio 21000 RTP/AVP 3 101 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 m=video 21070 RTP/AVP 103 a=rtpmap:103 h263-1998/90000 ------------------------------------------------------------------------------------------------------ Note that the "ORIGIN" field ("o=") in the SDP portion received, the username portion is 'extension@VoIP Gateway'. That VoIP gateway, in this case, is not a real one so the agent does not need to be registered in the VoIP PBX/gateway to this issue occurs. This problem also happens on "200 OK" response to the INVITE solicitation, where the problem seems to be less critical considering that depends on the user accepts the call, to this message (the 200 OK and SDP portion as described) be sent to a presumed attacker. =====[Other contexts & Solutions] ======================================================================================================================== A well positioned attacker could take advantage of this issue (sensitive information for free) and make use of the extensions (users) data for future brute force attacks, for example. It seems sending the ORIGIN field as the RFC 4566 states this can address this specific issue, as other SIP clients do. =====[Concept Proof Tool] ======================================================================================================================== Here a tool, SipVicious[4] based, to disclosure the sensitive information as shown: *Warning: on copy and paste take care of code indentation* -----[myhelper.py]------------------------------------------------------------------------------------------------------ #!/usr/bin/env python # Adapted from SipVicious by Anibal Aguiar - anibal.aguiar *SPAM* tempest.com.br # # This code is only for security researches/teaching purposes,use at your own risk! import sys import random def printmsg(msg, color): OKGREEN = '
