hping3

Packet Generator & Analyzer

🛠️ hping3 क्या है?

hping3 एक powerful command-line packet assembler/analyzer है जो TCP/IP packets बनाने और भेजने के लिए use होता है। यह firewall testing, network testing, और port scanning के लिए बहुत useful है।

👉 Stress testing, DoS/DDoS simulation और network security testing में यह एक important tool है, लेकिन केवल authorized testing के लिए use करो!

🔍 hping3 क्या-क्या कर सकता है

Custom Packet Creation

Custom TCP/UDP/ICMP packets बनाना

Port Scanning

Stealth port scanning (FIN, SYN, NULL)

Stress Testing

Server load testing & DoS simulation

Firewall Testing

Firewall rules test करना

Traceroute

Custom traceroute (TCP/UDP/ICMP)

Packet Analysis

Packet responses analyze करना

⚙️ Kali NetHunter / Termux में hping3 install

aptInstallation Commands

System Update

apt update

Install hping3

apt install hping3

💻 Basic Commands (Use)

👉 Commands को एक-एक करके use कर सकते हो:

Simple Ping (ICMP)

hping3 192.168.1.1

TCP SYN Scan (Port 80)

hping3 -S 192.168.1.1 -p 80

Custom Source Port

hping3 -S 192.168.1.1 -p 80 --spoof 1234

Count Packets (-c)

hping3 -c 10 192.168.1.1

Flood Mode (Fast Packets)

hping3 -1 192.168.1.1 --flood

🌐 Real Example (Practical समझ)

Example 1🎯 Port Scanning
hping3 -S 192.168.1.1 -p 80 -c 1

-S

SYN flag set करो

-p 80

Port 80 पर भेजो

-c 1

1 packet भेजो

192.168.1.1

Target IP

👉 अगर port open है: तो "SA" (SYN+ACK) response आएगा

Example 2⚡ Stress Testing (WARNING - Authorized Only!)
hping3 -S -p 80 --flood 192.168.1.1

-S

SYN flag

--flood

High speed mode

-p 80

Target port

👉 यह command हजारों SYN packets हर second भेजता है! केवल अपने authorized test server पर use करो, नहीं तो illegal है!

🎚️ Important Flags और क्या करते हैं

-S (SYN)

SYN flag set करो (TCP connection start)

-F (FIN)

FIN flag set करो (connection end)

-P (PUSH)

PUSH flag set करो (data push)

-R (RST)

RST flag set करो (connection reset)

--flood

जितनी जल्दी हो सके packets भेजो (no replies)

-c N

केवल N packets भेजो

-p PORT

Destination port set करो

--rand-source

Random source IPs use करो

📊 Output समझो

Response Flags का मतलब
SA - SYN+ACK (Port Open)
RA - RST+ACK (Port Closed)
. - No Response (Filtered)
SA

SYN+ACK

Port open है, server ने accept किया

RA

RST+ACK

Port closed है, server ने reject किया

.

No Response

Firewall ने block कर दिया

⚠️ CRITICAL WARNING - DoS/DDoS Testing

hping3 के flood mode (--flood) का illegal use सीरियस criminal offense है!

केवल इन cases में use करो:

  • अपना own server/website (load testing)
  • Written permission के साथ client's server
  • Authorized penetration testing labs
  • Isolated test environment (VM/Docker)

👉 बिना permission किसी भी website/server को flood करना illegal है → Cybercrime Act के तहत punishment हो सकती है

🧩 Related Tools

Nmap

Port scanning tool

Slowloris

HTTP DoS tool

Wireshark

Packet analysis

💡 Simple समझ

hping3 = "Packet का Swiss Army Knife"

यह हर तरह का TCP/IP packet बना सकता है और भेज सकता है — port scanning से लेकर DoS testing तक। एक tool, बहुत काम!