SSL/TLS Keywords

Several rule keywords to match on various properties of TLS/SSL handshake. All supported fields are sticky buffers and can be used with fast_pattern.

tls_cert_subject

Matches the TLS/SSL certificate subject field.

Example:

alert tls any any -> any any (classtype:misc-attack; \
msg:"content matching in tls subject field"; \
tls_cert_subject; content:"Test Certificate ECDSA"; sid:1; rev:1;)

tls_cert_issuer

Matches the TLS/SSL certificate issuer field.

Examples:

alert tls any any -> any any (classtype:misc-attack; \
msg:"content matching in tls issuer field"; \
tls_cert_issuer; content:"Let's Encrypt"; sid:2; rev:1;)

tls_sni

Matches the TLS/SSL server name indication field.

Example:

alert tls any any -> any any (classtype:misc-attack; \
msg:"content matching in tls sni field"; \
tls_sni; content:"example.org"; sid:3; rev:1;)

tls.certs

Does a “raw” match on each of the certificates in the TLS certificate chain.

Example:

alert tls any any -> any any (classtype:misc-attack; \
msg:"content matching Algorithm Id sha256WithRSAEncryption"; \
tls.certs; content:"|2a 86 48 86 f7 0d 01 01 0b|"; sid:4; rev:1;)