How To Perform Ping of Death Attack Using CMD And Notepad (Just For Learning)
A ping packet can also be malformed to perform a denial of service attack by sending continuous ping packets to the target IP address. A constant ping will cause buffer overflow at the target system and will cause the target system to crash.
We often use the CMD command “Ping” to check if a server or a gateway is up and running. But, the ping command can also be used for other rather shady purposes.
If we look at the primary level, then a ping packet is generally size 56 bytes or 84 bytes (including IP header as well). However, a ping packet can also be made as large as up to 65,536 bytes.
Well, that’s the negative side of the ping packet. When we increase the size of the ping packet unnaturally, forming a malformed ping packet to attack a computer system, this type of attack is called a “ping of death” attack.
How Ping of Death attack works?
Not all computers can handle data larger than a fixed size. So, when a ping of death packet is sent from a source computer to a target machine, the ping packet gets fragmented into smaller groups of packets.
One fragment is of 8 octets size. When these packets reach the target computer, they arrive in pieces. So, the target computer reassembles the malformed packets received in chunks. But, the whole assembled packet causes buffer overflow at the target computer.
This buffer flow often causes the system to crash, making the system more vulnerable to attack.
Once the system becomes more vulnerable to attack, it allows more attacks like injecting a trojan horse on the target machine.
Also Read: What Is IP Spoofing And Denial Of Service (DOS) Attack?
How To Do DDoS (Ping Of Death Attack) Using CMD
Disclaimer: This article was purely written for educational purposes.
- Open the command prompt.
- Copy the following command and paste it in cmd.
ping <IP Address> -t |65500
- Replace the “<IP Address>” with the target’s IP Address.
- By using “-t” you’re specifying that the system shouldn’t stop pinging until it’s manually stopped by you, the user.
- “65500” is the data load.
Alternatively, you can also do the same thing using Notepad.
- Open the Notepad app.
- Copy and paste the following commands.
:loop
ping <IP Address> -l 65500 -w 1 -n 1
goto :loop
- In the above command, replace <IP Address> with an IP address.
- Save the Notepad with any name. Let’s say dos.txt
- Right click on the dos.txt and click on rename.
- Change the extension from .txt to .bat
- So, now the file name should be dos.bat
- Double click on it and you will see a command prompt running with a lot of pings.
Note: This command might not work on some systems.
How To Prevent Ping Of Death Attack Or DoS Attacks
One can use a Firewall that detects the data flood coming from the attacker to block the data coming from his IP address. Apart from that, most modern routers allow you to limit access to the network. Using this feature, you can limit the traffic and ultimately prevent attacks. Intrusion detection systems from tech giants like McAfee, Cisco, and AT&T can also help in preventing DoS attacks.
FAQs
1. Does Ping of Death still work?
Ans. Most computers these days are protected against Ping of Death attacks. Hence, the attacks are definitely less common these days.
2. Is it illegal to ping?
Ans. Pinging is legal. However, it’s not okay to do Ping of Death attacks, or any DDoS attacks for the fact.