Tune Suricata Rules Without Losing Vendor Updates

Summary

In this post I will explain why tuning a vendor ruleset used to cost you part of its updates. I will also show how IDSTower 3.2.0 keeps your changes and the vendor’s apart.

ET Open alone carries more than 50,000 rules, and its maintainers keep revising them. Almost nobody deploys a ruleset that size untouched. Instead, you lower a priority here, turn an alert into a drop there, and put a threshold on a noisy signature. That Suricata rule tuning keeps IDS false positives under control. However, it is also where the trouble starts.

The problem

Problem 1: your change and the vendor’s change compete. You change a value on a rule, and later the vendor edits the same rule. If your value simply stays, you stop seeing their corrections. If theirs simply wins, you lose your tuning on every update. And after a year of this, nobody can say which values in a rule are yours.

Problem 2: edits without a new revision. Vendors often edit a rule and keep its revision number. Before 3.2.0, the rule’s action, priority, target, threshold, message and classtype then kept the old values. The rule page showed those old values. Worse, the Rules Transformation options, on by default, could write them over the vendor’s text on your sensors and in exports.

The usual answer is a list of modifications that your tooling re-applies after every update. It works until a vendor rewrites the part of the rule your pattern matches. Then your change stops applying, with no sign of it.

Keeping what the vendor wrote and what you changed as two separate things solves all of the above and more.

What changed in 3.2.0

Two values per field. A rule’s action, priority, target and threshold now each show the value IDSTower applies. A value you changed is a rule override. The rule editor marks it Overridden and shows the rule text’s value next to it. A Use the rule text’s value button takes you back. The other values read From the rule text.

Who wins where. Your sensors and exports receive your override where you have one, and the rule text’s value everywhere else. So ET Open rules updates reach every value you did not change, without touching the ones you did.

Bulk changes. The Rules Actions menu changes the priority, target or threshold of many rules at once. Each offers Reset To Default, which now removes the override, so the selected rules follow their rule text again. The bulk action change works the same way.

Find your changes. The Overridden filter on the Rules Management page lists the rules that have an override. So “what have we changed?” finally has a short answer.

Vendor edits arrive. The values IDSTower reads from a rule now follow its text on every feed update. It no longer matters whether the vendor bumped the revision.

Thresholds that load. IDSTower now checks a Suricata threshold the way Suricata loads it, in the rule editor and in the bulk change. Until now, you could save a threshold Suricata refuses, and the rule then failed to load on your sensors.

Why it’s safe

You should be suspicious of an upgrade that changes how IDSTower stores every rule. Here is what actually happens:

  • IDSTower keeps your values. Any stored action, priority, target or threshold that differs from the rule’s own text becomes your override. The rules your sensors run do not change.
  • There is one exception, and IDSTower records it. A rule action whose latest change on 3.1.x was the bulk Reset To Default now follows the rule text. Its deployed action can therefore change. The rule’s history records it, and the log of the first start lists those rule IDs.
  • You can review what it kept. Nobody ever set some of those values. For example, they can come from an older revision of the rule. The Overridden filter lists them, and Reset To Default returns them to the rule text.
  • Hosts and exports change once, in spelling. Every host receives one reformatted rules file, which Suricata reads the same way. Similarly, exports change in spelling, not in values, for the same rules: about 18% of ET Open in one deployment. In STIX exports those rules get new object ids. As a result, a consumer that keys on them sees them as new objects once.

The upgrade guide has the full list, and it is worth reading before you upgrade.

How IDSTower can help

IDSTower handles Suricata rules management across many sensors. Overrides sit on top of what it already does. You can already customize your rules per cluster. Now you can tune them there and keep vendor updates flowing to everything you left alone. If you already run Suricata, you can bring your existing installation under management without reinstalling it.

3.2.0 also makes the updates themselves much lighter. Four sensors pulling 51,764 ET Open rules at once now finish in 3.3 s instead of 17.5 s. The server now needs 0.3 GB of memory for that instead of 3.4 GB. The release also includes various bug fixes, and the detailed changelog has those and every other change.

If you would like to try it: