目录
Container Setup and Commands
Download the Labsetup.zip file to your VM from the lab’s website, unzip it, enter the Labsetup folder.
$ docker-compose build # Build the container image
$ docker-compose up # Start the container
$ docker-compose down # Shut down the container
// Aliases for the Compose commands above
$ dcbuild
$ dcup
$ dcdown
# Alias for: docker-compose build
# Alias for: docker-compose up
# Alias for: docker-compose down
$ dockps // Alias for: docker ps --format "{
{.ID}} {
{.Names}}"
$ docksh <id> // Alias for: docker exec -it <id> /bin/bash
$ dockps
b1004832e275 hostA-10.9.0.5
0af4ea7a3e2e hostB-10.9.0.6
9652715c8e0a hostC-10.9.0.7
// The following example shows how to get a shell inside hostC
$ docksh 96
root@9652715c8e0a:/#
Task 1: SYN Flooding Attack
TCP SYN Flood攻击就是一种Dos攻击方式,利用的是在短时间内与Server建立多个TCP的半连接(未发送ACK数据包),因此Server在没有防御措施的情况下都会接收并建立连接等待ACK数据包。
抵御该模式的方式就是TCP cookies,在完成三次握手之前不会为任何一个连接分配资源。
(1)查看泛洪攻击前被攻击主机上的TCP链接的状态;
(2)关闭SYN Cookie,发起SYN泛洪攻击;
$ sysctl -a | grep syncookies #Display the SYN cookie flag)
$ sysctl -w net.ipv4.tcp_syncookies=0 #turn off SYN cookie)
$ sysctl -w net.ipv4.tcp_syncookies=1 #turn on SYN cookie)
from scapy.all