BNCS312 - Introduction To Ethical Hacking: Denial of Service
BNCS312 - Introduction To Ethical Hacking: Denial of Service
Ethical Hacking
CHAPTER 4
Denial of Service
©ISBATUNIVERSITY–2023
How can a service be denied?
DDoS
Collateral
damage points
DDoS Botnets
Botnet:
Collection of compromised computers that are controlled for the purposes of
carrying out DDoS attacks or other activities
Can be large in number Systems join a botnet when they become infected by
certain types of malware
Like a virus, but instead of harming the system, it wants to take it over
and control it
Through email attachments, website links, or IM links
Through unpatched operating system vulnerabilities
Botnets
multi-tier design
Zombies
Zombies
How to perform a Dos/Ddos Attacks
Common DDoS Attack Tools
• GoldenEye
• Slowloris
• Hping3 and many more…
©ISBATUNIVERSITY–2023
Tool 1: Goldeneye
Goldeneye uses perfectly legitimate HTTP traffic.
Denial of service attack can be executed with the help of
Goldeneye by generating heavy traffic of botnets.
©ISBATUNIVERSITY–2023
Installation
Step 1: Open your Kali Linux and then Open your Terminal. Use the following
command to install the tool by cloning the GitHub repository.
cd GoldenEye
Step 3: Use the following command to list out the contents of the directory and
use the second command to run the tool.
ls
./goldeneye.py
©ISBATUNIVERSITY–2023
Step 4: You can see that the tool is asking for a URL that means the tool is
running successfully now.
Step 5: Use the below command to see how to use the tool works.
./goldeneye.py -h
Usage
Example 1: Use the GoldenEye tool to perform DDoS attack on any domain. ‘s’
is used to specify no. of concurrent sockets.
©ISBATUNIVERSITY–2023
Example 2: To display all usage options of the golden eye
tool, type the following command
sudo ./goldeneye.py -h
©ISBATUNIVERSITY–2023
Slowloris DDOS Attack
©ISBATUNIVERSITY–2023
Uses of Slowloris:
©ISBATUNIVERSITY–2023
Step 1: Open your Kali Linux and then Open your Terminal.
Step 2: Create a new Directory on Desktop named Slowloris using the following
command.
mkdir Slowloris
Step 4: Now you have to clone the Slowloris tool from Github so that you can
install it on your Kali Linux machine. For that, you only have to type the
following URL in your terminal within the Slowloris directory that you have
created.
©ISBATUNIVERSITY–2023
You have successfully installed the Slowloris tool in your Kali Linux. Now it’s
time to perform a denial of service using the following steps.
Step 5: Now go to the Action bar and click on split terminal vertically then you
will see that the two-terminal screen has been open now.
Step 6: Now you have to check the IP address of your machine to do that type
of following command.
ifconfig
Step 7: As you can see we got our IP address now it’s time to start the apache
server, start the apache server using the following command.
Step 8: Now we have to check the status of your server whether it is active or
not so to check the status of your server run the following command.
service apache2 status
©ISBATUNIVERSITY–2023
Step 9: We can see that our server is under active status it means is running
properly, now come back to the first terminal, and to check permissions run the
following command.
ls -l
Step 10: Now it’s time to run the tool using the following command.
Step 11: You can see the tool has started attacking that particular IP address
which we have given now to check whether its working or not go to your
browser and on your URL bar type that IP address, and you will see the site is
only loading and loading but not opening this is how Slowloris tool works.
©ISBATUNIVERSITY–2023
DOS Flood With hping3
DoS Attack with Hping3
Run the command: hping3 --flood -S -V --rand-source http://stv.com
Where:
©ISBATUNIVERSITY–2023
Port Scanning with hping3:
Its simple to perform port scanning on any host through hping3. Here below is the command
used to scan the
host;
•# hping3 -S — scan 21–500 Target
•# hping3 -S -p 80 Target
©ISBATUNIVERSITY–2023
2. SYN Flood Attack
©ISBATUNIVERSITY–2023
3. LAND Attack
©ISBATUNIVERSITY–2023
4. SMURF Attack:
This is a kind of DDoS attack in which spoofed source address send a
large amount of ICMP packets to the target address. It uses a victim
address as a source address to send/broadcast the multiple ICMP ping
request.
Run the following command check the response in the Wireshark that
multiple spoofed ICMP packets are sent in just second and perform a
flood on the destination server.
©ISBATUNIVERSITY–2023
5. Random Source Attack
In this attack, an attacker can send multiple random packets with
different source addresses to the target machine which may cause the
Distributed denial of service attack. It is difficult to identify the actual
source address after an incident occurs.
©ISBATUNIVERSITY–2023
Are we safe from DDoS?
I have a Firewall
It does not matter. We slip with legitimate traffic or we bomb your
firewall
I use VPN
It does not matter. We can fill your VPN pipe
My system is very high provision
It does not matter. We can get bigger resource than you have
25
Why DoS Defense is difficult
Conceptual difficulties
Mostly random source packet
Moving filtering upstream requires communication
Practical difficulties
Routers don’t have many spare cycles for analysis/filtering
Networks must remain stable—bias against infrastructure change
Attack tracking can cross administrative boundaries
End-users/victims often see attack differently (more urgently) than network operators
27
Attack prevention
Limit ability of systems to send spoofed packets
Filtering done as close to source as possible by routers/gateways
Reverse-path filtering ensure that the path back to claimed source is same
as the current packet’s path
Ex: On Cisco router “ip verify unicast reverse-path” command
Rate controls in upstream distribution nets
On specific packet types
Ex: Some ICMP, some UDP, TCP/SYN
Block IP broadcasts
28
Responding to attacks
29
Responding to attacks cont’d ….
30
DDoS Attack Trends
Thank you
©ISBATUNIVERSITY–2023