This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Possible to create IPS rule to block SSH?

I realize that SSH is encrypted and that the IPS will not be able to detect the encrypted traffic, but I was wondering if there's an SSH connect string that could be added to block SSH with the IPS.  The reason for this is that its too easy for clients behind ASL to tunnel to their home boxes to bypass the security policy on any open port.

Any suggestions?


This thread was automatically locked due to age.
  • That's why some shops don't use rules and use only proxies; I don't think SSH will be able to traverse the HTTP proxy.

    Use a sniffer utility and see what the raw handshake packets look like...
  • Before an ssh tunnel is setup, the client and the server both exchange plain text information stating the protocol they use. It looks something like:

    Code:
    SSH-2.0-ServerOrClientAppName



    You could create a filter that looks something like:

    Code:
    flow:established,from_server; content:"SSH-"; nocase; pcre:"/^SSH-/";



    I haven't tested that out, but it should work and catch SSH on any port as long as you use tcp $EXTERNAL_NET any -> $HOME_NET any for your selector.

    Try it out, it might catch on things that have the string SSH- at the beginning of a line though.
  • So maybe the chance of a false positive could be reduced a little by using

    ^SSH-[0-9]+\.[0-9]+-

    That's presuming they don't use versions like 3.a...