Skip to content
SimonKadel edited this page Apr 7, 2014 · 15 revisions

Welcome to the whisper-library wiki!

You can find information about what you can do with this project and how you can do it. You should start by compiling the library. See Compiling instructions on how this is done.

Use the library in your own project

See How to use the library for detailed information

Developers can use the library in their own project. You need to link to the library and include the headers. You can find precompiled Packages for Windows and Unix here MISSING LINK. You need to add the library to your path and include the folder "include".

Write your own covert channel

See How to write your own covert channel for more information and an example.

The whisper-library can be extended by adding your own Covert Channels. To do so, you have to implement the interface defined in covertchannel.hpp. Every class implementing this interface can be added to the framework by calling

ChannelManager::addCovertChannel(CovertChannel* channel).

Use the Pidgin plugin

See How to use the Pidgin plugin for detailed information

In this project we have written a Pidgin plugin that uses the whisper-library to send your messages over covert channels. Precompiled versions of the plugin for Windows and Unix can be found here MISSING LINK. Copy these into your plugin folder and restart Pidgin. You should be able to select "Whisper Library" as protocol.

Getting started

Contents

1. Compiling the library
1.1A Compiling the whisper-library on Linux
1.1B Compiling the whisper-library on Windows
2. Using the library in your own projects
2.1 Use a covert channel in your project
2.2 Write your own covert channel
2.3 Further documentation
3. Contributing to the Project
3.1 Code Conventions
3.2 Documentation rules
3.3 Commitment rules

1. Compiling the library

In order to use our whisper-library you first need to have a compiled copy of it on your computer.

1.1A Compiling the whisper-library on Linux

1. Make sure the following programs are installed

1.1 git - or download a copy from the library at https://github.com/UndeadKernel/whisper-library and skip step 2.
	Ubuntu: "sudo apt-get install git"

1.2 cmake
	Ubuntu: "sudo apt-get install cmake"

1.3 gcc and g++
	Ubuntu: "sudo apt-get install g++"

1.4 libcap 1.51 or higher
	in case of configuration or installation problems you might want to look at the INSTALL.txt in the libcap main directory.
	(you might need to install "flex" and "yacc", which is part of the "bison" package, to compile libcap)

	1.4.1 Download the latest version from tcpdump.org and extract it
	1.4.2 switch to extracted folder
	1.4.3 "./configure"
	1.4.4 "make"
	1.4.5 "sudo make install"
	1.4.6 add the current directory either to your system Path variable or set it in the PCAP_ROOT variable.

1.5 Boost 1.55 or higher
	1.5.1 Download the latest version from boost.org and extract and switch into it
	1.5.2 "./bootstrap.sh"
	1.5.3 "sudo ./b2 install"

	See here for a full installation description for linux: 
	http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html

2. Creating a clone from the current github repository

2.1 Open a terminal

2.2 Either switch to a folder which you want to use to store the library or create a new one and switch into it.

2.3 Type in "git clone https://github.com/UndeadKernel/whisper-library.git"

3. Compiling the whisper library

3.1 Switch to the project root folder "whisper-library"

3.2 Type in "cmake ."

3.3 "make"

The library should now get compiled without problems, if you however still encounter one please let us know.

1.1B Compiling the whisper-library on Windows

1. Make sure the following programs are installed

1.1 git ( http://git-scm.com ) or the GitHub UI ( https://windows.github.com/ )
	you can also alternatively download a copy from the library at https://github.com/UndeadKernel/whisper-library and skip step 2.

1.2 cmake ( www.cmake.org ) - check to add the executables to the system path
	
1.3 Visual Studio 2013 or higher
	older versions might work, but are untested.

1.4 WinPcap Driver ( http://www.winpcap.org/install/default.htm )

1.5 WinPcap Developer Pack ( http://www.winpcap.org/devel.htm )
	1.5.1 extract it
	1.5.2 add the root folder "WpdPack" either to your system path or to a new environment variable "PCAP_ROOT"
	(note that changes to the system path might require a restart to take effect)

1.5 Boost 1.55 or higher
	1.5.1 Download the latest version from boost.org and extract it
	1.5.2 execute "bootstrap.bat"
	1.5.3 start "b2" with elevated privileges (right click and "Start as Administrator")
	1.5.4 add the boost root folder to your system path (e.g. "C:\wlib\boost_1_55_00\")

2. Creating a clone from the current github repository

2.1 Open a "Git Bash" terminal

2.2 Either switch to the folder ( "cd FOLDERNAME" ) you want to use 
    or create a new one ( "mkdir FOLDERNAME") and switch into it.

2.3 Type in "git clone https://github.com/UndeadKernel/whisper-library.git"

3. Compiling the whisper library

3.1 start the cmake-gui

3.2 select as source folder the root folder of the project ("whisper-library")

3.3 Choose a folder of your liking as output folder for the binaries.

3.4 Select "Generate" ( and choose native compilers if you're starting cmake-gui for the first time ).

3.5 Open a terminal (git bash or cmd are fine) switch to your binary output folder and run "cmake --build"
	alternatively you can open the generated whisperLibrary\whisperLibrary.vcxproj in Visual Studio
	and build it with the internal tools.

The library should now get compiled without problems, if you however still encounter one please let us know.

2. Using the library in your own projects

To use the whisper-library in your own projects you first have to include the library header files in your project, which can be found from the library root in "whisperLibrary/include".

Depending on your environment you can either do this by adding the include directy to your system path, define a cmake variable that includes the path or set the include directory directly in your IDE (e.g. in Visual Studio in your project settings -> C/C++ -> additional include directories).

See How to use the library for detailed information

2.1 Use a covert channel in your project

...

2.2 Write your own covert channel

See How to write your own covert channel for more information and an example.

The whisper-library can be extended by adding your own Covert Channels. To do so, you have to implement the interface defined in covertchannel.hpp. Every class implementing this interface can be added to the framework by calling

ChannelManager::addCovertChannel(CovertChannel* channel).

2.3 Further documentation

A full documentation of the library, including all classes and methods, can be found in the repository under "doc/doxygen/html". In case a rebuild of the documentation is needed you can use the "doc/doxygen/whisperLibraryConfig" with Doxygen ( http://www.stack.nl/~dimitri/doxygen/index.html ) to generate a new documentation based on your local code.

3. Contributing to the Project

New Contributors to the project are always welcome, however there are some guidelines that should be followed to ensure code quality.

3.1 Code Conventions

As Code Conventions we're using an excerpt of the Google C++ Style Guide (http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml). You can find the excerpt here: Code Conventions.

3.2 Documentation rules

The code is commented with markings for doxygen, which we use to generate a full documentation of our code. You can find a documentation of documenting with doxygen here: http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html

3.3 Commitment Rules

3.3.1 Try to prevent overly big commits where you edited multiple files for a multiple of reasons. 
If possible make topic-based commits (e.g. "Added Documentation to classes x, y and z.")

3.3.2 Push files only with unix new line characters (git on windows has an automatic conversion option that you can use).

3.3.3 ...
Clone this wiki locally