Skip to content

Commit

Permalink
tests: showcase bug 7286 (tls)
Browse files Browse the repository at this point in the history
  • Loading branch information
jufajardini authored and inashivb committed Oct 3, 2024
1 parent aebea10 commit 9cb9cc0
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/tls/bug-7286-tls-metadata-01/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Test

Showcase how TLS metadata is logged when JA4 is disabled.

### Pcap

Reused from test ja4-tls.

### Ticket

https://redmine.openinfosecfoundation.org/issues/7286
Binary file added tests/tls/bug-7286-tls-metadata-01/input.pcap
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/tls/bug-7286-tls-metadata-01/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%YAML 1.1
---


outputs:
- eve-log:
enabled: yes
filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
filename: eve.json
types:
- tls:
extended: yes # enable this for extended logging information
custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s, ja4]
ja4: off
22 changes: 22 additions & 0 deletions tests/tls/bug-7286-tls-metadata-01/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
requires:
min-version: 8

pcap: ../../ja4-tls/input.pcap
skip-eve-validation: true

checks:
- filter:
count: 1
match:
event_type: tls
tls.subject: C=FR, ST=IDF, L=Paris, O=Stamus, CN=SELKS
tls.issuerdn: C=FR, ST=IDF, L=Paris, O=Stamus, CN=SELKS
tls.serial: 00:97:E6:47:09:8E:EA:C9:B4
tls.fingerprint: 3a:0b:3b:23:15:2c:44:5c:27:ac:6a:0c:41:d6:fa:74:af:b4:09:5b
tls.version: TLS 1.2
tls.notbefore: '2015-02-12T18:07:27'
tls.notafter: '2025-02-09T18:07:27'
tls.certificate: MIIDazCCAlOgAwIBAgIJAJfmRwmO6sm0MA0GCSqGSIb3DQEBBQUAMEwxCzAJBgNVBAYTAkZSMQwwC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Pkf3B7VqqzvC8W/7PkUVmk5dUWN0f2kbx2iYOlglGC4zBSH8ThKDPMJbKMBzgP+DhdGcrWB89EbUCSY1IDmcJ4dhDgP/E78lTt2kHKLUws9pbktzW3EqUvWw6hF

11 changes: 11 additions & 0 deletions tests/tls/bug-7286-tls-metadata-02/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Test

Showcase how TLS metadata is logged when JA4 is enabled.

### Pcap

Reused from test ja4-tls.

### Ticket

https://redmine.openinfosecfoundation.org/issues/7286
Binary file added tests/tls/bug-7286-tls-metadata-02/input.pcap
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/tls/bug-7286-tls-metadata-02/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%YAML 1.1
---


outputs:
- eve-log:
enabled: yes
filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
filename: eve.json
types:
- tls:
extended: yes # enable this for extended logging information
custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s, ja4]
ja4: on
22 changes: 22 additions & 0 deletions tests/tls/bug-7286-tls-metadata-02/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
requires:
min-version: 8

pcap: ../../ja4-tls/input.pcap
skip-eve-validation: true

checks:
- filter:
count: 1
match:
event_type: tls
tls.subject: C=FR, ST=IDF, L=Paris, O=Stamus, CN=SELKS
tls.issuerdn: C=FR, ST=IDF, L=Paris, O=Stamus, CN=SELKS
tls.serial: 00:97:E6:47:09:8E:EA:C9:B4
tls.fingerprint: 3a:0b:3b:23:15:2c:44:5c:27:ac:6a:0c:41:d6:fa:74:af:b4:09:5b
tls.version: TLS 1.2
tls.notbefore: '2015-02-12T18:07:27'
tls.notafter: '2025-02-09T18:07:27'
tls.certificate: MIIDazCCAlOgAwIBAgIJAJfmRwmO6sm0MA0GCSqGSIb3DQEBBQUAMEwxCzAJBgNVBAYTAkZSMQwwCgYDVQQIDANJREYxDjAMBg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