📄 hping2.8
字号:
.TH HPING2 8 "2001 Aug 14".SH NAMEhping2 \- send (almost) arbitrary TCP/IP packets to network hosts.SH SYNOPSIS.B hping2[.B \-hvnqVDzZ012WrfxykQbFSRPAUXYjJBuTG] [.B \-c.I count] [.B \-i.I wait] [.B \-\-fast] [.B \-I.I interface] [.B \-9.I signature] [.B \-a.I host] [.B \-t.I ttl] [.B \-N.I ip id] [.B \-H.I ip protocol] [.B \-g.I fragoff] [.B \-m.I mtu] [.B \-o.I tos] [.B \-C.I icmp type] [.B \-K.I icmp code] [.B \-s.I source port] [.B \-p[+][+].I dest port] [.B \-w.I tcp window] [.B \-O.I tcp offset] [.B \-M.I tcp sequence number] [.B \-L.I tcp ack] [.B \-d.I data size] [.B \-E.I filename] [.B \-e.I signature] [.B \-\-icmp\-ipver.I version] [.B \-\-icmp\-iphlen.I length] [.B \-\-icmp\-iplen.I length] [.B \-\-icmp\-ipid.I id] [.B \-\-icmp\-ipproto.I protocol] [.B \-\-icmp\-cksum.I checksum] [.B \-\-icmp\-ts] [.B \-\-icmp\-addr] [.B \-\-tcpexitcode] [.B \-\-tcp-timestamp] [.B \-\-tr-stop] [.B \-\-tr-keep-ttl] [.B \-\-tr-no-rtt]hostname.br.ad.SH DESCRIPTIONhping2 is a network tool able to send custom TCP/IP packets and todisplay target replies like ping program does with ICMP replies. hping2handle fragmentation, arbitrary packets body and size and can be used inorder to transfer files encapsulated under supported protocols. Usinghping2 you are able to perform at least the following stuff: - Test firewall rules - Advanced port scanning - Test net performance using different protocols, packet size, TOS (type of service) and fragmentation. - Path MTU discovery - Transferring files between even really fascist firewall rules. - Traceroute-like under different protocols. - Firewalk-like usage. - Remote OS fingerprinting. - TCP/IP stack auditing. - A lot of others..I It's also a good didactic tool to learn TCP/IP.hping2 is developed and maintained by antirez@invece.org and islicensed under GPL version 2. Development is open so you can sendme patches, suggestion and affronts without inhibitions..SH HPING SITEprimary site at.B http://www.hping.orgYou can found both the stable release and the instructionto download the latest source code at http://www.hping.org/download.html.SH BASE OPTIONS.TP.I -h --helpShow an help screen on standard output, so you can pipe to less..TP.I -v --versionShow version information and API used to access to data link layer,.I linux sock packetor.I libpcap.TP.I -c --count countStop after sending (and receiving).I countresponse packets. After last packet was send hping2 wait COUNTREACHED_TIMEOUTseconds target host replies. You are able to tune COUNTREACHED_TIMEOUT editinghping2.h.TP.I -i --intervalWaitthe specified number of seconds or micro seconds between sending each packet.--interval X set.I waitto X seconds, --interval uX set.I waitto X micro seconds.The default is to waitone second between each packet. Using hping2 to transfer files tune thisoption is really important in order to increase transfer rate. Even usinghping2 to perform idle/spoofing scanning you should tune this option, see.B HPING2-HOWTOfor more information..TP.I --fastAlias for -i u10000. Hping will send 10 packets for second..TP.I -n --numericNumeric output only, No attempt will be made to lookup symbolic names for host addresses..TP.I -q --quietQuiet output. Nothing is displayed except the summary lines atstartup time and when finished..TP.I -I --interface interface nameBy default on linux and BSD systems hping2 uses default routing interface.In other systems or when there is no default routehping2 uses the first non-loopback interface.However you are able to force hping2 to use the interface you need usingthis option. Note: you don't need to specify the whole name, forexample -I et will match eth0 ethernet0 myet1 et cetera. If no interfacesmatch hping2 will try to use lo..TP.I -V --verboseEnable verbose output. TCP replies will be shown as follows:len=46 ip=192.168.1.1 flags=RA DF seq=0 ttl=255 id=0 win=0 rtt=0.4 mstos=0 iplen=40 seq=0 ack=1380893504 sum=2010 urp=0 .TP.I -D --debugEnable debug mode, it's useful when you experience some problem withhping2. When debug mode is enabled you will get more information about.B interface detection, data link layer access, interface settings, options.B parsing, fragmentation, HCMP protocoland other stuff..TP.I -z --bindbind CTRL+Z to.B time to live (TTL)so you will able to increment/decrement ttl of outgoing packets pressingCTRL+Z once or twice..TP.I -Z --unbindunbind CTRL+Z so you will able to stop hping2.SH PROTOCOL SELECTIONDefault protocol is TCP, by default hping2 will send tcp headers to targethost's port 0 with a winsize of 64 without any tcp flag on. Often thisis the best way to do an 'hide ping', useful when target is behinda firewall that drop ICMP. Moreover a tcp null-flag to port 0 has a goodprobability of not being logged..TP.I -0 --rawipRAW IP mode, in this mode hping2 will send IP header with dataappended with --signature and/or --file, see also --ipproto thatallows you to set the ip protocol field..TP.I -1 --icmpICMP mode, by default hping2 will send ICMP echo-request, you can setother ICMP type/code using.B --icmptype --icmpcodeoptions..TP.I -2 --udpUDP mode, by default hping2 will send udp to target host's port 0.UDP header tunable options are the following:.B --baseport, --destport, --keep..TP.I -9 --listen signatureHPING2 listen mode, using this option hping2 waits for packet that contain.I signatureand dump from.I signatureend to packet's end. For example if hping2 --listen TEST reads a packetthat contain.B 234-09sdflkjs45-TESThello_worldit will display.B hello_world..SH IP RELATED OPTIONS.TP.I -a --spoof hostnameUse this option in order to set a fake IP source address, this optionensures that target will not gain your real address. However replieswill be sent to spoofed address, so you will can't see them. In orderto see how it's possible to perform spoofed/idle scanning see the.B HPING2-HOWTO..TP.I -t --ttl time to liveUsing this option you can set.B TTL (time to live)of outgoing packets, it's likely that you will use this with.B --tracerouteor.B --bindoptions. If in doubt try `.B hping2 some.host.com -t 1 --traceroute\'..TP.I -N --idSet ip->id field. Default id is random but if fragmentation is turned onand id isn't specified it will be.B getpid() & 0xFF, to implement a better solution is in TODO list..TP.I -H --ipprotoSet the ip protocol in RAW IP mode..TP.I -W --winidWindows* id has different byte ordering, if this option is enablehping2 will properly display windows reply ids..TP.I -r --relDisplay id increments instead of id. See the.B HPING2-HOWTOfor more information. Increments aren't computed as id[N]-id[N-1] butusing packet loss compensation. See relid.c for more information..TP.I -f --fragSplit packets in more fragments, this may be useful in order to testIP stacks fragmentation performance and to test if somepacket filter is so weak that can be passed using tiny fragments(anachronistic). Default 'virtual mtu' is 16 bytes. see also.I --mtuoption..TP.I -x --morefragSet more fragments IP flag, use this option if you want that targethost send an.B ICMP time-exceeded during reassembly..TP.I -y --dontfragSet don't fragment IP flag, this can be used to perform.B MTU path discovery..TP.I -g --fragoff fragment offset valueSet the fragment offset.TP.I -m --mtu mtu valueSet different 'virtual mtu' than 16 when fragmentation is enabled. Ifpackets size is greater that 'virtual mtu' fragmentation is automaticallyturned on..TP.I -o --tos hex_tosSet.B Type Of Service (TOS), for more information try.B --tos help.TP.I -G --rrouteRecord route. Includes the RECORD_ROUTE option in each packet sent anddisplays the route buffer of returned packets. Note that the IP headeris only large enough for nine such routes. Many hosts ignore or discard
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -