Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Configuring Tomcat and Wireshark to capture and decode SSL communications

Debugging secure communications

Dominic Tulley (dominic.tulley@uk.ibm.com), Leading Architect, DOORS Development Lab, IBM
Photo of Dominic Tulley
Dominic Tulley has more than ten years experience working in server-side Java development, including the intricacies of client-server communication. He is a leading software architect within the IBM DOORS Development lab.

Summary:  Investigating client-server communication issues is troublesome at the best of times, and when the communication is secured with SSL, it becomes much more difficult. This tutorial takes you through the steps involved in configuring Tomcat and Wireshark so that the SSL Dissector in Wireshark can decrypt the captured communication. This allows your investigation to proceed as if SSL was not involved.

Date:  03 Nov 2009
Level:  Introductory PDF:  A4 and Letter (563 KB | 17 pages)Get Adobe® Reader®

Activity:  15460 views
Comments:  

Before you start

Developing a system that involves network communication is extremely common in today’s distributed world. During the development of such a system, a communication problem may arise that is difficult to investigate by instrumenting or debugging your software. At times like this, you can turn to a tool like Wireshark, which captures all the network traffic in your system and lets you read it. This often provides the insight required to resolve your problem. If your system uses SSL to secure communications, then you can capture the network traffic, but it is all encrypted, preventing you, the developer, from gaining any useful information. Fortunately, Wireshark comes with an SSL Dissector that, given the right set of conditions, can decrypt this captured traffic. This tutorial provides a step-by-step guide to setting up those conditions using Tomcat as the server and a Web browser as the client.

Objectives

By the end of this tutorial you will have an understanding of the various conditions that must be met before the Wireshark SSL Dissector can be used. Furthermore, you will be able to arrange for those conditions to be met in a Tomcat installation.

Prerequisites

It is assumed that you have a basic understanding of network communication mechanisms. You don’t need to have experience with Tomcat or Wireshark, although both would be advantageous. In particular, this tutorial does not go into any depth about how to use Wireshark once it has been configured correctly.

Please note: This tutorial is not intended to provide any significant insight into why this set of commands works, nor to give any consideration to the many possible variations on these commands. It is intended to enable you to record and decode network traffic in a development environment. It is important to note that the procedures followed here and some of the cryptographic artifacts generated here are very insecure and should never be applied to a production environment.

System requirements

This tutorial assumes you are using Windows®. To follow this tutorial you will need to install the following (see Resources for download sites):

  • Tomcat 5.5
  • A suitable JVM for Tomcat
  • Wireshark — Version 1.2.2 was used in the development of this tutorial. The Wireshark download must be compiled with GnuTLS and Gcrypt. This can be checked in the "About" window of Wireshark.
  • Cygwin including openssl — Version 0.9.8i of openssl was used in the development of this tutorial.
  • Jetty — Version 6.1.21 was used in the development of this tutorial. Other versions (newer and older) may work, but the location of the required class file within it may have changed.

In addition, you will need a second machine on which you will use a Web browser to access your Tomcat server.

Overview

The following key conditions must be met to allow Wireshark to decrypt a secure connection:

  • Tomcat must be configured with a server certificate.
  • The specific cryptographic cipher used between client and server (browser and tomcat) must be amenable to Wireshark’s method of decrypting.
  • Wireshark must have access to the private key associated with the server certificate.

This tutorial will work through these steps in this order and then, using a browser connecting to the Tomcat server, we will capture a request and response and examine it in Wireshark.

A note on passwords

Through this tutorial you will be asked to define three separate passwords. Each password is carefully named and referred to in the tutorial, but to make life easier, you might like to consider using the same password in all three places.

1 of 7 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Web development, Open source
ArticleID=442704
TutorialTitle=Configuring Tomcat and Wireshark to capture and decode SSL communications
publish-date=11032009
author1-email=dominic.tulley@uk.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.