This is a self contained example using docker-compose to orchestrate.
attacker_1
performs the SYN flooding, spoofing the IP ofvictim_2
to give the appearance thatvictim_2
is the attackervictim_1
is the main victim of the DoS attackvictim_2
is the second victim and receives the reply packets fromvictim_1
- Docker
docker-compose up -d # start all the containers and begin the attack
- From the attacker's perspective
docker logs -f attacker
The logs show the output of the hping3 command, used here to perform the SYN flooding
- From the recipient of the SYN packets
docker logs -f victim_1
The victim_1
container runs a tshark command which captures all TCP packets on the eth0 interface
- From the second victim, to which the first victim replies
docker logs -f victim_2
docker-compose down
Edit the command
field in the docker-compose.yml
file for each service. If it is removed entirely you will still be able to run commands
by interacting with the container directly.
Open a bash shell on any of the containers using the below command (replacing $container_name with the actual name of the container e.g. victim_1
)
docker exec -it $container_name