Tutorial: Internet Relay Chat (IRC)

This tutorial discusses the plugin ircDecode.


Before we start we need to prepare T2. If you did not complete the tutorials before just follow the procedure described below.

First I recommend to set T2 into a pristine state by removing all unnecessary or older plugins from the default plugin folder ~/.tranalyzer/plugins. Just as a precaution if you have some old plugins or files there. If you like to keep them, please copy them away.

$ t2build -e
Are you sure you want to empty the plugin folder '/home/wurst/.tranalyzer/plugins' (y/N)? y
Plugin folder emptied

Then compile the following plugins

$ t2build tranalyzer2 basicFlow ircDecode txtSink


If you did not create a separate data and results directory yet, please do it now in another cmd window, it facilitates your workflow:

$ mkdir ~/data ~/results

Download the sample pcap here: . Now you’re all set.


Let’s look at the plugin configuration first:

$ ircDecode
$ vi src/ircDecode.h

Run t2 on the supplied pcap.

$ t2 -r ~/data/ -w ~/results/ -s

So the aggregated ircStat tells us there is IRC.

$ tawk -V ircStat
The ircStat column is to be interpreted as follows:

   bit | ircStat | Description
     0 | 0x01    | IRC port found
     1 | 0x02    | IRC registration successful
     2 | 0x04    | IRC password incorrect
     3 | 0x08    | -
     4 | 0x10    | Unrecognized IRC command
     5 | 0x20    | File error (IRC_SAVE == 1)
     6 | 0x40    | Array, string or filename overflow
     7 | 0x80    | Invalid format or parsing error
$ cd ~/results
$ tcol

Don’t forget to reset the plugin configuration for the next tutorial.

$ t2conf ircDecode --reset && t2build ircDecode

Have fun analyzing.