生活随笔
收集整理的這篇文章主要介紹了
hping3使用详解
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
hping3使用詳解
hping3命令:http://man.linuxde.net/hping3
Testing firewall rules with Hping3 - examples:http://0daysecurity.com/articles/hping3_examples.html
攻防寶典:利用hping3和偽造IP地址執行DOS攻擊:http://netsecurity.51cto.com/art/201508/489303.htm
DoS***方法(hping3):http://19920624.blog.51cto.com/9632075/1584465
Nmap、Netcat、Hping3工具對比:http://www.2cto.com/article/201210/158961.html
用法: hping3 host [options]-h --help 顯示幫助-v --version 顯示版本-c --count 發送數據包的數目-i --interval 發送數據包間隔的時間 (uX即X微秒, 例如: -i u1000)--fast 等同 -i u10000 (每秒100個包)--faster 等同 -i u1000 (每秒1000個包)--flood 盡最快發送數據包,不顯示回復。-n --numeric 數字化輸出,象征性輸出主機地址。-q --quiet 安靜模式-I --interface 網卡接口 (默認路由接口)-V --verbose 詳細模式-D --debug 調試信息-z --bind 綁定ctrl+z到ttl(默認為目的端口)-Z --unbind 取消綁定ctrl+z鍵--beep 對于接收到的每個匹配數據包蜂鳴聲提示模式選擇default mode TCP // 默認模式是 TCP-0 --rawip RAWIP模式,原始IP模式。在此模式下HPING會發送帶數據的IP頭。即裸IP方式。使用RAWSOCKET方式。-1 --icmp ICMP模式,此模式下HPING會發送IGMP應答報,你可以用--ICMPTYPE --ICMPCODE選項發送其他類型/模式的ICMP報文。-2 --udp UDP 模式,缺省下,HPING會發送UDP報文到主機的0端口,你可以用--baseport --destport --keep選項指定其模式。-8 --scan SCAN mode. //掃描模式 指定掃描對應的端口。Example: hping --scan 1-30,70-90 -S www.target.host // 掃描-9 --listen listen mode // 監聽模式IP 模式-a --spoof spoof source address //源地址欺騙。偽造IP攻擊,防火墻就不會記錄你的真實IP了,當然回應的包你也接收不到了。--rand-dest random destionation address mode. see the man. // 隨機目的地址模式。詳細使用 man 命令--rand-source random source address mode. see the man. // 隨機源地址模式。詳細使用 man 命令-t --ttl ttl (默認 64) //修改 ttl 值-N --id id (默認 隨機) // hping 中的 ID 值,缺省為隨機值-W --winid 使用win* id字節順序 //使用winid模式,針對不同的操作系統。UNIX ,WINDIWS的id回應不同的,這選項可以讓你的ID回應和WINDOWS一樣。-r --rel 相對id字段(估計主機流量) //更改ID的,可以讓ID曾遞減輸出,詳見HPING-HOWTO。-f --frag 拆分數據包更多的frag. (may pass weak acl) //分段,可以測試對方或者交換機碎片處理能力,缺省16字節。-x --morefrag 設置更多的分段標志 // 大量碎片,淚滴攻擊。-y --dontfrag 設置不分段標志 // 發送不可恢復的IP碎片,這可以讓你了解更多的MTU PATH DISCOVERY。-g --fragoff set the fragment offset // 設置斷偏移。-m --mtu 設置虛擬最大傳輸單元, implies --frag if packet size > mtu // 設置虛擬MTU值,當大于mtu的時候分段。-o --tos type of service (default 0x00), try --tos help // tos字段,缺省0x00,盡力而為?-G --rroute includes RECORD_ROUTE option and display the route buffer // 記錄IP路由,并顯示路由緩沖。--lsrr 松散源路由并記錄路由 // 松散源路由--ssrr 嚴格源路由并記錄路由 // 嚴格源路由-H --ipproto 設置IP協議字段,僅在RAW IP模式下使用 //在RAW IP模式里選擇IP協議。設置ip協議域,僅在RAW ip模式使用。ICMP 模式-C --icmptype icmp類型(默認echo請求) // ICMP類型,缺省回顯請求。-K --icmpcode icmp代號(默認0) // ICMP代碼。--force-icmp 發送所有icmp類型(默認僅發送支持的類型) // 強制ICMP類型。--icmp-gw 設置ICMP重定向網關地址(默認0.0.0.0) // ICMP重定向--icmp-ts 等同 --icmp --icmptype 13 (ICMP 時間戳) // icmp時間戳--icmp-addr 等同 --icmp --icmptype 17 (ICMP 地址子網掩碼) // icmp子網地址--icmp-help 顯示其他icmp選項幫助 // ICMP幫助UDP/TCP 模式-s --baseport base source port (default random) // 缺省隨機源端口-p --destport [+][+]<port> destination port(default 0) ctrl+z inc/dec // 缺省隨機源端口-k --keep keep still source port // 保持源端口-w --win winsize (default 64) // win的滑動窗口。windows發送字節(默認64)-O --tcpoff set fake tcp data offset (instead of tcphdrlen / 4) // 設置偽造tcp數據偏移量(取代tcp地址長度除4)-Q --seqnum shows only tcp sequence number // 僅顯示tcp序列號-b --badcksum (嘗試)發送具有錯誤IP校驗和數據包。許多系統將修復發送數據包的IP校驗和。所以你會得到錯誤UDP/TCP校驗和。-M --setseq 設置TCP序列號-L --setack 設置TCP的ack --------- (不是 TCP 的 ACK 標志位)-F --fin set FIN flag-S --syn set SYN flag-R --rst set RST flag-P --push set PUSH flag-A --ack set ACK flag -----------(設置 TCP 的 ACK 標志 位)-U --urg set URG flag // 一大堆IP抱頭的設置。-X --xmas set X unused flag (0x40)-Y --ymas set Y unused flag (0x80)--tcpexitcode 使用last tcp-> th_flags作為退出碼--tcp-mss 啟用具有給定值的TCP MSS選項--tcp-timestamp 啟用TCP時間戳選項來猜測HZ/uptimeCommon //通用設置-d --data data size (default is 0) // 發送數據包大小,缺省是0。-E --file 文件數據-e --sign 添加“簽名”-j --dump 轉儲為十六進制數據包-J --print 轉儲為可打印字符-B --safe 啟用“安全”協議-u --end 告訴你什么時候--file達到EOF并防止倒回-T --traceroute traceroute模式(等同使用 --bind 且--ttl 1)--tr-stop 在traceroute模式下收到第一個不是ICMP時退出--tr-keep-ttl 保持源TTL固定,僅用于監視一跳--tr-no-rtt 不要在跟蹤路由模式下計算/顯示RTT信息 ARS包描述(新增功能,不穩定)
ARS packet description (new, unstable)--apd-send 發送APD描述數據包(參見docs / APD.txt)
舉例:
hping3 -c 5000 -d 150 -S -w 64 -p 81 --flood 1.1.1.1 ----- 打400M TCP SYN流量
hping3 -c 999999999 -d 150 -S -w 64 -p 81 -i u1000 1.1.1.1 ---- 打1.5M TCP SYN流量
hping3 -c 999999999 -d 150 -w 64 -p 81 -i u10 1.1.1.1 -2 ---- 組合限速,打100M UDP流量
總結
以上是生活随笔為你收集整理的hping3使用详解的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。