1 Star 0 Fork 1

刺猬/Urgent11-Suricata-LUA-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cve_2019_12260.lua 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
sud0woodo 提交于 2019-11-12 21:46 . Create cve_2019_12260.lua
--[[
-- Author: Axel Boesenach
--
-- TCP-Options Field parser for Suricata to check for CVE-2019-12260
--
-- Suricata rule keyword
-- luajit:cve_2019_12260.lua;
--
-- Suricata rule
-- alert ip any any -> any any (
-- msg:"EXPLOIT - VxWorks CVE-2019-12260 Malformed TCP-AO Detected";
-- flow:to_server;
-- flags:S;
-- luajit:cve_2019_12260.lua;
-- threshold:type limit, track by_src, count 1, seconds 3600;
-- classtype:attempted-admin;
-- reference:url,armis.com/urgent11/;
-- metadata:created_at 2019-11-06;
-- metadata:CVE 2019-12260;
-- sid:3;
-- rev:1;
-- )
--
-- The script checks for CVE-2019-12260, the packet that is checked consists of a malformed SYN packet,
-- this packet contains a TCP-AO option field with a byte value of <= 3 bytes. The TCP-AO option can be
-- set with hex value 0x29, as per RFC: https://tools.ietf.org/html/rfc5925#page-7
]]
-- Initialize the script
function init (args)
local needs = {}
needs["packet"] = tostring(true)
return needs
end
-- Try and match the condition
function match (args)
for index, data in pairs(args) do
--[[
-- The exploit is based on malforming the TCP-AO option by setting it to anything that is less than
-- or equal to 3 bytes. This can be checked by verifying that hex value 0x29 is set as an option at
-- offset 56
]]
if string.byte(data, 57) == 29 and string.byte(data, 58) < 4 then
return 1
end
end
return 0
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ciweihjz/Urgent11-Suricata-LUA-scripts.git
git@gitee.com:ciweihjz/Urgent11-Suricata-LUA-scripts.git
ciweihjz
Urgent11-Suricata-LUA-scripts
Urgent11-Suricata-LUA-scripts
master

搜索帮助