Sample captures, Remote access and file shares

SSH handshake from a Go client

Version banners and key exchange offers between a Go SSH client and OpenSSH 9.6.

Packets
14
Duration
0.156 s
Size
1.8 KB
Protocols
TCP, SSH
License
CC0

What it shows

The start of an SSH session: the server announces SSH-2.0-OpenSSH_9.6p1, the client SSH-2.0-Go (the banner of Go's SSH library, common in scanners and brute-forcers), and both send their key exchange offers. Everything after that is encrypted.

Suricata reads the banners with ssh.proto and ssh.software. In Snort 3, match the banner text at the start of each direction.

Rules for this capture

Suricata 8 and 7

Try these rules
alert ssh any any -> any any (msg:"SSH client built with Go"; ssh.software; content:"Go"; bsize:2; sid:1000001; rev:1;)
alert ssh any any -> any any (msg:"OpenSSH 9.6 server"; ssh.software; content:"OpenSSH_9.6"; startswith; sid:1000002; rev:1;)
alert tcp any any -> any 22 (msg:"SSH client built with Go"; flow:established,to_server; content:"SSH-2.0-Go|0d 0a|", depth 12; sid:1000001; rev:1;)
alert tcp any 22 -> any any (msg:"OpenSSH 9.6 server"; flow:established,to_client; content:"SSH-2.0-OpenSSH_9.6", depth 19; sid:1000002; rev:1;)

Packets

No.TimeSourceDestinationProtocolInfo
10.000203.0.113.50:53344198.51.100.20:22TCPSYN
20.012198.51.100.20:22203.0.113.50:53344TCPSYN ACK
30.024203.0.113.50:53344198.51.100.20:22TCPACK
40.036198.51.100.20:22203.0.113.50:53344TCPPSH ACK, SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.5
50.048203.0.113.50:53344198.51.100.20:22TCPACK
60.060203.0.113.50:53344198.51.100.20:22TCPPSH ACK, SSH-2.0-Go
70.072198.51.100.20:22203.0.113.50:53344TCPACK
80.084198.51.100.20:22203.0.113.50:53344TCPPSH ACK, SSH key exchange init
90.096203.0.113.50:53344198.51.100.20:22TCPACK
100.108203.0.113.50:53344198.51.100.20:22TCPPSH ACK, SSH key exchange init
110.120198.51.100.20:22203.0.113.50:53344TCPACK
120.132203.0.113.50:53344198.51.100.20:22TCPFIN ACK
130.144198.51.100.20:22203.0.113.50:53344TCPFIN ACK
140.156203.0.113.50:53344198.51.100.20:22TCPACK

More Remote access and file shares samples