diff --git a/doc/userguide/lua/libs/dns.rst b/doc/userguide/lua/libs/dns.rst index 520697c4d9..ef01907643 100644 --- a/doc/userguide/lua/libs/dns.rst +++ b/doc/userguide/lua/libs/dns.rst @@ -1,6 +1,8 @@ DNS --- +.. role:: example-rule-emphasis + DNS transaction details are exposed to Lua scripts with the ``suricata.dns`` library, for example:: @@ -23,12 +25,18 @@ If you are going to use the script for rule matching, choose one of the available DNS buffers listed in :ref:`lua-detection` and follow the pattern: -:: +For use in rule matching, the rule must **hook** into a DNS +transaction state. Available states are ``request_complete`` and +``response_complete``. For example: + +.. container:: example-rule + + alert dns::example-rule-emphasis:`request_complete` any any -> any any (... + +Then to initialize the script:: function init (args) - local needs = {} - needs["dns.rrname"] = tostring(true) - return needs + return {} end Transaction diff --git a/doc/userguide/rules/lua-detection.rst b/doc/userguide/rules/lua-detection.rst index d47b9e8564..e70d1f07c3 100644 --- a/doc/userguide/rules/lua-detection.rst +++ b/doc/userguide/rules/lua-detection.rst @@ -35,9 +35,6 @@ inspection. Currently the following are available: * buffer -- the current sticky buffer * stream * dnp3 -* dns.request -* dns.response -* dns.rrname * ssh * smtp * tls