Sample captures, TLS

TLS 1.2 handshake with a certificate

A full TLS 1.2 handshake: the server's certificate for login.badexample.net is in the clear.

Packets
18
Duration
0.204 s
Size
2.6 KB
Protocols
TCP, TLS
License
CC0

What it shows

A TLS 1.2 handshake: ClientHello with the server name, then the server's certificate (subject CN=login.badexample.net, issued by Bad Example Root CA), the key exchange and a little encrypted data.

TLS 1.2 sends the certificate unencrypted, so rules can match its subject and issuer. TLS 1.3 encrypts it, and only the SNI stays visible.

Rules for this capture

Suricata 8 and 7

Try these rules
alert tls any any -> any any (msg:"Certificate for login.badexample.net"; tls.cert_subject; content:"CN=login.badexample.net"; sid:1000001; rev:1;)
alert tls any any -> any any (msg:"Certificate from Bad Example Root CA"; tls.cert_issuer; content:"CN=Bad Example Root CA"; sid:1000002; rev:1;)
alert tcp any 443 -> any any (msg:"Certificate for login.badexample.net"; flow:established,to_client; content:"login.badexample.net"; sid:1000001; rev:1;)
alert tcp any 443 -> any any (msg:"Certificate from Bad Example Root CA"; flow:established,to_client; content:"Bad Example Root CA"; sid:1000002; rev:1;)

Packets

No.TimeSourceDestinationProtocolInfo
10.000192.0.2.10:50410198.51.100.20:443TCPSYN
20.012198.51.100.20:443192.0.2.10:50410TCPSYN ACK
30.024192.0.2.10:50410198.51.100.20:443TCPACK
40.036192.0.2.10:50410198.51.100.20:443TCPPSH ACK, TLS ClientHello
50.048198.51.100.20:443192.0.2.10:50410TCPACK
60.060198.51.100.20:443192.0.2.10:50410TCPPSH ACK, TLS ServerHello, Certificate, ServerHelloDone
70.072192.0.2.10:50410198.51.100.20:443TCPACK
80.084192.0.2.10:50410198.51.100.20:443TCPPSH ACK, TLS ClientKeyExchange, ChangeCipherSpec, Handshake (encrypted)
90.096198.51.100.20:443192.0.2.10:50410TCPACK
100.108198.51.100.20:443192.0.2.10:50410TCPPSH ACK, TLS ChangeCipherSpec, Handshake (encrypted)
110.120192.0.2.10:50410198.51.100.20:443TCPACK
120.132192.0.2.10:50410198.51.100.20:443TCPPSH ACK, TLS Application data
130.144198.51.100.20:443192.0.2.10:50410TCPACK
140.156198.51.100.20:443192.0.2.10:50410TCPPSH ACK, TLS Application data
150.168192.0.2.10:50410198.51.100.20:443TCPACK
160.180192.0.2.10:50410198.51.100.20:443TCPFIN ACK
170.192198.51.100.20:443192.0.2.10:50410TCPFIN ACK
180.204192.0.2.10:50410198.51.100.20:443TCPACK

More TLS samples