Skip to content

How to write your own covert channel

SimonKadel edited this page Apr 7, 2014 · 2 revisions

You have your own idea for a covert channel? We tried to make it easy to use other covert channels in our framework. These instructions should help you to use your covert channel with the Whisper Library.

1. Prepare your project

You need the library and the headers. Download and compile the project as described in Compiling instructions.

2. Implement the covert channel interface

Create a new class which inherits from CovertChannel and implements all virtual functions. Make sure all functions are implemented. Your class should look similar to this:

#include <covertchannel.hpp>
....// other includes

class MyCovertChannel : public CovertChannel {

public std::string getId(){
	return "my_covert_channel_ID";
}

... //other functions

}

It is important that getId() returns an unique identifier. This is used to select the covert channel in the next step.

3. Add and select the channel

Now you need to tell the library that there is a new covert channel. You can do this by calling

ChannelManager::addCovertChannel(CovertChannel*).

After that, you need to select your channel. This can be done by calling

ChannelManager::selectCovertChannel(std::string ID)

In your program it may look like this:

#include <channelmanager.hpp>
#include <mycovertchannel.hpp>

...
whisper_library::ChannelManager cm;
cm.addCovertChannel(new MyCovertChannel());
cm.selectCovertChannel("my_covert_channel_ID");
...
... // send messages etc.

For more information about how to use the ChannelManager see How to use the library

Clone this wiki locally