ええコンサルタント > セキュリティプラザ > ネットワークセキュリティ
hpingツールは下記のサイトhttp://www.hping.org/download.phpからダウンロードできます。
ヘッダファイルlibpcap.hはインストールしておく必要があります。また、script.cとlibpcap_stuff.cを下記のように書き直す必要がある。
#include <pcap-bpf.h> #if 0 /* hj.chen */ #include <net/bpf.h> #endif /* hj.chen */
| opts | optl | demo | |
|---|---|---|---|
| -h | --help | show help information | |
| -v | --version | show version information | |
| -c | --count | packet count | |
| -i | --interval | set the waiting interval(us) | |
| --fast | alias for -i u10000 (10pkts/sec) | ||
| --faster | alias for -i u1000 (100pkts/sec) | ||
| --flood | send packet as fast as possible | ||
| -n | --numeric | numeric output | |
| -q | --quiet | quiet mode | |
| -i | --interface | interface name | |
| -V | --verbose | verbose mode | |
| -D | --debug | debugging info | |
| -z | --bind | bind CTRL+Z to TTL | |
| -Z | --unbind | unbind CTRL+Z | |
| --beep | beep for every matching packet received | ||
| MODE default TCP | |||
| -0 | --rawip | RAW IP mode | |
| -1 | --icmp | ICMP mode | |
| -2 | --udp | UDP mode | |
| -8 | --scan | SCAN mode | |
| -9 | --listen | LISTEN mode | |
| IP | |||
| -a | --spoof | spoof source address | |
| --rand-dest | randomize destination ip address | ||
| --rand-source | randomize source ip address | ||
| -t | --ttl | time to live(default=64) | |
| -N | --id | packet identification(default random) | |
| -W | --winid | use winid ordering | |
| -r | --rel | relativize id field | |
| -f | --frag | split packet into more fragments | |
| -x | --morefrag | set more fragments | |
| -y | --dontfrag | set dont fragments flag | |
| -g | --fragoff | set the fragment offset | |
| -m | --mtu | set virtual mtu, implies --frag if packet size > mtu | |
| -o | --tos | type of service (default 0x00) | |
| -G | --rroute | ||
| --lsrr | loose source routing and record route | ||
| --ssrr | strict source routing and record route | ||
| -H | --ipproto | set the IP protocol field, only in RAW IP mode | |
| ICMP | |||
| -C | --icmptype | icmp type (default echo request) | |
| -K | --icmpcode | icmp code (default 0) | |
| --force-icmp | send all imcp types | ||
| --icmp-gw | set gateway address for ICMP redirect | ||
| --icmp-ts | alias for --icmp --icmptype 13(ICMP timestamp) | ||
| --icmp-addr | alias for --icmp --icmptype 17(ICMP address subnet mask) | ||
| --icmp-help | display help for others icmp options | ||
| TCP/UDP | |||
| -s | --baseport | base source port | |
| -d | --dstport | destination port | |
| -k | --keep | keep still source port | |
| -w | --win | winsize (default 64) | |
| -O | --tcpoff | set fake tcp data offset | |
| -Q | --seqnum | show tcp sequence number | |
| -M | --setseq | set tcp sequence number | |
| -L | --setack | set tcp ack number | |
| -b | --badcksum | set bad IP checksum | |
| -F | --fin | set tcp FIN flag | |
| -S | --syn | set tcp SYN flag | |
| -R | --rst | set tcp RST flag | |
| -P | --push | set tcp PUSH flag | |
| -A | --ack | set tcp ACK flag | |
| -U | --urg | set tcp URG flag | |
| -X | --xmas | set tcp X unused flag(0x40) | |
| -Y | --ymas | set tcp Y unused flag(0x40) | |
| --tcpexitcode | use last tcp->th_flags as exit code | ||
| --tcp-timestamp | enable the TCP timestamp option to guess the HZ/uptime | ||
| COMMON | |||
| -d | --data | data size | |
| -E | --file | data from file | |
| -e | --sign | add signature | |
| -j | --dump | dump packet in HEX | |
| -J | --print
| dump printable characters | |
| -B | --safe
| enable safe protocol | |
| -T | --traceroute
| traceroute mode | |
| --tr-stop
| exit when receive the first not ICMP in traceroute mode | ||
| --tr-keep-ttl
| keep the source TTL fixed, useful to monitor just one hop | ||
| --tr-no-rtt
| dont calculate/show RTT information in traceroute mode | ||