security/nss/cmd/ssltap/ssltap-manual.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <HTML>
     2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
     3    - License, v. 2.0. If a copy of the MPL was not distributed with this
     4    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     5 <HEAD>
     6    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
     7    <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (WinNT; U) [Netscape]">
     8    <META NAME="Author" CONTENT="Steve Parkinson">
     9    <TITLE>SSLTap - manual</TITLE>
    10 </HEAD>
    11 <BODY>
    13 <H1>
    14 SSLTap Manual page</H1>
    16 <H3>
    17 Summary</H3>
    18 A command-line proxy which is SSL-aware. It snoops on TCP connections,
    19 and displays the data going by, including SSL records and handshaking&nbsp;
    20 if the connection is SSL.
    21 <H3>
    22 Synopsis</H3>
    23 <TT>ssltap [-vhfsxl] [-p port] hostname:port</TT>
    25 <P><TT>&nbsp;&nbsp; -v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [prints version string]</TT>
    26 <BR><TT>&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [outputs hex instead
    27 of ASCII]</TT>
    28 <BR><TT>&nbsp;&nbsp; -f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [turn on Fancy HTML
    29 coloring]</TT>
    30 <BR><TT>&nbsp;&nbsp; -s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [turn on SSL decoding]</TT>
    31 <BR><TT>&nbsp;&nbsp; -x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [turn on extra SSL
    32 hex dumps]</TT>
    33 <BR><TT>&nbsp;&nbsp; -p port [specify rendezvous port (default 1924)]</TT>
    34 <BR><TT>&nbsp;&nbsp; -l&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [loop - continue
    35 to wait for more connections]</TT>
    36 <H3>
    37 Description</H3>
    38 SSLTap opens a socket on a rendezvous port, and waits for an incoming connection
    39 (client side). Once this connection arrives, SSLTap makes another connection
    40 to hostname:port (server side). It passes any data sent by the client to
    41 the server, and vice versa. However, SSLTap will also display the data
    42 to the console. It can do this for plain HTTP connections, or any TCP protocol.
    43 However, SSLTap can also work with SSL streams, as detailed below.
    45 <P>Let's assume your development machine is called 'intercept'. The simplest
    46 usage of SSLTap is to run the command <TT>'ssltap www.netscape.com:80'</TT>
    47 on intercept. The program will wait for an incoming connection on port
    48 1924. Next you would want to go to your browser, and enter the URL http://intercept:1924.
    49 The page retrieved by the browser will actually be gotten from the server
    50 at www.netscape.com, but will go via SSLTap.
    52 <P>Data sent from the client to the server is surrounded by a '--> [ ]'
    53 symbol, and data sent from the server to the client, a '&lt;---[&nbsp;
    54 ]' symbol.
    56 <P>You'll notice that the page retrieved with this example looks incomplete.
    57 This is because SSLTap by default closes down after the first connection
    58 is complete, so the browser is not able to load images. To make the SSLTap
    59 continue to accept connections, switch on looping mode with the -l option.
    61 <P>You can change the default rendezvous port to something else with the
    62 -p option.
    64 <P>The remaining options change the way the output is produced.
    66 <P>The -f option prints 'fancy' output - in colored HTML. Data sent from
    67 the client to the server is in blue. The server's reply is in red. This
    68 is designed so you can load the output up into a browser. When used with
    69 looping mode, the different connections are separated with horizontal lines.
    71 <P>-x will turn on HEX printing. Instead of being output as ascii, the
    72 data is shown as Hex, like this:
    73 <UL><TT>&lt;-- [</TT>
    74 <BR><TT>&nbsp;&nbsp; 0: 56 d5 16 3e&nbsp; a1 6b b1 4a&nbsp; 8f 67 c4 d7&nbsp;
    75 21 2f 6f dd&nbsp; | V..>.k.J.g..!/o.</TT>
    76 <BR><TT>&nbsp; 10: bb 22 c4 75&nbsp; 8c f4 ce 28&nbsp; 16 a6 20 aa&nbsp;
    77 fb 9a 59 a1&nbsp; | .".u...(.. ...Y.</TT>
    78 <BR><TT>&nbsp; 20: 51 91 14 d2&nbsp; fc 9f a7 ea&nbsp; 4d 9c f7 3a&nbsp;
    79 9d 83 62 4a&nbsp; | Q.......M..:..bJ</TT>
    80 <BR><TT>]</TT>
    81 <BR>&nbsp;</UL>
    83 <H4>
    84 SSL Parse mode</H4>
    85 The following options deal with SSL connections.
    86 <UL>-s will turn on SSL parsing. (SSLTap doesn't automatically detect SSL
    87 sessions.)
    88 <BR>-x will turn on extra SSL hexdumps. Mostly, if SSL can decode the data,
    89 it doesn't display the hex.</UL>
    90 The following SSL3 Data structures are parsed: Handshake, ClientHello,
    91 ServerHello, CertificateChain, Certificate. In addition, SSL2 ClientHello,
    92 ServerHello, ClientMasterKey are also partly parsed. NO DECRYPTION IS PERFORMED
    93 ON THE DATA. SSLTAP CANNOT DECRYPT the data.
    95 <P>If a certificate chain is detected, DER-encoded certificates will be
    96 saved into files in the current directory called 'cert.0x' where x is the
    97 sequence number of the certificate.
    98 <BR>&nbsp;
    99 <H3>
   100 Operation Hints</H3>
   101 Often, you'll find that the server certificate does not get transferred,
   102 or other parts of the handshake do not happen. This is because the browser
   103 is taking advantage of session-id-reuse (using the handshake results from
   104 a previous session). If you restart the browser, it'll clear the session
   105 id cache.
   107 <P>If you run the ssltap on a different machine that the ssl server you're
   108 trying to connect to, the browser will complain that the host name you're
   109 trying to connect to is different to the certificate, but it will still
   110 let you connect, after showing you a dialog.
   111 <H3>
   112 Bugs</H3>
   113 Please contact <A HREF="mailto:ssltap-support@netscape.com">ssltap-support@netscape.com</A>
   114 for bug reports.
   115 <H3>
   116 History</H3>
   117 2.1 - First public release (March 1998)
   118 <BR>&nbsp;
   119 <H3>
   120 Other</H3>
   121 For reference, here is a table of some well-known port numbers:
   122 <BR>&nbsp;
   123 <TABLE BORDER=2 >
   124 <TR>
   125 <TD>HTTP</TD>
   127 <TD>80</TD>
   128 </TR>
   130 <TR>
   131 <TD>SMTP</TD>
   133 <TD>25</TD>
   134 </TR>
   136 <TR>
   137 <TD>HTTPS</TD>
   139 <TD>443</TD>
   140 </TR>
   142 <TR>
   143 <TD>FTP</TD>
   145 <TD>21</TD>
   146 </TR>
   148 <TR>
   149 <TD>IMAPS</TD>
   151 <TD>993</TD>
   152 </TR>
   154 <TR>
   155 <TD>NNTP</TD>
   157 <TD>119</TD>
   158 </TR>
   160 <TR>
   161 <TD>NNTPS</TD>
   163 <TD>563</TD>
   164 </TR>
   165 </TABLE>
   166 &nbsp;
   168 <P>&nbsp;
   169 </BODY>
   170 </HTML>

mercurial