OSSEC Kismet Rules

As part of a project I was asked to write some rules to allow OSSEC to monitor Kismet alerts. This is my first attempt at writing OSSEC rules and it is based heavily on this article I found from Mad Irish.

Please give feedback on these rules, this is my first attempt and am happy to take comments on how I can improve them.

To go with these rules I also developed a script to convert a CSV file to a rule file, this makes it much easier to manage the rules as they can be done in a spreadsheet and then converted to the XML file. Visit my OSSEC Rule Converter project for more information.

Download the rules and config files


Add this line to your ossec.conf file:

<!-- Monitor Kismet Alerts -->

Here is the decoder, I would have preferred to use a more elegant regex but with the limited regex support in OSSEC this is the best I could come up with that worked.

<!-- Custom decoder for Kismet -->
<decoder name="kismet">
	<prematch>^\w+\s+\w+\s+\d+\s+\d\d:\d\d:\d\d \d\d\d\d </prematch>

<decoder name="kismet-alert">
	<regex offset="after_parent">(\w+) (\d+) (\.+) (\.+) (\.+) (\.+) (\.+)</regex>

And I won't include the full rule set here but here is a sample. All the alerts in my file have alert level 10, that is because I currently don't know how the client wants to rate the different types of alerts so I've just cranked everything up full and they can turn it down as they see fit. The descriptions are based on the descriptions found in the Kismet README file.

<group name="syslog,kismet,">
	<rule id="110000" level="0">
		<description>Kismet Alerts.</description>

	<rule id="110001" level="10">
		<description>Possible AP spoofing/impersonation</description>
	<rule id="110002" level="10">
		<description>Airjack attack</description>
	<rule id="110003" level="10">
		<description>ARP Spoofing or conflicting APs</description>

Support The Site

I don't get paid for any of the projects on this site so if you'd like to support my work you can do so by using the affiliate links below where I either get account credits or cash back. Usually only pennies, but they all add up.