SSL

From SwiftIRC Wiki
Jump to: navigation, search

Contents

SSL stands for "Secure Socket Layer." Basically, it encrypts your information that is transferred between yourself and the server so a third party cannot "sniff", or otherwise intercept the information and read it. This prevents someone getting certain information you might want to keep private, such as private messages, passwords, or credit card numbers (albeit you shouldn't be saying these on IRC).

Connect using SSL

You'll need:

  • Administrator rights on your PC (this is required in order to install the libraries used to encrypt messages)
  • IRC client that supports SSL connections (mIRC for example, which will be used in this guide)

Instructions

  1. First, download the newest Win32 OpenSSL version from http://slproweb.com/products/Win32OpenSSL.html
  2. Run the executable you downloaded and you will be presented with a series of screens:
    SSL Install 1.png
  3. Agree to the terms
    SSL Install 2.png
  4. Leave the directory path as it is and click next
  5. Change the start menu shortcut folder to your liking and click next
  6. Then click install
  7. After the installation is complete, close it and fire up mIRC.
  • If you're already running mIRC, you must restart the client before going to the next step
  1. Type //echo $sslready. It should return $true
    SSL Install 3.png
  2. If everything has gone well and it does indeed return $true you're ready to connect
  3. Now, in mIRC, type: /server irc.SwiftIRC.net:+6697. You can use any SwiftIRC Server you like, this example uses the irc.* roundrobin. Make sure the + is there and you specify 6697 for the port.
    Swiftirc-ssl-host.JPG
  4. A security dialog box will pop up. This is normal, so check off the box and hit accept so it doesn't bother you in the future.
  5. If you do happen to connect to the random server pool with irc.SwiftIRC.net, you can set mIRC not to nag you to accept certificates. Hit Alt+O, expand the 'Connect' tree and click on 'Options'. Click on the 'SSL' button, and in the top drop down box, select 'Automatically accept invalid certificates'. Click 'OK' twice to exit.
    SSL Install 5.png
  6. Once connected, you are good to go and are using a secure, encrypted connection directly to the server. This prevents snooping or other forms of eavesdropping. It also can prevent some exploits from working such as the famous LinkSys router one that caused certain users to disconnect when a certain phrase was said.

What happens

Below are some examples of the packet sniffer Etheral looking at two IRC connections, one without SSL and one with SSL.

If an attacker were packet sniffing the messages in #testing_channel and someone said "this is an example (enter) of how IRC communications appear in a packet sniffer", he would see:

0000  00 14 bf a3 44 ea 00 11  09 88 0e bb 08 00 45 00   ....D... ......E.
0010  00 55 f8 bf 40 00 80 06  fa 21 c0 a8 01 64 42 fc   .U..@... .!...dB.
0020  02 b9 10 10 1a 0b c5 d2  37 28 bc f1 ae c9 50 18   ........ 7(....P.
0030  fe 1d 91 d0 00 00 50 52  49 56 4d 53 47 20 23 74   ......PR IVMSG #t
0040  65 73 74 69 6e 67 5f 63  68 61 6e 6e 65 6c 20 3a   esting_c hannel :
0050  54 68 69 73 20 69 73 20  61 6e 20 65 78 61 6d 70   This is  an examp
0060  6c 65 0a                                           le.              
0000  00 14 bf a3 44 ea 00 11  09 88 0e bb 08 00 45 00   ....D... ......E.
0010  00 77 f8 c2 40 00 80 06  f9 fc c0 a8 01 64 42 fc   .w..@... .....dB.
0020  02 b9 10 10 1a 0b c5 d2  37 55 bc f1 ae c9 50 18   ........ 7U....P.
0030  fe 1d 68 2d 00 00 50 52  49 56 4d 53 47 20 23 74   ..h-..PR IVMSG #t
0040  65 73 74 69 6e 67 5f 63  68 61 6e 6e 65 6c 20 3a   esting_c hannel :
0050  6f 66 20 68 6f 77 20 49  52 43 20 63 6f 6d 6d 75   of how I RC commu
0060  6e 69 63 61 74 69 6f 6e  73 20 61 70 70 65 61 72   nication s appear
0070  20 69 6e 20 61 20 70 61  63 6b 65 74 20 73 6e 69    in a pa cket sni
0080  66 66 65 72 0a                                     ffer.            

This is translated into ASCII as:

PRIVMSG #testing_channel :This is an example
PRIVMSG #testing_channel :of how IRC communications appear in a packet sniffer

It can be clearly seen that "this is an example..." was said, and if that were sensitive information the attacker would be able to use this information with impunity.

However, this is the same text sent to #testing_channel over SSL:

0000  00 11 09 88 0e bb 00 14  bf a3 44 ea 08 00 45 00   ........ ..D...E.
0010  00 b2 51 d9 40 00 33 06  55 e6 55 08 88 72 c0 a8   ..Q.@.3. U.U..r..
0020  01 64 1a 29 04 8c 2d 8a  1c 51 3e f4 1d 71 50 18   .d.)..-. .Q>..qP.
0030  16 d0 18 37 00 00 17 03  01 00 20 fb 63 48 1b bf   ...7.... .. .cH..
0040  8d 94 e9 cd e1 a7 ce 67  90 e7 c9 42 c9 2e 66 7b   .......g ...B..f{
0050  4a 05 17 a6 a6 f0 5b 82  03 bd 42 17 03 01 00 60   J.....[. ..B....`
0060  f7 99 ea ae 01 ef 8a 59  e3 64 fd 20 07 89 88 d1   .......Y .d. ....
0070  c8 49 8e a5 ee 1b bc 18  eb d3 1c cb 57 1c e5 c7   .I...... ....W...
0080  9d 26 75 65 d2 b8 1d 33  82 52 eb 2a b5 a5 f1 0f   .&ue...3 .R.*....
0090  a3 9f d2 77 90 31 e5 da  16 2e 88 3a 68 0a cf 3b   ...w.1.. ...:h..;
00a0  74 4e 4f 43 7a 08 83 23  04 e8 5a 5b 66 7a ba ce   tNOCz..# ..Z[fz..
00b0  06 02 cf fb 94 8d c5 8b  4f 6d ef 74 f0 66 65 dd   ........ Om.t.fe.

Which is translated into ASCII as:

.... +'....e..Da....X<%%`k.l...@.Y..+....`......./.?.V~.i.:4.v..s.0...t..6@..j.............p..c[../.)Uw5
.?<.g.o.....0.&..2A......6..(...J.... <..,.f.l.Zg...\t..[..v...Db.p..m....Pg#.OEJiQ..xJ9^O.2.wt....3.SJ...-o.`...a....@.Z..~
.
\..)%..P........=?B.g8.?m$...... .B...
|...x.}.C^.F$.......GA..M......"u.`8.v.]]..E....79@;....S..u7zH..{.....".|..&.EJ.Od....J.....")...fmz.4d.N..V..t

It can be clearly seen in the second example that the messages are encrypted, and completely unintelligible. This is how SSL secures your IRC connections so that a third party between you and the IRC server cannot read the messages you send and/or receive.