|
|
| Line 45: |
Line 45: |
| Many networking and security companies claim to detect and control Skype's protocol for enterprise and carrier applications. While the specific detection methods used by these companies are often proprietary, [[Pearson's chi-squared test]] and stochastic characterization with [[Naive Bayes classifier]]s are two approaches that were published in 2007.<ref>[https://www.dpacket.org/articles/revealing-skype-traffic-when-randomness-plays-you Dario Bonfiglio et al. “Revealing Skype Traffic: When Randomness Plays with You,” ACM SIGCOMM Computer Communication Review, Volume 37:4 (SIGCOMM 2007), p. 37–48]</ref> | | Many networking and security companies claim to detect and control Skype's protocol for enterprise and carrier applications. While the specific detection methods used by these companies are often proprietary, [[Pearson's chi-squared test]] and stochastic characterization with [[Naive Bayes classifier]]s are two approaches that were published in 2007.<ref>[https://www.dpacket.org/articles/revealing-skype-traffic-when-randomness-plays-you Dario Bonfiglio et al. “Revealing Skype Traffic: When Randomness Plays with You,” ACM SIGCOMM Computer Communication Review, Volume 37:4 (SIGCOMM 2007), p. 37–48]</ref> |
|
| |
|
| ====Preliminaries====
| | ==Obfuscation layer== |
| | |
| Abbreviations that are used:
| |
| * SN: Skype network
| |
| * SC: Skype client
| |
| * HC: host cache
| |
| | |
| ====Skype client====
| |
| | |
| The main functions of a Skype client are:
| |
| * login
| |
| * user search
| |
| * start and end calls
| |
| * media transfer
| |
| * presence messages
| |
| * video conference
| |
| | |
| ===Login===
| |
| A Skype client [[authentication|authenticates]] the user with the login server, advertises its presence to other peers, determines the type of NAT and firewall it is behind and discovers nodes that have public IP addresses.
| |
| | |
| To connect to the Skype network, the host cache must contain a valid entry. A [[Transmission Control Protocol|TCP]] connection must be established (i.e. to a supernode) otherwise the login will fail.
| |
| Here hc means host cache i.e. the information that a skype client stores about the list of supernodes(sc)
| |
| 1. start
| |
| 2. send [[User Datagram Protocol|UDP]] packet(s) to HC
| |
| 3. if no response within 5 seconds then
| |
| 4. attempt TCP connection with HC
| |
| 5. if not connected then
| |
| 6. attempt TCP connection with HC on port 80 (HTTP)
| |
| 7. if not connected then
| |
| 8. attempt TCP connection with HC on port 443 (HTTPS)
| |
| 9. if not connected then
| |
| 10. attempts++
| |
| 11. if attempts == 5 then
| |
| 12. fail
| |
| 13. else
| |
| 14. wait 6 seconds
| |
| 15. goto step 2
| |
| 16. Success
| |
| | |
| After a Skype client is connected it must authenticate the username and password with the Skype login server. There are many different Skype login servers using different [[Computer port (software)|ports]]. An [[obfuscate]]d list of servers is hardcoded in the Skype executable.
| |
| | |
| Skype servers are:
| |
| {{colbegin|4}}
| |
| * dir1.sd.skype.net:9010
| |
| * dir2.sd.skype.net:9010
| |
| * dir3.sd.skype.net:9010
| |
| * dir4.sd.skype.net:9010
| |
| * dir5.sd.skype.net:9010
| |
| * dir6.sd.skype.net:9010
| |
| * dir7.sd.skype.net:9010
| |
| * dir8.sd.skype.net:9010
| |
| * http1.sd.skype.net:80
| |
| * http2.sd.skype.net:80
| |
| * http3.sd.skype.net:80
| |
| * http4.sd.skype.net:80
| |
| * http5.sd.skype.net:80
| |
| * http6.sd.skype.net:80
| |
| * http7.sd.skype.net:80
| |
| * http8.sd.skype.net:80
| |
| {{colend}}
| |
| | |
| Skype-SW connects randomly to 1–8.
| |
| | |
| On each login session, Skype generates a session key from 192 random bits. The session key is encrypted with the hard-coded login server's 1536-bit public [[RSA (algorithm)|RSA]] key to form an encrypted session key. Skype also generates a 1024-bit private/public RSA key pair. An [[MD5]] hash of a concatenation of the user name, constant string ("\nSkyper\n") and password is used as a shared secret with the login server. The plain session key is hashed into a 256-bit AES key that is used to encrypt the session's public RSA key and the shared secret. The encrypted session key and the AES encrypted value are sent to the login server.
| |
| | |
| On the login server side, the plain session key is obtained by decrypting the encrypted session key using the login server's private RSA key. The plain session key is then used to decrypt the session's public RSA key and the shared secret. If the shared secret match, the login server will sign the user's public RSA key with its private key. The signed data is dispatched to the super nodes.
| |
| | |
| Upon searching for a buddy, a super node will return the buddy's public key signed by Skype. The SC will authenticate the buddy and agree on a session key by using the mentioned RSA key.
| |
| | |
| ==UDP==
| |
| UDP packets:
| |
| IP
| |
| UDP
| |
| Skype SoF
| |
| Skype Crypted Data01
| |
| The Start of Frame (SoF) consists of:
| |
| # frame ID number (2 bytes)
| |
| # payload type (1 byte)
| |
| #* obfuscated payload
| |
| #* Ack/NAck packet
| |
| #* payload forwarding packet
| |
| #* payload resending packet
| |
| #* other
| |
| | |
| ==Obfuscation Layer== | |
| The [[RC4]] encryption algorithm is used to obfuscate the payload of datagrams. | | The [[RC4]] encryption algorithm is used to obfuscate the payload of datagrams. |
| # The [[Cyclic redundancy check|CRC32]] of public source and destination IP, Skype's packet ID are taken | | # The [[Cyclic redundancy check|CRC32]] of public source and destination IP, Skype's packet ID are taken |
| Line 159: |
Line 75: |
| Forward -> Forwarded..Message | | Forward -> Forwarded..Message |
|
| |
|
| ===Object Lists=== | | ===Object lists=== |
| An object can be a number, string, an IP:port, or even another object list. Each object has an ID. This ID identifies which command parameter the object is. | | An object can be a number, string, an IP:port, or even another object list. Each object has an ID. This ID identifies which command parameter the object is. |
|
| |
|