This practice will allow you to better understand spoofing and DoS techniques, as well as their effects in a web environment.
Do not clone this or any repository, follow the instructions below:
For this specific practice of Spoofing and DoS, it is best to set up the network as an Internal Network. This is due to several reasons:
Complete Isolation: Ensures that attack and test activities do not interfere with the production network or other external networks. This prevents any potential unwanted impact on other systems.
Controlled Environment: Allows complete control over the network environment, facilitating the monitoring and analysis of network traffic generated during the tests.
Realistic Simulation: Although isolated, an internal network can effectively simulate a real network environment for Spoofing and DoS practices.
1ip addr show
You will generally find lines labeled as eth0, enp0s3, wlan0, etc. The one that is active and has an assigned IP address will be the interface you are using.
1sudo nano /etc/network/interfaces
1auto enp0s3 2iface enp0s3 inet static 3 address 192.168.1.10 4 netmask 255.255.255.0 5 gateway 192.168.1.1
Example configuration for both files (Kali and Debian), may contain more commands than shown, but add any missing commands from the previously provided configuration, as they will be necessary.
1sudo systemctl restart networking
1ip addr show
You will generally find lines labeled as eth0, enp0s3, wlan0, etc. The one that is active and has an assigned IP address will be the interface you are using.
1sudo nano /etc/network/interfaces
1auto eth0 2iface eth0 inet static 3 address 192.168.1.11 4 netmask 255.255.255.0 5 gateway 192.168.1.1
1sudo systemctl restart networking
1$ ping <IP_debian>
Replace <IP_debian> with the IP address you obtained for the Debian machine.
1$ ping <IP_kali>
Replace <IP_kali> with the IP address you obtained for the Kali machine.
Graphical example of how pings look when connected
To carry out this practice, we will use arpspoof. This tool is used to send spoofed ARP packets to the network, making a device (like the Debian machine) believe that the attacker's MAC address (Kali Linux) is the MAC address of the gateway (router). This can be verified by observing the ARP tables on the Debian machine before and after running arpspoof.
1sudo apt update 2sudo apt install dsniff
Note: arpspoof is part of the dsniff package..
1sudo arpspoof -h
1sudo arpspoof -i <interfaz_kali> -t <IP_debian> <gateway>
Wireshark is ideal for analyzing network traffic, identifying possible attacks, and monitoring security in a network environment.
1sudo apt update 2sudo apt install wireshark
During the installation, you might be asked if non-root users should be able to capture packets. Select "Yes". If you completed the installation without this setting, you can configure it later with:
1sudo dpkg-reconfigure wireshark-common
1sudo usermod -aG wireshark $USER
NOTE: $USER is the username you use on the Debian virtual machine.
Once the installation is complete, log out and back in to apply the group changes. You can start Wireshark by running:
1sudo wireshark
To perform an ICMP flooding attack (ping flood) from Kali to Debian, you can use the following command:
1sudo hping3 -1 <IP_debian> -I eth0