|
|
|
@ -85,3 +85,65 @@ Example:
|
|
|
|
|
alert ssh any any -> any any (msg:"match SSH software string"; :example-rule-emphasis:`ssh.softwareversion:"OpenSSH";` sid:10000040;)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Suricata comes with a Hassh integration (https://github.com/salesforce/hassh). Hassh is used to fingerprint ssh clients and servers.
|
|
|
|
|
|
|
|
|
|
Hassh must be enabled in the Suricata config file (set 'app-layer.protocols.ssh.hassh' to 'yes').
|
|
|
|
|
|
|
|
|
|
ssh.hassh
|
|
|
|
|
---------
|
|
|
|
|
|
|
|
|
|
Match on hassh (md5 of of hassh algorithms of client).
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
alert ssh any any -> any any (msg:"match hassh"; \
|
|
|
|
|
ssh.hassh; content:"ec7378c1a92f5a8dde7e8b7a1ddf33d1";\
|
|
|
|
|
sid:1000010;)
|
|
|
|
|
|
|
|
|
|
``ssh.hassh`` is a 'sticky buffer'.
|
|
|
|
|
|
|
|
|
|
``ssh.hassh`` can be used as ``fast_pattern``.
|
|
|
|
|
|
|
|
|
|
ssh.hassh.string
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
Match on Hassh string (hassh algorithms of client).
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
alert ssh any any -> any any (msg:"match hassh-string"; \
|
|
|
|
|
ssh.hassh.string; content:"none,zlib@openssh.com,zlib"; \
|
|
|
|
|
sid:1000030;
|
|
|
|
|
|
|
|
|
|
``ssh.hassh.string`` is a 'sticky buffer'.
|
|
|
|
|
|
|
|
|
|
``ssh.hassh.string`` can be used as ``fast_pattern``.
|
|
|
|
|
|
|
|
|
|
ssh.hassh.server
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
Match on hassh (md5 of hassh algorithms of server).
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
alert ssh any any -> any any (msg:"match SSH hash-server"; \
|
|
|
|
|
ssh.hassh.server; content:"b12d2871a1189eff20364cf5333619ee"; \
|
|
|
|
|
sid:1000020;)
|
|
|
|
|
|
|
|
|
|
``ssh.hassh.server`` is a 'sticky buffer'.
|
|
|
|
|
|
|
|
|
|
``ssh.hassh.server`` can be used as ``fast_pattern``.
|
|
|
|
|
|
|
|
|
|
ssh.hassh.server.string
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
Match on hassh string (hassh algorithms of server).
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
alert ssh any any -> any any (msg:"match SSH hash-server-string"; \
|
|
|
|
|
ssh.hassh.server.string; content:"umac-64-etm@openssh.com,umac-128-etm@openssh.com"; \
|
|
|
|
|
sid:1000040;)
|
|
|
|
|
|
|
|
|
|
``ssh.hassh.server.string`` is a 'sticky buffer'.
|
|
|
|
|
|
|
|
|
|
``ssh.hassh.server.string`` can be used as ``fast_pattern``.
|
|
|
|
|