Blame nss/doc/nroff/ssltap.1

Packit 40b132
'\" t
Packit 40b132
.\"     Title: SSLTAP
Packit 40b132
.\"    Author: [see the "Authors" section]
Packit 40b132
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
Packit 40b132
.\"      Date:  5 June 2014
Packit 40b132
.\"    Manual: NSS Security Tools
Packit 40b132
.\"    Source: nss-tools
Packit 40b132
.\"  Language: English
Packit 40b132
.\"
Packit 40b132
.TH "SSLTAP" "1" "5 June 2014" "nss-tools" "NSS Security Tools"
Packit 40b132
.\" -----------------------------------------------------------------
Packit 40b132
.\" * Define some portability stuff
Packit 40b132
.\" -----------------------------------------------------------------
Packit 40b132
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 40b132
.\" http://bugs.debian.org/507673
Packit 40b132
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
Packit 40b132
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 40b132
.ie \n(.g .ds Aq \(aq
Packit 40b132
.el       .ds Aq '
Packit 40b132
.\" -----------------------------------------------------------------
Packit 40b132
.\" * set default formatting
Packit 40b132
.\" -----------------------------------------------------------------
Packit 40b132
.\" disable hyphenation
Packit 40b132
.nh
Packit 40b132
.\" disable justification (adjust text to left margin only)
Packit 40b132
.ad l
Packit 40b132
.\" -----------------------------------------------------------------
Packit 40b132
.\" * MAIN CONTENT STARTS HERE *
Packit 40b132
.\" -----------------------------------------------------------------
Packit 40b132
.SH "NAME"
Packit 40b132
ssltap \- Tap into SSL connections and display the data going by
Packit 40b132
.SH "SYNOPSIS"
Packit 40b132
.HP \w'\fBssltap\fR\ 'u
Packit 40b132
\fBssltap\fR [\-fhlsvx] [\-p\ port] [hostname:port]
Packit 40b132
.SH "STATUS"
Packit 40b132
.PP
Packit 40b132
This documentation is still work in progress\&. Please contribute to the initial review in
Packit 40b132
\m[blue]\fBMozilla NSS bug 836477\fR\m[]\&\s-2\u[1]\d\s+2
Packit 40b132
.SH "DESCRIPTION"
Packit 40b132
.PP
Packit 40b132
The SSL Debugging Tool
Packit 40b132
\fBssltap\fR
Packit 40b132
is an SSL\-aware command\-line proxy\&. It watches TCP connections and displays the data going by\&. If a connection is SSL, the data display includes interpreted SSL records and handshaking
Packit 40b132
.SH "OPTIONS"
Packit 40b132
.PP
Packit 40b132
\-f
Packit 40b132
.RS 4
Packit 40b132
Turn on fancy printing\&. Output is printed in colored HTML\&. Data sent from the client to the server is in blue; the server\*(Aqs reply is in red\&. When used with looping mode, the different connections are separated with horizontal lines\&. You can use this option to upload the output into a browser\&.
Packit 40b132
.RE
Packit 40b132
.PP
Packit 40b132
\-h
Packit 40b132
.RS 4
Packit 40b132
Turn on hex/ASCII printing\&. Instead of outputting raw data, the command interprets each record as a numbered line of hex values, followed by the same data as ASCII characters\&. The two parts are separated by a vertical bar\&. Nonprinting characters are replaced by dots\&.
Packit 40b132
.RE
Packit 40b132
.PP
Packit 40b132
\-l prefix
Packit 40b132
.RS 4
Packit 40b132
Turn on looping; that is, continue to accept connections rather than stopping after the first connection is complete\&.
Packit 40b132
.RE
Packit 40b132
.PP
Packit 40b132
\-p port
Packit 40b132
.RS 4
Packit 40b132
Change the default rendezvous port (1924) to another port\&.
Packit 40b132
.sp
Packit 40b132
The following are well\-known port numbers:
Packit 40b132
.sp
Packit 40b132
* HTTP 80
Packit 40b132
.sp
Packit 40b132
* HTTPS 443
Packit 40b132
.sp
Packit 40b132
* SMTP 25
Packit 40b132
.sp
Packit 40b132
* FTP 21
Packit 40b132
.sp
Packit 40b132
* IMAP 143
Packit 40b132
.sp
Packit 40b132
* IMAPS 993 (IMAP over SSL)
Packit 40b132
.sp
Packit 40b132
* NNTP 119
Packit 40b132
.sp
Packit 40b132
* NNTPS 563 (NNTP over SSL)
Packit 40b132
.RE
Packit 40b132
.PP
Packit 40b132
\-s
Packit 40b132
.RS 4
Packit 40b132
Turn on SSL parsing and decoding\&. The tool does not automatically detect SSL sessions\&. If you are intercepting an SSL connection, use this option so that the tool can detect and decode SSL structures\&.
Packit 40b132
.sp
Packit 40b132
If the tool detects a certificate chain, it saves the DER\-encoded certificates into files in the current directory\&. The files are named cert\&.0x, where x is the sequence number of the certificate\&.
Packit 40b132
.sp
Packit 40b132
If the \-s option is used with \-h, two separate parts are printed for each record: the plain hex/ASCII output, and the parsed SSL output\&.
Packit 40b132
.RE
Packit 40b132
.PP
Packit 40b132
\-v
Packit 40b132
.RS 4
Packit 40b132
Print a version string for the tool\&.
Packit 40b132
.RE
Packit 40b132
.PP
Packit 40b132
\-x
Packit 40b132
.RS 4
Packit 40b132
Turn on extra SSL hex dumps\&.
Packit 40b132
.RE
Packit 40b132
.SH "USAGE AND EXAMPLES"
Packit 40b132
.PP
Packit 40b132
You can use the SSL Debugging Tool to intercept any connection information\&. Although you can run the tool at its most basic by issuing the ssltap command with no options other than hostname:port, the information you get in this way is not very useful\&. For example, assume your development machine is called intercept\&. The simplest way to use the debugging tool is to execute the following command from a command shell:
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
$ ssltap www\&.netscape\&.com
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
The program waits for an incoming connection on the default port 1924\&. In your browser window, enter the URL http://intercept:1924\&. The browser retrieves the requested page from the server at www\&.netscape\&.com, but the page is intercepted and passed on to the browser by the debugging tool on intercept\&. On its way to the browser, the data is printed to the command shell from which you issued the command\&. Data sent from the client to the server is surrounded by the following symbols: \-\-> [ data ] Data sent from the server to the client is surrounded by the following symbols: "left arrow"\-\- [ data ] The raw data stream is sent to standard output and is not interpreted in any way\&. This can result in peculiar effects, such as sounds, flashes, and even crashes of the command shell window\&. To output a basic, printable interpretation of the data, use the \-h option, or, if you are looking at an SSL connection, the \-s option\&. You will notice that the page you retrieved looks incomplete in the browser\&. This is because, by default, the tool closes down after the first connection is complete, so the browser is not able to load images\&. To make the tool continue to accept connections, switch on looping mode with the \-l option\&. The following examples show the output from commonly used combinations of options\&.
Packit 40b132
.PP
Packit 40b132
Example 1
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
$ ssltap\&.exe \-sx \-p 444 interzone\&.mcom\&.com:443 > sx\&.txt
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Output
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
Connected to interzone\&.mcom\&.com:443
Packit 40b132
\-\->; [
Packit 40b132
alloclen = 66 bytes
Packit 40b132
   [ssl2]  ClientHelloV2 {
Packit 40b132
            version = {0x03, 0x00}
Packit 40b132
            cipher\-specs\-length = 39 (0x27)
Packit 40b132
            sid\-length = 0 (0x00)
Packit 40b132
            challenge\-length = 16 (0x10)
Packit 40b132
            cipher\-suites = {
Packit 40b132
Packit 40b132
                (0x010080) SSL2/RSA/RC4\-128/MD5
Packit 40b132
                  (0x020080) SSL2/RSA/RC4\-40/MD5
Packit 40b132
                  (0x030080) SSL2/RSA/RC2CBC128/MD5
Packit 40b132
                  (0x040080) SSL2/RSA/RC2CBC40/MD5
Packit 40b132
                  (0x060040) SSL2/RSA/DES64CBC/MD5
Packit 40b132
                  (0x0700c0) SSL2/RSA/3DES192EDE\-CBC/MD5
Packit 40b132
                  (0x000004) SSL3/RSA/RC4\-128/MD5
Packit 40b132
                  (0x00ffe0) SSL3/RSA\-FIPS/3DES192EDE\-CBC/SHA
Packit 40b132
                  (0x00000a) SSL3/RSA/3DES192EDE\-CBC/SHA
Packit 40b132
                  (0x00ffe1) SSL3/RSA\-FIPS/DES64CBC/SHA
Packit 40b132
                  (0x000009) SSL3/RSA/DES64CBC/SHA
Packit 40b132
                  (0x000003) SSL3/RSA/RC4\-40/MD5
Packit 40b132
                  (0x000006) SSL3/RSA/RC2CBC40/MD5
Packit 40b132
                  }
Packit 40b132
            session\-id = { }
Packit 40b132
            challenge = { 0xec5d 0x8edb 0x37c9 0xb5c9 0x7b70 0x8fe9 0xd1d3
Packit 40b132
Packit 40b132
0x2592 }
Packit 40b132
}
Packit 40b132
]
Packit 40b132
<\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 16 03 00 03  e5                                   |\&.\&.\&.\&.\&.
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 997 (0x3e5)
Packit 40b132
   handshake {
Packit 40b132
   0: 02 00 00 46                                      |\&.\&.\&.F
Packit 40b132
      type = 2 (server_hello)
Packit 40b132
      length = 70 (0x000046)
Packit 40b132
            ServerHello {
Packit 40b132
            server_version = {3, 0}
Packit 40b132
            random = {\&.\&.\&.}
Packit 40b132
   0: 77 8c 6e 26  6c 0c ec c0  d9 58 4f 47  d3 2d 01 45  |
Packit 40b132
wn&l\&.\(`i\&.\&.XOG\&.\-\&.E
Packit 40b132
   10: 5c 17 75 43  a7 4c 88 c7  88 64 3c 50  41 48 4f 7f  |
Packit 40b132
Packit 40b132
\e\&.uC\(scL\&.\(,C\&.d
Packit 40b132
                  session ID = {
Packit 40b132
                  length = 32
Packit 40b132
Packit 40b132
                contents = {\&.\&.}
Packit 40b132
   0: 14 11 07 a8  2a 31 91 29  11 94 40 37  57 10 a7 32  | \&.\&.\&.\(ad*1\&.)\&.\&.@7W\&.\(sc2
Packit 40b132
   10: 56 6f 52 62  fe 3d b3 65  b1 e4 13 0f  52 a3 c8 f6  | VoRb\(Tp=\(S3e\(+-\&.\&.\&.R\(Po\(`E\&.
Packit 40b132
         }
Packit 40b132
               cipher_suite = (0x0003) SSL3/RSA/RC4\-40/MD5
Packit 40b132
         }
Packit 40b132
   0: 0b 00 02 c5                                      |\&.\&.\&.\(oA
Packit 40b132
      type = 11 (certificate)
Packit 40b132
      length = 709 (0x0002c5)
Packit 40b132
            CertificateChain {
Packit 40b132
            chainlength = 706 (0x02c2)
Packit 40b132
               Certificate {
Packit 40b132
            size = 703 (0x02bf)
Packit 40b132
               data = { saved in file \*(Aqcert\&.001\*(Aq }
Packit 40b132
            }
Packit 40b132
         }
Packit 40b132
   0: 0c 00 00 ca                                      |\&.\&.\&.\&.
Packit 40b132
         type = 12 (server_key_exchange)
Packit 40b132
         length = 202 (0x0000ca)
Packit 40b132
   0: 0e 00 00 00                                      |\&.\&.\&.\&.
Packit 40b132
         type = 14 (server_hello_done)
Packit 40b132
         length = 0 (0x000000)
Packit 40b132
   }
Packit 40b132
}
Packit 40b132
]
Packit 40b132
\-\-> [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 16 03 00 00  44                                   |\&.\&.\&.\&.D
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 68 (0x44)
Packit 40b132
   handshake {
Packit 40b132
   0: 10 00 00 40                                      |\&.\&.\&.@
Packit 40b132
   type = 16 (client_key_exchange)
Packit 40b132
   length = 64 (0x000040)
Packit 40b132
         ClientKeyExchange {
Packit 40b132
            message = {\&.\&.\&.}
Packit 40b132
         }
Packit 40b132
   }
Packit 40b132
}
Packit 40b132
]
Packit 40b132
\-\-> [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 14 03 00 00  01                                   |\&.\&.\&.\&.\&.
Packit 40b132
   type    = 20 (change_cipher_spec)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 1 (0x1)
Packit 40b132
   0: 01                                               |\&.
Packit 40b132
}
Packit 40b132
SSLRecord {
Packit 40b132
   0: 16 03 00 00  38                                   |\&.\&.\&.\&.8
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 56 (0x38)
Packit 40b132
               < encrypted >
Packit 40b132
Packit 40b132
}
Packit 40b132
]
Packit 40b132
<\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 14 03 00 00  01                                   |\&.\&.\&.\&.\&.
Packit 40b132
   type    = 20 (change_cipher_spec)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 1 (0x1)
Packit 40b132
   0: 01                                               |\&.
Packit 40b132
}
Packit 40b132
]
Packit 40b132
<\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 16 03 00 00  38                                   |\&.\&.\&.\&.8
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 56 (0x38)
Packit 40b132
                  < encrypted >
Packit 40b132
Packit 40b132
}
Packit 40b132
]
Packit 40b132
\-\-> [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 17 03 00 01  1f                                   |\&.\&.\&.\&.\&.
Packit 40b132
   type    = 23 (application_data)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 287 (0x11f)
Packit 40b132
               < encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
<\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   0: 17 03 00 00  a0                                   |\&.\&.\&.\&.
Packit 40b132
   type    = 23 (application_data)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 160 (0xa0)
Packit 40b132
               < encrypted >
Packit 40b132
Packit 40b132
}
Packit 40b132
]
Packit 40b132
<\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
0: 17 03 00 00  df                                   |\&.\&.\&.\&.\(ss
Packit 40b132
   type    = 23 (application_data)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 223 (0xdf)
Packit 40b132
               < encrypted >
Packit 40b132
Packit 40b132
}
Packit 40b132
SSLRecord {
Packit 40b132
   0: 15 03 00 00  12                                   |\&.\&.\&.\&.\&.
Packit 40b132
   type    = 21 (alert)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 18 (0x12)
Packit 40b132
               < encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
Server socket closed\&.
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Example 2
Packit 40b132
.PP
Packit 40b132
The \-s option turns on SSL parsing\&. Because the \-x option is not used in this example, undecoded values are output as raw data\&. The output is routed to a text file\&.
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
$ ssltap \-s  \-p 444 interzone\&.mcom\&.com:443 > s\&.txt
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Output
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
Connected to interzone\&.mcom\&.com:443
Packit 40b132
\-\-> [
Packit 40b132
alloclen = 63 bytes
Packit 40b132
   [ssl2]  ClientHelloV2 {
Packit 40b132
            version = {0x03, 0x00}
Packit 40b132
            cipher\-specs\-length = 36 (0x24)
Packit 40b132
            sid\-length = 0 (0x00)
Packit 40b132
            challenge\-length = 16 (0x10)
Packit 40b132
            cipher\-suites = {
Packit 40b132
                  (0x010080) SSL2/RSA/RC4\-128/MD5
Packit 40b132
                  (0x020080) SSL2/RSA/RC4\-40/MD5
Packit 40b132
                  (0x030080) SSL2/RSA/RC2CBC128/MD5
Packit 40b132
                  (0x060040) SSL2/RSA/DES64CBC/MD5
Packit 40b132
                  (0x0700c0) SSL2/RSA/3DES192EDE\-CBC/MD5
Packit 40b132
                  (0x000004) SSL3/RSA/RC4\-128/MD5
Packit 40b132
                  (0x00ffe0) SSL3/RSA\-FIPS/3DES192EDE\-CBC/SHA
Packit 40b132
                  (0x00000a) SSL3/RSA/3DES192EDE\-CBC/SHA
Packit 40b132
                  (0x00ffe1) SSL3/RSA\-FIPS/DES64CBC/SHA
Packit 40b132
                  (0x000009) SSL3/RSA/DES64CBC/SHA
Packit 40b132
                  (0x000003) SSL3/RSA/RC4\-40/MD5
Packit 40b132
                  }
Packit 40b132
               session\-id = { }
Packit 40b132
            challenge = { 0x713c 0x9338 0x30e1 0xf8d6 0xb934 0x7351 0x200c
Packit 40b132
0x3fd0 }
Packit 40b132
]
Packit 40b132
>\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 997 (0x3e5)
Packit 40b132
   handshake {
Packit 40b132
         type = 2 (server_hello)
Packit 40b132
         length = 70 (0x000046)
Packit 40b132
            ServerHello {
Packit 40b132
            server_version = {3, 0}
Packit 40b132
            random = {\&.\&.\&.}
Packit 40b132
            session ID = {
Packit 40b132
               length = 32
Packit 40b132
               contents = {\&.\&.}
Packit 40b132
               }
Packit 40b132
               cipher_suite = (0x0003) SSL3/RSA/RC4\-40/MD5
Packit 40b132
            }
Packit 40b132
         type = 11 (certificate)
Packit 40b132
         length = 709 (0x0002c5)
Packit 40b132
            CertificateChain {
Packit 40b132
               chainlength = 706 (0x02c2)
Packit 40b132
               Certificate {
Packit 40b132
                  size = 703 (0x02bf)
Packit 40b132
                  data = { saved in file \*(Aqcert\&.001\*(Aq }
Packit 40b132
               }
Packit 40b132
            }
Packit 40b132
         type = 12 (server_key_exchange)
Packit 40b132
         length = 202 (0x0000ca)
Packit 40b132
         type = 14 (server_hello_done)
Packit 40b132
         length = 0 (0x000000)
Packit 40b132
   }
Packit 40b132
}
Packit 40b132
]
Packit 40b132
\-\-> [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 68 (0x44)
Packit 40b132
   handshake {
Packit 40b132
         type = 16 (client_key_exchange)
Packit 40b132
         length = 64 (0x000040)
Packit 40b132
            ClientKeyExchange {
Packit 40b132
               message = {\&.\&.\&.}
Packit 40b132
            }
Packit 40b132
   }
Packit 40b132
}
Packit 40b132
]
Packit 40b132
\-\-> [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 20 (change_cipher_spec)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 1 (0x1)
Packit 40b132
}
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 56 (0x38)
Packit 40b132
               > encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
>\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 20 (change_cipher_spec)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 1 (0x1)
Packit 40b132
}
Packit 40b132
]
Packit 40b132
>\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 22 (handshake)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 56 (0x38)
Packit 40b132
               > encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
\-\-> [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 23 (application_data)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 287 (0x11f)
Packit 40b132
               > encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
[
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 23 (application_data)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 160 (0xa0)
Packit 40b132
               > encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
>\-\- [
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 23 (application_data)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 223 (0xdf)
Packit 40b132
               > encrypted >
Packit 40b132
}
Packit 40b132
SSLRecord {
Packit 40b132
   type    = 21 (alert)
Packit 40b132
   version = { 3,0 }
Packit 40b132
   length  = 18 (0x12)
Packit 40b132
               > encrypted >
Packit 40b132
}
Packit 40b132
]
Packit 40b132
Server socket closed\&.
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Example 3
Packit 40b132
.PP
Packit 40b132
In this example, the \-h option turns hex/ASCII format\&. There is no SSL parsing or decoding\&. The output is routed to a text file\&.
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
$ ssltap \-h  \-p 444 interzone\&.mcom\&.com:443 > h\&.txt
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Output
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
Connected to interzone\&.mcom\&.com:443
Packit 40b132
\-\-> [
Packit 40b132
   0: 80 40 01 03  00 00 27 00  00 00 10 01  00 80 02 00  | \&.@\&.\&.\&.\&.\*(Aq\&.\&.\&.\&.\&.\&.\&.\&.\&.
Packit 40b132
   10: 80 03 00 80  04 00 80 06  00 40 07 00  c0 00 00 04  | \&.\&.\&.\&.\&.\&.\&.\&.\&.@\&.\&.\&.\&.\&.\&.
Packit 40b132
   20: 00 ff e0 00  00 0a 00 ff  e1 00 00 09  00 00 03 00  | \&.\&.\&.\&.\&.\&.\&.\&.\('a\&.\&.\&.\&.\&.\&.\&.
Packit 40b132
   30: 00 06 9b fe  5b 56 96 49  1f 9f ca dd  d5 ba b9 52  | \&.\&.\(Tp[V\&.I\&.\exd9 \&.\&.\&.\(Om\(S1R
Packit 40b132
   40: 6f 2d                                            |o\-
Packit 40b132
]
Packit 40b132
<\-\- [
Packit 40b132
   0: 16 03 00 03  e5 02 00 00  46 03 00 7f  e5 0d 1b 1d  | \&.\&.\&.\&.\&.\&.\&.\&.F\&.\&.\&.\&.\&.\&.\&.
Packit 40b132
   10: 68 7f 3a 79  60 d5 17 3c  1d 9c 96 b3  88 d2 69 3b  | h\&.:y`\&.\&.<\&.\&.\(S3\&.\(`Oi;
Packit 40b132
   20: 78 e2 4b 8b  a6 52 12 4b  46 e8 c2 20  14 11 89 05  | x\&.K\&.\(bbR\&.KF\(`e\&. \&.\&.\&.
Packit 40b132
   30: 4d 52 91 fd  93 e0 51 48  91 90 08 96  c1 b6 76 77  | MR\&.\('y\&.\&.QH\&.\&.\&.\&.\&.\(psvw
Packit 40b132
   40: 2a f4 00 08  a1 06 61 a2  64 1f 2e 9b  00 03 00 0b  | *\(^o\&.\&.\(r!\&.a\(ctd\&.\&.\&.\&.\&.\&.
Packit 40b132
   50: 00 02 c5 00  02 c2 00 02  bf 30 82 02  bb 30 82 02  | \&.\&.\(oA\&.\&.\&.\&.\&.\&.0\&.\&.\&.0\&.\&.
Packit 40b132
   60: 24 a0 03 02  01 02 02 02  01 36 30 0d  06 09 2a 86  | $ \&.\&.\&.\&.\&.\&.\&.60\&.\&.\&.*\&.
Packit 40b132
   70: 48 86 f7 0d  01 01 04 05  00 30 77 31  0b 30 09 06  | H\&.\(di\&.\&.\&.\&.\&.\&.0w1\&.0\&.\&.
Packit 40b132
   80: 03 55 04 06  13 02 55 53  31 2c 30 2a  06 03 55 04  | \&.U\&.\&.\&.\&.US1,0*\&.\&.U\&.
Packit 40b132
   90: 0a 13 23 4e  65 74 73 63  61 70 65 20  43 6f 6d 6d  | \&.\&.#Netscape Comm
Packit 40b132
   a0: 75 6e 69 63  61 74 69 6f  6e 73 20 43  6f 72 70 6f  | unications Corpo
Packit 40b132
   b0: 72 61 74 69  6f 6e 31 11  30 0f 06 03  55 04 0b 13  | ration1\&.0\&.\&.\&.U\&.\&.\&.
Packit 40b132
   c0: 08 48 61 72  64 63 6f 72  65 31 27 30  25 06 03 55  | \&.Hardcore1\*(Aq0%\&.\&.U
Packit 40b132
   d0: 04 03 13 1e  48 61 72 64  63 6f 72 65  20 43 65 72  | \&.\&.\&.\&.Hardcore Cer
Packit 40b132
   e0: 74 69 66 69  63 61 74 65  20 53 65 72  76 65 72 20  | tificate Server
Packit 40b132
   f0: 49 49 30 1e  17 0d 39 38  30 35 31 36  30 31 30 33  | II0\&.\&.\&.9805160103
Packit 40b132
<additional data lines>
Packit 40b132
]
Packit 40b132
<additional records in same format>
Packit 40b132
Server socket closed\&.
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Example 4
Packit 40b132
.PP
Packit 40b132
In this example, the \-s option turns on SSL parsing, and the \-h option turns on hex/ASCII format\&. Both formats are shown for each record\&. The output is routed to a text file\&.
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
$ ssltap \-hs \-p 444 interzone\&.mcom\&.com:443 > hs\&.txt
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.PP
Packit 40b132
Output
Packit 40b132
.sp
Packit 40b132
.if n \{\
Packit 40b132
.RS 4
Packit 40b132
.\}
Packit 40b132
.nf
Packit 40b132
Connected to interzone\&.mcom\&.com:443
Packit 40b132
\-\-> [
Packit 40b132
   0: 80 3d 01 03  00 00 24 00  00 00 10 01  00 80 02 00  | \&.=\&.\&.\&.\&.$\&.\&.\&.\&.\&.\&.\&.\&.\&.
Packit 40b132
   10: 80 03 00 80  04 00 80 06  00 40 07 00  c0 00 00 04  | \&.\&.\&.\&.\&.\&.\&.\&.\&.@\&.\&.\&.\&.\&.\&.
Packit 40b132
   20: 00 ff e0 00  00 0a 00 ff  e1 00 00 09  00 00 03 03  | \&.\&.\&.\&.\&.\&.\&.\&.\('a\&.\&.\&.\&.\&.\&.\&.
Packit 40b132
   30: 55 e6 e4 99  79 c7 d7 2c  86 78 96 5d  b5 cf e9     |U\&.\&.y\(,C\exb0 ,\&.x\&.]\(mc\(:I\('e
Packit 40b132
alloclen = 63 bytes
Packit 40b132
   [ssl2]  ClientHelloV2 {
Packit 40b132
            version = {0x03, 0x00}
Packit 40b132
            cipher\-specs\-length = 36 (0x24)
Packit 40b132
            sid\-length = 0 (0x00)
Packit 40b132
            challenge\-length = 16 (0x10)
Packit 40b132
            cipher\-suites = {
Packit 40b132
                  (0x010080) SSL2/RSA/RC4\-128/MD5
Packit 40b132
                  (0x020080) SSL2/RSA/RC4\-40/MD5
Packit 40b132
                  (0x030080) SSL2/RSA/RC2CBC128/MD5
Packit 40b132
                  (0x040080) SSL2/RSA/RC2CBC40/MD5
Packit 40b132
                  (0x060040) SSL2/RSA/DES64CBC/MD5
Packit 40b132
                  (0x0700c0) SSL2/RSA/3DES192EDE\-CBC/MD5
Packit 40b132
                  (0x000004) SSL3/RSA/RC4\-128/MD5
Packit 40b132
                  (0x00ffe0) SSL3/RSA\-FIPS/3DES192EDE\-CBC/SHA
Packit 40b132
                  (0x00000a) SSL3/RSA/3DES192EDE\-CBC/SHA
Packit 40b132
                  (0x00ffe1) SSL3/RSA\-FIPS/DES64CBC/SHA
Packit 40b132
                  (0x000009) SSL3/RSA/DES64CBC/SHA
Packit 40b132
                  (0x000003) SSL3/RSA/RC4\-40/MD5
Packit 40b132
                  }
Packit 40b132
            session\-id = { }
Packit 40b132
            challenge = { 0x0355 0xe6e4 0x9979 0xc7d7 0x2c86 0x7896 0x5db
Packit 40b132
Packit 40b132
0xcfe9 }
Packit 40b132
}
Packit 40b132
]
Packit 40b132
<additional records in same formats>
Packit 40b132
Server socket closed\&.
Packit 40b132
.fi
Packit 40b132
.if n \{\
Packit 40b132
.RE
Packit 40b132
.\}
Packit 40b132
.SH "USAGE TIPS"
Packit 40b132
.PP
Packit 40b132
When SSL restarts a previous session, it makes use of cached information to do a partial handshake\&. If you wish to capture a full SSL handshake, restart the browser to clear the session id cache\&.
Packit 40b132
.PP
Packit 40b132
If you run the tool on a machine other than the SSL server to which you are trying to connect, the browser will complain that the host name you are trying to connect to is different from the certificate\&. If you are using the default BadCert callback, you can still connect through a dialog\&. If you are not using the default BadCert callback, the one you supply must allow for this possibility\&.
Packit 40b132
.SH "SEE ALSO"
Packit 40b132
.PP
Packit 40b132
The NSS Security Tools are also documented at
Packit 40b132
\m[blue]\fBhttp://www\&.mozilla\&.org/projects/security/pki/nss/\fR\m[]\&\s-2\u[2]\d\s+2\&.
Packit 40b132
.SH "ADDITIONAL RESOURCES"
Packit 40b132
.PP
Packit 40b132
For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at
Packit 40b132
\m[blue]\fBhttp://www\&.mozilla\&.org/projects/security/pki/nss/\fR\m[]\&. The NSS site relates directly to NSS code changes and releases\&.
Packit 40b132
.PP
Packit 40b132
Mailing lists: https://lists\&.mozilla\&.org/listinfo/dev\-tech\-crypto
Packit 40b132
.PP
Packit 40b132
IRC: Freenode at #dogtag\-pki
Packit 40b132
.SH "AUTHORS"
Packit 40b132
.PP
Packit 40b132
The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google\&.
Packit 40b132
.PP
Packit 40b132
Authors: Elio Maldonado <emaldona@redhat\&.com>, Deon Lackey <dlackey@redhat\&.com>\&.
Packit 40b132
.SH "LICENSE"
Packit 40b132
.PP
Packit 40b132
Licensed under the Mozilla Public License, v\&. 2\&.0\&. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla\&.org/MPL/2\&.0/\&.
Packit 40b132
.SH "NOTES"
Packit 40b132
.IP " 1." 4
Packit 40b132
Mozilla NSS bug 836477
Packit 40b132
.RS 4
Packit 40b132
\%https://bugzilla.mozilla.org/show_bug.cgi?id=836477
Packit 40b132
.RE
Packit 40b132
.IP " 2." 4
Packit 40b132
http://www.mozilla.org/projects/security/pki/nss/
Packit 40b132
.RS 4
Packit 40b132
\%http://www.mozilla.org/projects/security/pki/nss/tools
Packit 40b132
.RE