So, a relative newbie to suricata, but I am having problems with a rule. Even when I make this the only signature in a ruleset, the engine never fires this alert.
alert ssh any any → any any (msg:“Corporate policy violation, detected SSH protocol”; content:“SSH-”; target:dest_ip; sid:1000013; rev:1;)
I have also tried:
alert ssh any any → any any (msg:“Corporate policy violation, SSH traffic not allowed on OT network”; ssh.proto; content:“SSH-”; nocase; sid:1000013; rev:1;)
and:
alert ssh any any → any any (msg:“match SSH software string”; ssh.software; content:“openssh”; nocase; sid:1000020;)
all to no avail. In wireshark I can verify that the packet is SSH and does contain the content “SSH-” and other bits I am testing for:
alert ssh any any -> any any (msg:"Corporate policy violation, SSH traffic not allowed on OT network"; ssh.software; content:"SSH"; nocase; sid:1000015; rev:1;)
Peter, thanks for the help. Sorry I didn’t reply sooner but I was out last week. I still seem to have a problem, as even if I cut and paste your rule and make it the ONLY rule on the system, it does not seem to fire. Any ideas on how to further troubleshoot?
OK, so the only rule running on the system is:
alert ssh any any → any any (msg:“Corporate policy violation, SSH traffic not allowed on OT network”; ssh.software; content:“SSH”; nocase; sid:1000013; rev:1;)
I have built and pushed the rule. When I ran the pcap I sent you, I still get no alerts in Evebox.
Is there something in the SELKS configuration that could be causing this?
If the rules is uploaded , i can think of two options to check/try:
1 - restart the Suricata docker docker-compose restart suricata
then give it cpl of minutes to start and run the test again
2 - check in containers-data/suricata/logs/suricata.log for any errors for example
The packet checksums originate in the pcap. It’s not uncommon for the checksums to be wrong/missing. This is an artifact of the way the pcap was created and/or edited.