This software is covered by the CRAPL licence (see CRAPL-LICENSE.txt)
On the server:
-
Change the content in folders.txt to where the replay pickle is (in this example, it can be ../replayTraces/Youtube and ../replayTraces/YoutubeRandom)
-
You can now run the replay_server and replay analyzer with
./restartServers.sh
On the client:
-
Assume the server used is wehe3.meddle.mobi (can use your own server as well, just edit
class Instance
in python_lib.py). You can then run a replay of the recorded trafficpython3 replay_client.py --pcap_folder={the/dir/to/replayFiles} --serverInstance=wehe
This tool has been containerized. To run it within a container first go to the cloned directory and build with:
docker build . -t wehe
Then run with:
docker run -v <local_absolute_path_to_ssl_keys_directory>:/wehe/ssl --net=host --env SUDO_UID=$UID -itd wehe <public_IP_address/hostname>
/data is where the results are saved. Remove d
from -itd
to run outside of
detached mode and see the output in STDOUT.
run certGenerator.py to generate your own certificate that can be used to encrypt sidechannel communications.
The server and client can run from the same docker image. The included
docker-compose.yaml
provides a minimal test that the server can start and the
client can run a test to this server from within the docker image.
docker-compose build wehe-server
docker-compose up
If the client or server fail, the build is out of order.
Prepare the replay traffic, the replay is recorded in a pcap file, and we will use the parser script to process the pcap and create the pickle file that can be used by the client and server.
Assume the pcap is stored in the/dir/to/pcap. Copy the same pcap to the/dir/to/pcapRandom.
Create a file named client_ip.txt in both directories, with the only content in it be the client's ip in the pcap file.
On the client:
- Create the replay file with original payload
sudo python3 replay_parser.py --pcap_folder={the/dir/to/pcap}
- Creat the replay file with bit-inverted payload
sudo python3 replay_parser.py --pcap_folder={the/dir/to/pcapRandom} --randomPayload=True --invertBit=True
- Copy the pickle directory (the/dir/to/pcap, and the/dir/to/pcapRandom) to the server via scp.