security/nss/doc/ssltap.xml

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <?xml version="1.0" encoding="UTF-8"?>
michael@0 2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
michael@0 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
michael@0 4 <!ENTITY date SYSTEM "date.xml">
michael@0 5 <!ENTITY version SYSTEM "version.xml">
michael@0 6 ]>
michael@0 7
michael@0 8 <refentry id="ssltap">
michael@0 9
michael@0 10 <refentryinfo>
michael@0 11 <date>&date;</date>
michael@0 12 <title>NSS Security Tools</title>
michael@0 13 <productname>nss-tools</productname>
michael@0 14 <productnumber>&version;</productnumber>
michael@0 15 </refentryinfo>
michael@0 16
michael@0 17 <refmeta>
michael@0 18 <refentrytitle>SSLTAP</refentrytitle>
michael@0 19 <manvolnum>1</manvolnum>
michael@0 20 </refmeta>
michael@0 21
michael@0 22 <refnamediv>
michael@0 23 <refname>ssltap</refname>
michael@0 24 <refpurpose>Tap into SSL connections and display the data going by </refpurpose>
michael@0 25 </refnamediv>
michael@0 26
michael@0 27 <refsynopsisdiv>
michael@0 28 <cmdsynopsis>
michael@0 29 <command>ssltap</command>
michael@0 30 <arg choice="opt">-fhlsvx</arg>
michael@0 31 <arg choice="opt">-p port</arg>
michael@0 32 <arg choice="opt">hostname:port</arg>
michael@0 33 </cmdsynopsis>
michael@0 34 </refsynopsisdiv>
michael@0 35
michael@0 36 <refsection>
michael@0 37 <title>STATUS</title>
michael@0 38 <para>This documentation is still work in progress. Please contribute to the initial review in <ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=836477">Mozilla NSS bug 836477</ulink>
michael@0 39 </para>
michael@0 40 </refsection>
michael@0 41
michael@0 42 <refsection id="description">
michael@0 43 <title>Description</title>
michael@0 44 <para>The SSL Debugging Tool <command>ssltap</command> 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</para>
michael@0 45 </refsection>
michael@0 46
michael@0 47 <refsection id="options">
michael@0 48 <title>Options</title>
michael@0 49 <variablelist>
michael@0 50 <varlistentry>
michael@0 51 <term>-f </term>
michael@0 52 <listitem><para>
michael@0 53 Turn on fancy printing. Output is printed in colored HTML. Data sent from the client to the server is in blue; the server's 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.
michael@0 54 </para></listitem>
michael@0 55 </varlistentry>
michael@0 56 <varlistentry>
michael@0 57 <term>-h </term>
michael@0 58 <listitem><para>
michael@0 59 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.
michael@0 60 </para></listitem>
michael@0 61 </varlistentry>
michael@0 62 <varlistentry>
michael@0 63 <term>-l prefix</term>
michael@0 64 <listitem>
michael@0 65 <para>
michael@0 66 Turn on looping; that is, continue to accept connections rather than stopping after the first connection is complete.
michael@0 67 </para>
michael@0 68 </listitem>
michael@0 69 </varlistentry>
michael@0 70 <varlistentry>
michael@0 71 <term>-p port</term>
michael@0 72 <listitem>
michael@0 73 <para>Change the default rendezvous port (1924) to another port.</para>
michael@0 74 <para>The following are well-known port numbers:</para>
michael@0 75 <para>
michael@0 76 * HTTP 80
michael@0 77 </para>
michael@0 78 <para>
michael@0 79 * HTTPS 443
michael@0 80 </para>
michael@0 81 <para>
michael@0 82 * SMTP 25
michael@0 83 </para>
michael@0 84 <para>
michael@0 85 * FTP 21
michael@0 86 </para>
michael@0 87 <para>
michael@0 88 * IMAP 143
michael@0 89 </para>
michael@0 90 <para>
michael@0 91 * IMAPS 993 (IMAP over SSL)
michael@0 92 </para>
michael@0 93 <para>
michael@0 94 * NNTP 119
michael@0 95 </para>
michael@0 96 <para>
michael@0 97 * NNTPS 563 (NNTP over SSL)
michael@0 98 </para>
michael@0 99 </listitem>
michael@0 100 </varlistentry>
michael@0 101 <varlistentry>
michael@0 102 <term>-s </term>
michael@0 103 <listitem>
michael@0 104 <para>
michael@0 105 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.
michael@0 106 </para>
michael@0 107 <para>
michael@0 108 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.
michael@0 109 </para>
michael@0 110 <para>
michael@0 111 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.
michael@0 112 </para>
michael@0 113 </listitem>
michael@0 114 </varlistentry>
michael@0 115 <varlistentry>
michael@0 116 <term>-v </term>
michael@0 117 <listitem><para>Print a version string for the tool.</para></listitem>
michael@0 118 </varlistentry>
michael@0 119 <varlistentry>
michael@0 120 <term>-x </term>
michael@0 121 <listitem><para>Turn on extra SSL hex dumps.</para></listitem>
michael@0 122 </varlistentry>
michael@0 123 </variablelist>
michael@0 124 </refsection>
michael@0 125
michael@0 126 <refsection id="basic-usage">
michael@0 127 <title>Usage and Examples</title>
michael@0 128 <para>
michael@0 129 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:
michael@0 130 </para>
michael@0 131 <programlisting>$ ssltap www.netscape.com</programlisting>
michael@0 132 <para>
michael@0 133 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:
michael@0 134 "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
michael@0 135 continue to accept connections, switch on looping mode with the -l option. The following examples show the output from commonly used combinations of options.
michael@0 136 </para>
michael@0 137
michael@0 138 <para>Example 1 </para>
michael@0 139 <programlisting>$ ssltap.exe -sx -p 444 interzone.mcom.com:443 > sx.txt</programlisting>
michael@0 140 <para>Output </para>
michael@0 141 <programlisting>
michael@0 142 Connected to interzone.mcom.com:443
michael@0 143 -->; [
michael@0 144 alloclen = 66 bytes
michael@0 145 [ssl2] ClientHelloV2 {
michael@0 146 version = {0x03, 0x00}
michael@0 147 cipher-specs-length = 39 (0x27)
michael@0 148 sid-length = 0 (0x00)
michael@0 149 challenge-length = 16 (0x10)
michael@0 150 cipher-suites = {
michael@0 151
michael@0 152 (0x010080) SSL2/RSA/RC4-128/MD5
michael@0 153 (0x020080) SSL2/RSA/RC4-40/MD5
michael@0 154 (0x030080) SSL2/RSA/RC2CBC128/MD5
michael@0 155 (0x040080) SSL2/RSA/RC2CBC40/MD5
michael@0 156 (0x060040) SSL2/RSA/DES64CBC/MD5
michael@0 157 (0x0700c0) SSL2/RSA/3DES192EDE-CBC/MD5
michael@0 158 (0x000004) SSL3/RSA/RC4-128/MD5
michael@0 159 (0x00ffe0) SSL3/RSA-FIPS/3DES192EDE-CBC/SHA
michael@0 160 (0x00000a) SSL3/RSA/3DES192EDE-CBC/SHA
michael@0 161 (0x00ffe1) SSL3/RSA-FIPS/DES64CBC/SHA
michael@0 162 (0x000009) SSL3/RSA/DES64CBC/SHA
michael@0 163 (0x000003) SSL3/RSA/RC4-40/MD5
michael@0 164 (0x000006) SSL3/RSA/RC2CBC40/MD5
michael@0 165 }
michael@0 166 session-id = { }
michael@0 167 challenge = { 0xec5d 0x8edb 0x37c9 0xb5c9 0x7b70 0x8fe9 0xd1d3
michael@0 168
michael@0 169 0x2592 }
michael@0 170 }
michael@0 171 ]
michael@0 172 &lt;-- [
michael@0 173 SSLRecord {
michael@0 174 0: 16 03 00 03 e5 |.....
michael@0 175 type = 22 (handshake)
michael@0 176 version = { 3,0 }
michael@0 177 length = 997 (0x3e5)
michael@0 178 handshake {
michael@0 179 0: 02 00 00 46 |...F
michael@0 180 type = 2 (server_hello)
michael@0 181 length = 70 (0x000046)
michael@0 182 ServerHello {
michael@0 183 server_version = {3, 0}
michael@0 184 random = {...}
michael@0 185 0: 77 8c 6e 26 6c 0c ec c0 d9 58 4f 47 d3 2d 01 45 |
michael@0 186 wn&amp;l.ì..XOG.-.E
michael@0 187 10: 5c 17 75 43 a7 4c 88 c7 88 64 3c 50 41 48 4f 7f |
michael@0 188
michael@0 189 \.uC§L.Ç.d&lt;PAHO.
michael@0 190 session ID = {
michael@0 191 length = 32
michael@0 192
michael@0 193 contents = {..}
michael@0 194 0: 14 11 07 a8 2a 31 91 29 11 94 40 37 57 10 a7 32 | ...¨*1.)..@7W.§2
michael@0 195 10: 56 6f 52 62 fe 3d b3 65 b1 e4 13 0f 52 a3 c8 f6 | VoRbþ=³e±...R£È.
michael@0 196 }
michael@0 197 cipher_suite = (0x0003) SSL3/RSA/RC4-40/MD5
michael@0 198 }
michael@0 199 0: 0b 00 02 c5 |...Å
michael@0 200 type = 11 (certificate)
michael@0 201 length = 709 (0x0002c5)
michael@0 202 CertificateChain {
michael@0 203 chainlength = 706 (0x02c2)
michael@0 204 Certificate {
michael@0 205 size = 703 (0x02bf)
michael@0 206 data = { saved in file 'cert.001' }
michael@0 207 }
michael@0 208 }
michael@0 209 0: 0c 00 00 ca |....
michael@0 210 type = 12 (server_key_exchange)
michael@0 211 length = 202 (0x0000ca)
michael@0 212 0: 0e 00 00 00 |....
michael@0 213 type = 14 (server_hello_done)
michael@0 214 length = 0 (0x000000)
michael@0 215 }
michael@0 216 }
michael@0 217 ]
michael@0 218 --> [
michael@0 219 SSLRecord {
michael@0 220 0: 16 03 00 00 44 |....D
michael@0 221 type = 22 (handshake)
michael@0 222 version = { 3,0 }
michael@0 223 length = 68 (0x44)
michael@0 224 handshake {
michael@0 225 0: 10 00 00 40 |...@
michael@0 226 type = 16 (client_key_exchange)
michael@0 227 length = 64 (0x000040)
michael@0 228 ClientKeyExchange {
michael@0 229 message = {...}
michael@0 230 }
michael@0 231 }
michael@0 232 }
michael@0 233 ]
michael@0 234 --> [
michael@0 235 SSLRecord {
michael@0 236 0: 14 03 00 00 01 |.....
michael@0 237 type = 20 (change_cipher_spec)
michael@0 238 version = { 3,0 }
michael@0 239 length = 1 (0x1)
michael@0 240 0: 01 |.
michael@0 241 }
michael@0 242 SSLRecord {
michael@0 243 0: 16 03 00 00 38 |....8
michael@0 244 type = 22 (handshake)
michael@0 245 version = { 3,0 }
michael@0 246 length = 56 (0x38)
michael@0 247 &lt; encrypted >
michael@0 248
michael@0 249 }
michael@0 250 ]
michael@0 251 &lt;-- [
michael@0 252 SSLRecord {
michael@0 253 0: 14 03 00 00 01 |.....
michael@0 254 type = 20 (change_cipher_spec)
michael@0 255 version = { 3,0 }
michael@0 256 length = 1 (0x1)
michael@0 257 0: 01 |.
michael@0 258 }
michael@0 259 ]
michael@0 260 &lt;-- [
michael@0 261 SSLRecord {
michael@0 262 0: 16 03 00 00 38 |....8
michael@0 263 type = 22 (handshake)
michael@0 264 version = { 3,0 }
michael@0 265 length = 56 (0x38)
michael@0 266 &lt; encrypted >
michael@0 267
michael@0 268 }
michael@0 269 ]
michael@0 270 --> [
michael@0 271 SSLRecord {
michael@0 272 0: 17 03 00 01 1f |.....
michael@0 273 type = 23 (application_data)
michael@0 274 version = { 3,0 }
michael@0 275 length = 287 (0x11f)
michael@0 276 &lt; encrypted >
michael@0 277 }
michael@0 278 ]
michael@0 279 &lt;-- [
michael@0 280 SSLRecord {
michael@0 281 0: 17 03 00 00 a0 |....
michael@0 282 type = 23 (application_data)
michael@0 283 version = { 3,0 }
michael@0 284 length = 160 (0xa0)
michael@0 285 &lt; encrypted >
michael@0 286
michael@0 287 }
michael@0 288 ]
michael@0 289 &lt;-- [
michael@0 290 SSLRecord {
michael@0 291 0: 17 03 00 00 df |....ß
michael@0 292 type = 23 (application_data)
michael@0 293 version = { 3,0 }
michael@0 294 length = 223 (0xdf)
michael@0 295 &lt; encrypted >
michael@0 296
michael@0 297 }
michael@0 298 SSLRecord {
michael@0 299 0: 15 03 00 00 12 |.....
michael@0 300 type = 21 (alert)
michael@0 301 version = { 3,0 }
michael@0 302 length = 18 (0x12)
michael@0 303 &lt; encrypted >
michael@0 304 }
michael@0 305 ]
michael@0 306 Server socket closed.
michael@0 307 </programlisting>
michael@0 308
michael@0 309
michael@0 310 <para>Example 2</para>
michael@0 311 <para>
michael@0 312 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.
michael@0 313 </para>
michael@0 314 <programlisting>$ ssltap -s -p 444 interzone.mcom.com:443 > s.txt</programlisting>
michael@0 315 <para>Output </para>
michael@0 316 <programlisting>
michael@0 317 Connected to interzone.mcom.com:443
michael@0 318 --> [
michael@0 319 alloclen = 63 bytes
michael@0 320 [ssl2] ClientHelloV2 {
michael@0 321 version = {0x03, 0x00}
michael@0 322 cipher-specs-length = 36 (0x24)
michael@0 323 sid-length = 0 (0x00)
michael@0 324 challenge-length = 16 (0x10)
michael@0 325 cipher-suites = {
michael@0 326 (0x010080) SSL2/RSA/RC4-128/MD5
michael@0 327 (0x020080) SSL2/RSA/RC4-40/MD5
michael@0 328 (0x030080) SSL2/RSA/RC2CBC128/MD5
michael@0 329 (0x060040) SSL2/RSA/DES64CBC/MD5
michael@0 330 (0x0700c0) SSL2/RSA/3DES192EDE-CBC/MD5
michael@0 331 (0x000004) SSL3/RSA/RC4-128/MD5
michael@0 332 (0x00ffe0) SSL3/RSA-FIPS/3DES192EDE-CBC/SHA
michael@0 333 (0x00000a) SSL3/RSA/3DES192EDE-CBC/SHA
michael@0 334 (0x00ffe1) SSL3/RSA-FIPS/DES64CBC/SHA
michael@0 335 (0x000009) SSL3/RSA/DES64CBC/SHA
michael@0 336 (0x000003) SSL3/RSA/RC4-40/MD5
michael@0 337 }
michael@0 338 session-id = { }
michael@0 339 challenge = { 0x713c 0x9338 0x30e1 0xf8d6 0xb934 0x7351 0x200c
michael@0 340 0x3fd0 }
michael@0 341 ]
michael@0 342 &gt;-- [
michael@0 343 SSLRecord {
michael@0 344 type = 22 (handshake)
michael@0 345 version = { 3,0 }
michael@0 346 length = 997 (0x3e5)
michael@0 347 handshake {
michael@0 348 type = 2 (server_hello)
michael@0 349 length = 70 (0x000046)
michael@0 350 ServerHello {
michael@0 351 server_version = {3, 0}
michael@0 352 random = {...}
michael@0 353 session ID = {
michael@0 354 length = 32
michael@0 355 contents = {..}
michael@0 356 }
michael@0 357 cipher_suite = (0x0003) SSL3/RSA/RC4-40/MD5
michael@0 358 }
michael@0 359 type = 11 (certificate)
michael@0 360 length = 709 (0x0002c5)
michael@0 361 CertificateChain {
michael@0 362 chainlength = 706 (0x02c2)
michael@0 363 Certificate {
michael@0 364 size = 703 (0x02bf)
michael@0 365 data = { saved in file 'cert.001' }
michael@0 366 }
michael@0 367 }
michael@0 368 type = 12 (server_key_exchange)
michael@0 369 length = 202 (0x0000ca)
michael@0 370 type = 14 (server_hello_done)
michael@0 371 length = 0 (0x000000)
michael@0 372 }
michael@0 373 }
michael@0 374 ]
michael@0 375 --> [
michael@0 376 SSLRecord {
michael@0 377 type = 22 (handshake)
michael@0 378 version = { 3,0 }
michael@0 379 length = 68 (0x44)
michael@0 380 handshake {
michael@0 381 type = 16 (client_key_exchange)
michael@0 382 length = 64 (0x000040)
michael@0 383 ClientKeyExchange {
michael@0 384 message = {...}
michael@0 385 }
michael@0 386 }
michael@0 387 }
michael@0 388 ]
michael@0 389 --> [
michael@0 390 SSLRecord {
michael@0 391 type = 20 (change_cipher_spec)
michael@0 392 version = { 3,0 }
michael@0 393 length = 1 (0x1)
michael@0 394 }
michael@0 395 SSLRecord {
michael@0 396 type = 22 (handshake)
michael@0 397 version = { 3,0 }
michael@0 398 length = 56 (0x38)
michael@0 399 &gt; encrypted >
michael@0 400 }
michael@0 401 ]
michael@0 402 &gt;-- [
michael@0 403 SSLRecord {
michael@0 404 type = 20 (change_cipher_spec)
michael@0 405 version = { 3,0 }
michael@0 406 length = 1 (0x1)
michael@0 407 }
michael@0 408 ]
michael@0 409 &gt;-- [
michael@0 410 SSLRecord {
michael@0 411 type = 22 (handshake)
michael@0 412 version = { 3,0 }
michael@0 413 length = 56 (0x38)
michael@0 414 &gt; encrypted >
michael@0 415 }
michael@0 416 ]
michael@0 417 --> [
michael@0 418 SSLRecord {
michael@0 419 type = 23 (application_data)
michael@0 420 version = { 3,0 }
michael@0 421 length = 287 (0x11f)
michael@0 422 &gt; encrypted >
michael@0 423 }
michael@0 424 ]
michael@0 425 [
michael@0 426 SSLRecord {
michael@0 427 type = 23 (application_data)
michael@0 428 version = { 3,0 }
michael@0 429 length = 160 (0xa0)
michael@0 430 &gt; encrypted >
michael@0 431 }
michael@0 432 ]
michael@0 433 &gt;-- [
michael@0 434 SSLRecord {
michael@0 435 type = 23 (application_data)
michael@0 436 version = { 3,0 }
michael@0 437 length = 223 (0xdf)
michael@0 438 &gt; encrypted >
michael@0 439 }
michael@0 440 SSLRecord {
michael@0 441 type = 21 (alert)
michael@0 442 version = { 3,0 }
michael@0 443 length = 18 (0x12)
michael@0 444 &gt; encrypted >
michael@0 445 }
michael@0 446 ]
michael@0 447 Server socket closed.
michael@0 448 </programlisting>
michael@0 449
michael@0 450 <para>Example 3</para>
michael@0 451 <para>
michael@0 452 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.
michael@0 453 </para>
michael@0 454 <programlisting>$ ssltap -h -p 444 interzone.mcom.com:443 > h.txt</programlisting>
michael@0 455 <para>Output </para>
michael@0 456 <programlisting>
michael@0 457 Connected to interzone.mcom.com:443
michael@0 458 --&gt; [
michael@0 459 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'.........
michael@0 460 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@......
michael@0 461 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á.......
michael@0 462 30: 00 06 9b fe 5b 56 96 49 1f 9f ca dd d5 ba b9 52 | ..þ[V.I.\xd9 ...º¹R
michael@0 463 40: 6f 2d |o-
michael@0 464 ]
michael@0 465 &lt;-- [
michael@0 466 0: 16 03 00 03 e5 02 00 00 46 03 00 7f e5 0d 1b 1d | ........F.......
michael@0 467 10: 68 7f 3a 79 60 d5 17 3c 1d 9c 96 b3 88 d2 69 3b | h.:y`..&lt;..³.Òi;
michael@0 468 20: 78 e2 4b 8b a6 52 12 4b 46 e8 c2 20 14 11 89 05 | x.K.¦R.KFè. ...
michael@0 469 30: 4d 52 91 fd 93 e0 51 48 91 90 08 96 c1 b6 76 77 | MR.ý..QH.....¶vw
michael@0 470 40: 2a f4 00 08 a1 06 61 a2 64 1f 2e 9b 00 03 00 0b | *ô..¡.a¢d......
michael@0 471 50: 00 02 c5 00 02 c2 00 02 bf 30 82 02 bb 30 82 02 | ..Å......0...0..
michael@0 472 60: 24 a0 03 02 01 02 02 02 01 36 30 0d 06 09 2a 86 | $ .......60...*.
michael@0 473 70: 48 86 f7 0d 01 01 04 05 00 30 77 31 0b 30 09 06 | H.÷......0w1.0..
michael@0 474 80: 03 55 04 06 13 02 55 53 31 2c 30 2a 06 03 55 04 | .U....US1,0*..U.
michael@0 475 90: 0a 13 23 4e 65 74 73 63 61 70 65 20 43 6f 6d 6d | ..#Netscape Comm
michael@0 476 a0: 75 6e 69 63 61 74 69 6f 6e 73 20 43 6f 72 70 6f | unications Corpo
michael@0 477 b0: 72 61 74 69 6f 6e 31 11 30 0f 06 03 55 04 0b 13 | ration1.0...U...
michael@0 478 c0: 08 48 61 72 64 63 6f 72 65 31 27 30 25 06 03 55 | .Hardcore1'0%..U
michael@0 479 d0: 04 03 13 1e 48 61 72 64 63 6f 72 65 20 43 65 72 | ....Hardcore Cer
michael@0 480 e0: 74 69 66 69 63 61 74 65 20 53 65 72 76 65 72 20 | tificate Server
michael@0 481 f0: 49 49 30 1e 17 0d 39 38 30 35 31 36 30 31 30 33 | II0...9805160103
michael@0 482 &lt;additional data lines&gt;
michael@0 483 ]
michael@0 484 &lt;additional records in same format&gt;
michael@0 485 Server socket closed.
michael@0 486 </programlisting>
michael@0 487
michael@0 488 <para>Example 4</para>
michael@0 489 <para>
michael@0 490 In this example, the -s option turns on SSL parsing, and the -h option turns on hex/ASCII format.
michael@0 491 Both formats are shown for each record. The output is routed to a text file.
michael@0 492 </para>
michael@0 493 <programlisting>$ ssltap -hs -p 444 interzone.mcom.com:443 > hs.txt</programlisting>
michael@0 494 <para>Output </para>
michael@0 495 <programlisting>
michael@0 496 Connected to interzone.mcom.com:443
michael@0 497 --> [
michael@0 498 0: 80 3d 01 03 00 00 24 00 00 00 10 01 00 80 02 00 | .=....$.........
michael@0 499 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@......
michael@0 500 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 03 | ........á.......
michael@0 501 30: 55 e6 e4 99 79 c7 d7 2c 86 78 96 5d b5 cf e9 |U..yÇ\xb0 ,.x.]µÏé
michael@0 502 alloclen = 63 bytes
michael@0 503 [ssl2] ClientHelloV2 {
michael@0 504 version = {0x03, 0x00}
michael@0 505 cipher-specs-length = 36 (0x24)
michael@0 506 sid-length = 0 (0x00)
michael@0 507 challenge-length = 16 (0x10)
michael@0 508 cipher-suites = {
michael@0 509 (0x010080) SSL2/RSA/RC4-128/MD5
michael@0 510 (0x020080) SSL2/RSA/RC4-40/MD5
michael@0 511 (0x030080) SSL2/RSA/RC2CBC128/MD5
michael@0 512 (0x040080) SSL2/RSA/RC2CBC40/MD5
michael@0 513 (0x060040) SSL2/RSA/DES64CBC/MD5
michael@0 514 (0x0700c0) SSL2/RSA/3DES192EDE-CBC/MD5
michael@0 515 (0x000004) SSL3/RSA/RC4-128/MD5
michael@0 516 (0x00ffe0) SSL3/RSA-FIPS/3DES192EDE-CBC/SHA
michael@0 517 (0x00000a) SSL3/RSA/3DES192EDE-CBC/SHA
michael@0 518 (0x00ffe1) SSL3/RSA-FIPS/DES64CBC/SHA
michael@0 519 (0x000009) SSL3/RSA/DES64CBC/SHA
michael@0 520 (0x000003) SSL3/RSA/RC4-40/MD5
michael@0 521 }
michael@0 522 session-id = { }
michael@0 523 challenge = { 0x0355 0xe6e4 0x9979 0xc7d7 0x2c86 0x7896 0x5db
michael@0 524
michael@0 525 0xcfe9 }
michael@0 526 }
michael@0 527 ]
michael@0 528 &lt;additional records in same formats&gt;
michael@0 529 Server socket closed.
michael@0 530 </programlisting>
michael@0 531
michael@0 532
michael@0 533
michael@0 534 </refsection>
michael@0 535
michael@0 536 <refsection id="usage-tips">
michael@0 537 <title>Usage Tips</title>
michael@0 538 <para>
michael@0 539 When SSL restarts a previous session, it makes use of cached information to do a partial handshake.
michael@0 540 If you wish to capture a full SSL handshake, restart the browser to clear the session id cache.
michael@0 541 </para>
michael@0 542 <para>
michael@0 543 If you run the tool on a machine other than the SSL server to which you are trying to connect,
michael@0 544 the browser will complain that the host name you are trying to connect to is different from the certificate.
michael@0 545 If you are using the default BadCert callback, you can still connect through a dialog. If you are not using
michael@0 546 the default BadCert callback, the one you supply must allow for this possibility.
michael@0 547 </para>
michael@0 548 </refsection>
michael@0 549
michael@0 550 <refsection id="seealso">
michael@0 551 <title>See Also</title>
michael@0 552 <para>The NSS Security Tools are also documented at <ulink url="http://www.mozilla.org/projects/security/pki/nss/tools">http://www.mozilla.org/projects/security/pki/nss/</ulink>.</para>
michael@0 553 </refsection>
michael@0 554
michael@0 555 <!-- don't change -->
michael@0 556 <refsection id="resources">
michael@0 557 <title>Additional Resources</title>
michael@0 558 <para>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <ulink url="http://www.mozilla.org/projects/security/pki/nss/">http://www.mozilla.org/projects/security/pki/nss/</ulink>. The NSS site relates directly to NSS code changes and releases.</para>
michael@0 559 <para>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</para>
michael@0 560 <para>IRC: Freenode at #dogtag-pki</para>
michael@0 561 </refsection>
michael@0 562
michael@0 563 <!-- fill in your name first; keep the other names for reference -->
michael@0 564 <refsection id="authors">
michael@0 565 <title>Authors</title>
michael@0 566 <para>The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</para>
michael@0 567 <para>
michael@0 568 Authors: Elio Maldonado &lt;emaldona@redhat.com>, Deon Lackey &lt;dlackey@redhat.com>.
michael@0 569 </para>
michael@0 570 </refsection>
michael@0 571
michael@0 572 <!-- don't change -->
michael@0 573 <refsection id="license">
michael@0 574 <title>LICENSE</title>
michael@0 575 <para>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/.
michael@0 576 </para>
michael@0 577 </refsection>
michael@0 578
michael@0 579 </refentry>

mercurial