I was doing a side-by-side comparison of various IDS/IPS sensors, including an inline Suricata sensor, as well as my PAN firewall. Suricata throws an alert if it detects that an HTTP Basic Authentication event crosses the sensor over an unencrypted connection, but the PAN firewall doesn't.
This should throw an alert of some kind, as HTTP Basic Authentication is commonly used as a quick and dirty credential harvesting mechanism in low-complexity phishing attacks. These authentication events traversing the network in the clear also subjects the transmitted credentials to theft at any portion of the network path.
An HTTP Basic Authentication event can be detected by the presence of the "Authentication" header in the POST request, followed by the word "Basic" and a base64 encoded string that is the username and password without any further encryption/obfuscation.
I'm also trying to create a custom signature to alert on these events, but I'm unable to, as the following pattern evaluates to less than 7 bytes:
This is as far as I got.
<vulnerability-threat version="8.1.0"> <entry name="41000"> <signature> <standard> <entry name="http-basic-auth-header"> <and-condition> <entry name="And Condition 1"> <or-condition> <entry name="Or Condition 1"> <operator> <pattern-match> <qualifier> <entry name="http-method"> <value>POST</value> </entry> <entry name="req-hdr-type"> <value>AUTHORIZATION</value> </entry> </qualifier> <pattern>Basic (.)?</pattern> <context>http-req-headers</context> <negate>no</negate> </pattern-match> </operator> </entry> </or-condition> </entry> </and-condition> <order-free>no</order-free> <scope>protocol-data-unit</scope> </entry> </standard> </signature> <default-action> <alert/> </default-action> <threatname>http-basic-auth</threatname> <severity>high</severity> <direction>client2server</direction> <affected-host> <client>yes</client> </affected-host> </entry> </vulnerability-threat>
Hi, I'm also interested in custom vulnerability signatures detecting
- server-side - offering basic authentication (WWW-Authenticate: Basic)
- client-side - offering unencrypted credentials (Authorization: Basic, with base64-encoded data)
mostly to find out misconfigured servers in the local zone
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!
The Live Community thanks you for your participation!