Controlling Skype Tech Brief Jan 2013.d
Controlling Skype Tech Brief Jan 2013.d
Controlling Skype Tech Brief Jan 2013.d
Copyright 1999-2013 Blue Coat Systems, Inc. All rights reserved worldwide. No part of this document may be reproduced by any means nor modified, decompiled, disassembled, published or distributed, in whole or in part, or translated to any electronic medium or other means without the written consent of Blue Coat Systems, Inc. All right, title and interest in and to the Software and documentation are and shall remain the exclusive property of Blue Coat Systems, Inc. and its licensors. ProxyAV, ProxyOne, CacheOS, SGOS, SG, Spyware Interceptor, Scope, ProxyRA Connector, ProxyRA Manager, Remote Access and MACH5 are trademarks of Blue Coat Systems, Inc. and CacheFlow, Blue Coat, Accelerating The Internet, ProxySG, WinProxy, PacketShaper, PacketShaper Xpress, PolicyCenter, PacketWise, AccessNow, Ositis, Powering Internet Management, The Ultimate Internet Sharing Solution, Cerberian, Permeo, Permeo Technologies, Inc., and the Cerberian and Permeo logos are registered trademarks of Blue Coat Systems, Inc. All other trademarks contained in this document and in the Software are the property of their respective owners. BLUE COAT SYSTEMS, INC. AND BLUE COAT SYSTEMS INTERNATIONAL SARL (COLLECTIVELY BLUE COAT) DISCLAIM ALL WARRANTIES, CONDITIONS OR OTHER TERMS, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, ON SOFTWARE AND DOCUMENTATION FURNISHED HEREUNDER INCLUDING WITHOUT LIMITATION THE WARRANTIES OF DESIGN, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL BLUE COAT, ITS SUPPLIERS OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, WHETHER ARISING IN TORT, CONTRACT OR ANY OTHER LEGAL THEORY EVEN IF BLUE COAT SYSTEMS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Americas: Blue Coat Systems, Inc. 420 N. Mary Ave. Sunnyvale, CA 94085
Rest of the World: Blue Coat Systems International SARL 3a Route des Arsenaux 1700 Fribourg, Switzerland
Version
v0.1
Note
Initial release
Contents
Introduction......................................................................................................................................... 1 How Skype Works.............................................................................................................................. 1 Requirements....................................................................................................................................... 3 Configuration ...................................................................................................................................... 6 Setting User Policies to Selectively Allow Skype......................................................................... 10 Configuration Steps ................................................................................................................... 11 Conclusion ......................................................................................................................................... 16 About Technical Briefs ..................................................................................................................... 16
List of Figures
Simplified diagram on the current Skype overlay network........................................................ 2 Simplified corporate network .......................................................................................................... 3 Skype Version 5.10.0.116 with default configuration................................................................... 4 Detect Protocol option disabled within the explicit HTTP proxy .............................................. 5 Edit Service dialog - enable Detect Protocol ................................................................................... 7 ProxySG appliance with an active SSL License............................................................................. 7 Skype cant connect message ......................................................................................................... 10 Selectively allowing Skype - Source conditions: a combined object consisting of a list of allowed users and the negated list of User Agents .......................................... 12 Selectively allowing Skype - Service conditions ......................................................................... 12 Selectively allowing Skype - Action.............................................................................................. 13 Connection to Skype service through ProxySG appliance allowed for user1 .................... 13 Skype client - proxy authentication credentials .......................................................................... 14
List of Tables
Firewall logs ....................................................................................................................................... 5 ProxySG appliance main access log (displaying only relevant fields) ...................................... 6 ProxySG appliance main access log (simplified) when configured to block Skype traffic ................................................................................................................................ 8 ProxySG appliance main access log (simplified) when configured to allow Skype traffic for user1 ......................................................................................................... 15
Introduction
Skype is both a proprietary Voice-over-Internet Protocol (VoIP) service and a software application that was originally created in 2003, and currently owned by Microsoft since 2011. The Skype service allows users to communicate with peers by voice, video, and instant messaging over the Internet. Phone calls may be also placed to recipients on the traditional telephone networks. Calls to other users within the Skype service are free of charge, while calls to landline telephones and mobile phones are charged using a debit-based user account system. Skype also provides an Online Telephone Number service (known as SkypeIn), which allows Skype users to receive calls placed from traditional phones directly on their Skype client software application of choice. Skype has become popular for its many additional features, including file transfer, and video conferencing, as well as for the Skype software application being made available for a plethora of operating systems, including those of mobile devices. Skype has also delivered specific service options for the Enterprise market. These features have made Skype a valuable tool for Enterprises worldwide, while at the same time, making Skype a popular application for personal and recreational use. Many network administrators want to enable controls over Skype usage on corporate, government, and education networks, citing reasons such as inappropriate usage of resources, excessive bandwidth usage, and security concerns. As a result, implementing mechanisms for controlling the use of the Skype software application and subsequent Skype traffic are now needed.
user unwittingly becoming a supernode. However, this has not changed the underlying nature of Skypes peer-to-peer (P2P) architecture, in which supernodes simply allow users to find one another. (Calls do not pass through supernodes.) From the software client point of view, Skype is an extremely evasive and selfhealing protocol. The Skype protocol is able to automatically react to changes in traffic restriction policies, to ensure that the Skype client software will be able to log in the user to the Skype service even in the most restrictive network environments. As long as the local network is connected to the Internet, the Skype client software and the Skype protocol itself have been designed to find a way to bypass traffic policy enforcement mechanisms in place within the Enterprise. This makes controlling Skype traffic a challenge, especially when restricting Skype usage to only a number of users is desired. In a typical corporate network, a potential Skype user is connected to the Internet through an edge security layer consisting of at least a NAT/PAT device, a firewall (in the form of either a dedicated appliance or implemented as traffic inspection rules in routers), and a forward proxy. (See Figure 11.)
Figure 11
With the default Skype client software configuration, when a Skype user in the corporate network clicks the Skype Sign me in button, the Skype client initially attempts to directly connect to a list of predefined hosts and ports (Skype authentication servers and Skype supernodes). If this connection fails, (as it should in the case of an average secured corporate network), the Skype client software tries to access Skype hosts through well-known TCP ports, such as TCP/80 and TCP/443. If a forward proxy is not in place, these ports will be allowed as destination ports for egress traffic by the corporate edge security layer. If this new connection attempt is unsuccessful, the Skype client software assumes that Internet access might be restricted to certain devices only, such as a proxy server, and automatically looks for an explicit proxy server configuration in the local computer in which the client software is running. In Microsoft Windows desktops, for instance, the Skype client checks the explicit proxy configuration within Internet Explorer.
If an explicit proxy configuration is discovered, Skype attempts to make its connections through the discovered explicit proxy, disguising the Skype protocol itself as HTTPS, by requesting to establish an SSL connection through HTTP Connect methods sent to the explicit proxy. If the existing proxy is not able to properly handle SSL traffic at the application layer (for example, if the proxy itself is not an SSL proxy or Connect proxy) or if a Blue Coat ProxySG appliance (which is an SSL proxy/Connect proxy) is not correctly configured, Skype will find its way out of the corporate network, and will successfully log in the user to the Skype overlay network. This Technical Brief describe how to correctly configure a ProxySG appliance deployed in explicit proxy mode in order to not only block Skype traffic completely, but also selectively allow Skype traffic with in the corporate network for specific users.
Requirements
Figure 12 illustrates the simplified corporate network that will be used in the following sections to demonstrate the implementation of granular Skype controls in a ProxySG appliance.
Figure 12
As illustrated in Figure 12, to demonstrate the contents of this Technical Brief, we will be using:
A Windows 7 laptop, running Skype v5.10.0.116 with the factory default configuration. (See Figure 13.) The Internet Explorer browser in this laptop has been configured to use the explicit proxy in IP address 192.168.1.3, port TCP/8080.
Figure 13
A firewall, which has been configured so that the ProxySG appliance (192.168.1.3) is the only host allowed to directly connecting to the Internet (except for DNS traffic, which is allowed from all host in the trusted/internal network). A Layer-2 switch, interconnecting the client laptop, the ProxySG appliance, and the Firewall. An edge router for Internet connection, with PAT enabled, so that all corporate Internet traffic will be multiplexed at the IP layer, over a single public IP address. A ProxySG appliance (SG210-25-PR) with the Full Proxy and an active SSL license.
For the purpose of this document, the ProxySG appliance is running SGOS 6.3.3.1. All configurations detailed in this document can be directly applied to any ProxySG appliance running SGOS 6.2.x and 6.3.x, except for minimal changes in the graphical user interface. An active SSL license is mandatory in order to control Skype traffic, as well as traffic generated by any other application trying to bypass an HTTP proxy using HTTP Connect methods to mimic HTTPS traffic. For the remainder of this document, it is assumed that the corporate Internet firewall will be configured so that the ProxySG appliance is the only host allowed to directly connecting to the Internet. For example, only those packets with a source IP addressthat of the ProxySG appliancewill be granted Internet access. Otherwise, the Skype software client will be able to directly connect to the Internet (as described earlier in this document) and Skype controls defined in the ProxySG appliance would simply not apply. To cope with this requirement, the Firewall in Figure 12 has been configured so that only packets sourced at 192.168.1.3 are allowed from the trusted network to the untrusted network, except for DNS traffic, which is allowed from any host (including the host running Skype software: 192.168.1.43). If the ProxySG appliance does not have an active SSL license, or if the explicit HTTP proxy service (under Configuration > Services > Proxy Services) has the Detect Protocol option disabled, (as shown in Figure 14), the Skype client software is able to bypass the ProxySG appliance, as is demonstrated in Table 12 on page 6.
Figure 14
As described earlier in this document, the Skype client software first attempts to make direct connections to Skype servers. In the test environment illustrated in Figure 12, these attempts are blocked by the firewall, as is shown in the following firewall logs:
Table 11
Firewall logs
At this point, the Skype client has concluded that direct Internet connections are being blocked and initiates proxy detection. In this case, the Skype clients reads the explicit proxy configuration from Internet Explorer and makes a connection attempt through the explicit HTTP proxy using the HTTP Connect method. This simulates an HTTPS browsing session, which is allowed through the proxy because the current ProxySG configuration either has no active SSL license or Detect Protocol is disabled in the explicit HTTP proxy. Traffic is processed as a TCP tunnel (session bridging at the Transport Layer) without any further checks. This is demonstrated in Table 12, which lists the ProxySG appliance access log entries from the main log (s-action: TCP_Tunneled with s-method: Connect).
Table 12
Note: The table uses a tabular format for the sake of clarity.
Configuration
To configure the ProxySG appliance to block Skype traffic, complete the following procedure. 1. Enable Detect Protocol in the explicit HTTP proxy service. (See Figure 15.) a. From the ProxySG Management Console, select Configuration > Services > Proxy Services. b. Under Proxy settings, select the Detect Protocol check box. 2. Click Edit to edit the explicit HTTP proxy service. a. Make changes to the service as needed. b. Click OK. 3. Click OK.
Figure 15
4. Verify that the ProxySG appliance has an active SSL License. a. From the ProxySG Management Console, select Maintenance > Licensing > View.
Figure 16
Based on this configuration, when the ProxySG appliance receives an HTTP request containing a Connect method, the ProxySG appliance will internally hand off the embedded traffic to the SSL worker process. This is demonstrated in Table 13 on page 8.
Table 13
ProxySG appliance main access log (simplified) when configured to block Skype traffic
Note: When the explicit HTTP proxy receives an HTTP Connect tunnel connection and protocol detection is enabled, if the ProxySG appliance has an internal worker process for the protocol detected (as it is the case for SSL), the ProxySG appliance will hand the connection off to the appropriate workers to perform additional inspection and processing. If the handoff is successful, saction: TCP_ACCELERATED is logged in the log record of the original tunnel transaction. The SSL worker will then realize that the alleged SSL session initiated by the Skype client is not a valid SSL session, since the destination server is not presenting a valid SSL certificate. (Actually, the servers targeted by the Skype client software will not present any certificate at all.) This will instruct the ProxySG appliance to discard the connection attempt, and ultimately make the Skype client software report the inability to log in the user to the Skype service. The SSL debug log (shown below) provides evidence of this behavior, which shows an excerpt from the SSL Debug output. The output demonstrates the Skype client software attempt to connect to the Skype service through SSL, which is being blocked due to a Missing SSL server certificate error. Note: The SSL Debug messages are presented in reverse order (the most recent debug message first), and should, therefore, be read from the bottom up.
8214.822 SSLW FE0584AC (B6C00201): Remove byte-record-bio from read bio 8214.822 SSLW FE0584AC (B6C00201): Remove byte-record-bio from read bio 8214.820 SSLW FE0584AC (B6C00201): Tunnel decision for ssl:// 157.55.56.148:443/ 8214.819 SSLW FE0584AC (B6C00201): Tunnel "Missing SSL server certificate" error for ssl://157.55.56.148:443/
8194.770 SSLW FE0584AC (B6C00201): upstream hit = 0, server_hit = 0 8194.520 SSLW FE0584AC (B6C00201): Executing ssl connect to: ssl:// 157.55.56.148:443/ 8194.520 SSLW FE0584AC (B6C00201): Enter ssl_set_byte_record_bio 8194.520 SSLW FE0584AC (B6C00201): Setup upstr ssl, ssl=331B6454 8194.520 SSLW FE0584AC (B6C00201): cloned SSL version = 301 8194.520 SSLW FE0584AC (B6C00201): Cloning upstr session 8194.520 SSLW FE0584AC (B6C00201): dwnstr_clnt_hello_type: E7 8194.327 SSLW FE0584AC (B6C00201): Executing ssl accept 8194.327 SSLW FE0584AC (B6C00201): Setup dwnstr ssl, ssl=331B68A4, byte record bio=F5DBB454 8194.327 SSLW FE0584AC (B6C00201): Enter ssl_set_byte_record_bio 8194.327 SSLW FE0584AC (B6C00201): Retrieving ctx from server_map 8194.327 SSLW FE0584AC (B6C00201): SSL Intercept URL: "ssl:// 157.55.56.148:443/" [] output omitted [] 8216.822 SSLW FE0604AC (4A4001ED): Remove byte-record-bio from read bio 8216.822 SSLW FE0604AC (4A4001ED): Remove byte-record-bio from read bio 8216.819 SSLW FE0604AC (4A4001ED): Tunnel decision for ssl:// 157.55.235.166:443/ 8216.819 SSLW FE0604AC (4A4001ED): Tunnel "Missing SSL server certificate" error for ssl://157.55.235.166:443/ 8195.878 SSLW FE0604AC (4A4001ED): upstream hit = 0, server_hit = 0 8195.716 SSLW FE0604AC (4A4001ED): Executing ssl connect to: ssl:// 157.55.235.166:443/ 8195.716 SSLW FE0604AC (4A4001ED): Enter ssl_set_byte_record_bio 8195.716 SSLW FE0604AC (4A4001ED): Setup upstr ssl, ssl=331B6A14 8195.716 SSLW FE0604AC (4A4001ED): cloned SSL version = 301 8195.716 SSLW FE0604AC (4A4001ED): Cloning upstr session 8195.716 SSLW FE0604AC (4A4001ED): dwnstr_clnt_hello_type: E7 8195.603 SSLW FE0604AC (4A4001ED): Executing ssl accept 8195.603 SSLW FE0604AC (4A4001ED): Setup dwnstr ssl, ssl=331B65C4, byte record bio=F5DBB274 8195.603 SSLW FE0604AC (4A4001ED): Enter ssl_set_byte_record_bio 8195.602 SSLW FE0604AC (4A4001ED): Retrieving ctx from server_map 8195.602 SSLW FE0604AC (4A4001ED): SSL Intercept URL: "ssl:// 157.55.235.166:443/"
Blue Coats Knowledge Base FAQ448 details the process for enabling and accessing the SSL Debug Log.
Note
In some SGOS releases, SSL handshake failures/SSL certificate-related errors are logged into the event log. For example:
"SSL client handshake failure" "SSL server handshake failure" "Missing SSL server certificate"
Although these SSL-related error messages are based on genuine SSL traffic, too many of them can prevent you from seeing other important events in the event log. For example, the log can quickly fill with SSL handshake and certificaterelated errors whenever a client or a server drops the connection in the middle of the SSL handshake. Therefore, starting in SGOS 6.2.8.1 and 6.3.3.x, these error messages are logged to the SSL debug log instead of the event log.
As a result of this configuration, Skype software client will not be able to connect the user to the Skype service. (See Figure 17.)
Figure 17
10
Configuration Steps
To configure the ProxySG appliance to selectively allow Skype traffic, complete the following procedure.
Procedure:
1. Launch the VPM from the ProxySG Management Console. To do this, select Configuration > Policy > Visual Policy Manager. 2. Create a new Web Access Layer (or select an existing one in your VPM), and add a new rule to selectively disable protocol detection for Connect methods over HTTP. (See Figure 18 on page 12.) a. Select the Web Access Layer tab. b. Right-click the Source field of the newly created rule and select Set. c. In the Set Source Object dialog, click New and select Combined Source object. d. Name the object. The example is using AllowedSkypeSources. e. Select existing user objects representing the users for whom to allow Skype access (or create new user objects as needed) and add them to the top right At least one of these objects window by clicking Add >>. f.
New.
Within the same dialog, create a new Request Header Object by clicking As shown in Figure 18, this request header object will match on HTTP requests not containing the User-Agent request header field (requested by a regular expression matching the empty string: ^$).
g. Add the newly created request header object to the bottom right At least one of these objects window by clicking Add >>. This restricts the entire condition to only HTTP requests not containing a User-Agent field. This configuration allows the control of Skype, while having SSL interception enabled for actual HTTPS traffic and for those users allowed to use Skype. (Otherwise, HTTPS traffic is never intercepted for those users allowed to connect to the Skype service.)
11
Figure 18 Selectively allowing Skype - Source conditions: a combined object consisting of a list of allowed users and the negated list of User Agents
3. Set service to apply only to HTTP Connect. (See Figure 19.) a. Right-click the Service field, then select Set. b. From the Edit dialog, define the service condition to apply only to connect methods over HTTP. c. Click OK.
Figure 19
12
4. Set action parameters. (See Figure 110.) a. Right-click the Action field and select Set > Disable SSL Detection. b. From the Edit Disable SSL Detection Object dialog, disable SSL detection for traffic tunneled over HTTP Connect. c. Click OK.
With this configuration, only the user user1 is allowed to connect to the Skype service through the ProxySG appliance. (See Figure 111).
Figure 111 Connection to Skype service through ProxySG appliance allowed for user1
13
Depending on the authentication mechanisms used in the ProxySG appliance, you might be required to configure Skype with proxy authentication credentials. (See Figure 112.)
Table 14 on page 15 shows the relevant information from the main access log in the ProxySG appliance, demonstrating how user1 successfully connects to the Skype service.
14
Table 14
ProxySG appliance main access log (simplified) when configured to allow Skype traffic for user1
Based on the configuration provided in this document, Table 14 shows the ProxySG appliance selectively disabling SSL protocol detection over HTTP Connect methods only when the request doesnt have a User-Agent field (s-action: TCP_TUNNELED). The ProxySG appliance is still performing protocol detection for the rest of the traffic, correctly handing off the HTTP Connect
15
method to the SSL proxy worker process for all remaining connect methods received (SSL protocol is detected), even those requests from the same user (s-action: TCP_ACCELERATED). This makes selective Skype control fully compatible with full HTTPS interception in the ProxySG appliance.
Conclusion
The Skype service, featuring one of the most evasive communication protocols to date, is quickly finding its place within the Enterprise user base due to its many features. In addition to Internet voice calls and instant messaging, Skype provides the means to support file transfers, desktop sharing, and group video conferencing. While Skype delivers specific service options for todays Enterprise markets, the Skype software client application has been made available for a plethora of operating systems, including those for mobile devices, such as iOS and Android. Due to its many features, Skype has become a valuable tool for Enterprises worldwide, while at the same time, being a popular application for personal and recreational use, making it necessary to implement mechanisms for controlling the use of the Skype service in the Enterprise. As the cornerstone of Blue Coats Secure Web Gateway infrastructure, the ProxySG appliance not only provides rich policy controls for HTTP and HTTPS traffic, but also provides the required application-layer intelligence to control Skype. This, coupled with the well-known integration of ProxySG appliance and its authentication mechanisms in place on the Enterprise, provides ProxySG appliance administrators the ability to selectively allow the Skype protocol on a per-user basis.
16