20.1. Suricata中的Lua使用¶
Lua脚本可以在Suricata的两个组件中使用:
输出模块
检测模块:
lua
关键字和luaxform
转换
这两个功能都通过一组函数来访问Suricata提取的数据。您可以在 lua-functions 页面查看这些函数的列表。
Note
目前 init
函数中的 needs
键会根据用途(output
或 detection
)有所不同,可用函数列表也可能存在差异。luaxform
不使用 needs
键。
20.1.1. Lua输出模块¶
Lua脚本可用于编写自定义输出。更多信息请参阅 lua-output。
20.1.2. Lua检测模块¶
Lua脚本可作为签名中的过滤条件使用。更多信息请参阅 lua-detection。
20.1.3. Lua转换模块¶
luaxform
转换可用于签名中。更多信息请参阅 luaxform。