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 rulesalert 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;)
Snort 3
Try these rulesalert 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. | Time | Source | Destination | Protocol | Info |
|---|---|---|---|---|---|
| 1 | 0.000 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | SYN |
| 2 | 0.012 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | SYN ACK |
| 3 | 0.024 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | ACK |
| 4 | 0.036 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | PSH ACK, TLS ClientHello |
| 5 | 0.048 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | ACK |
| 6 | 0.060 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | PSH ACK, TLS ServerHello, Certificate, ServerHelloDone |
| 7 | 0.072 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | ACK |
| 8 | 0.084 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | PSH ACK, TLS ClientKeyExchange, ChangeCipherSpec, Handshake (encrypted) |
| 9 | 0.096 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | ACK |
| 10 | 0.108 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | PSH ACK, TLS ChangeCipherSpec, Handshake (encrypted) |
| 11 | 0.120 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | ACK |
| 12 | 0.132 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | PSH ACK, TLS Application data |
| 13 | 0.144 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | ACK |
| 14 | 0.156 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | PSH ACK, TLS Application data |
| 15 | 0.168 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | ACK |
| 16 | 0.180 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | FIN ACK |
| 17 | 0.192 | 198.51.100.20:443 | 192.0.2.10:50410 | TCP | FIN ACK |
| 18 | 0.204 | 192.0.2.10:50410 | 198.51.100.20:443 | TCP | ACK |
More TLS samples
- TLS ClientHello with SNI: A TLS 1.3 ClientHello for login.badexample.net.