tcpip.sys 中的漏洞是驱动程序分析 ICMP 消息的逻辑错误,可以使用包含递归 DNS 服务器 (RDNSS) 选项的精心制作的 IPv6 路由器播发数据包远程触发。RDNSS 选项通常包含一个或多个递归 DNS 服务器的 IPv6 地址列表。 tcpip.sys 存在逻辑缺陷,可以通过创建包含比预期更多的数据的路由器播发数据包来利用该缺陷,这会导致驱动程序在其内存堆栈上将数据字节数超过驱动程序代码中提供的数据字节数,从而导致缓冲区溢出。 POC视频 开发一个"蓝屏死亡"的DoS攻击是可以的。但是实现远程代码执行(RCE)比较困难。 首先,TcpIp.sys 使用 GS 标志编译,这可以防止典型的堆栈溢出直接控制返回地址。 Stack Cookie 也称为stackcanary,是加载时产生的随机值。其值是 XOR'd 与堆栈指针,使得它极难可靠地预测。 RCE 漏洞利用的第二个困难是内核地址空间布局随机化 (kASLR)。即使有可能可以可靠地预测stack canary落在系统外壳在用户模式下还需要正确(并再次远程)确定Windows内核的基本地址。 针对此漏洞的防护 此处提供一个Lua脚本用于此漏洞的检测可以集成到IDS中。 function init(args)local needs = {}needs["packet"] = tostring(true)return needsend function match(args)local packet = args["packet"]if packet == nil thenprint("Packet buffer empty! Aborting...")return 0end -- SCPacketPayload starts at byte 5 of the ICMPv6 header, so we use thepacket buffer instead.local buffer = SCPacketPayloadlocal search_str = string.sub(buffer, 1, 8)local s, _ = string.find(packet, search_str)local offset = s - 4 -- Only inspect Router Advertisement (Type = 134) ICMPv6 packets.local type = tonumber(packet:byte(offset))if type ~= 134 thenreturn 0end -- ICMPv6 Options start at byte 17 of the ICMPv6 payload.offset = offset + 16 -- Continue looking for Options until we've run out of packet bytes.while offset < string.len(packet) do -- We're only interested in RDNSS Options (Type = 25).local option_type = tonumber(packet:byte(offset)) -- The Option's Length field counts in 8-byte increments, so Length = 2means the Option is 16 bytes long.offset = offset + 1local length = tonumber(packet:byte(offset)) -- The vulnerability is exercised when an even length value is in anRDNSS Option.if option_type == 25 and length > 3 and (length % 2) == 0 thenreturn 1 -- Otherwise, move to the start of the next Option, if present.elseoffset = offset + (length * 8) - 1endend return 0end 如何防御 1、如果不使用,请禁用 IPv6 2、 netsh int ipv6set int int=*INTERFACENUMBER* rabaseddnsconfig=disable 参考链接 https://news.sophos.com/en-us/2020/10/13/top-reason-to-apply-october-2020s-microsoft-patches-ping-of-death-redux/
|