Sigma Rules Examples

0xffccdd
3 min readDec 2, 2022

--

Sigma rules are a powerful tool for enhancing the capabilities of SIEM (Security Information and Event Management) systems. By providing a generic signature format that allows users to easily define their own custom rules for detecting and analyzing security events, sigma rules enable security analysts to quickly and easily adapt their SIEM system to meet their specific needs.

We’ve built a platform for Cloud Detection & Response in AWS, Azure, and GCP — you can grab a demo here. You can also download free playbooks we’ve written on how to respond to security incidents in AWS, Azure, and GCP.

One of the key benefits of sigma rules is their simplicity. Unlike traditional SIEM rules, which often require complex code and specialized knowledge, sigma rules are written in a straightforward, easy-to-understand syntax. This makes it possible for security analysts with little or no programming experience to create their own custom rules and adapt to new threats and security challenges as they arise.

To illustrate the capabilities of sigma rules, let’s consider a few examples. Suppose you want to monitor your network for instances of brute-force attacks, in which an attacker tries to guess a password by repeatedly attempting to log in to a system using different combinations of characters. With sigma rules, you could create a custom rule that would trigger an alert whenever a large number of failed login attempts are detected from the same IP address within a short period of time.

Here’s an example of how such a rule might look in sigma syntax:

title: Brute-force attack detecteddescription: This rule detects instances of brute-force attacks by looking for a large number of failed login attempts from the same IP address within a short period of time.author: John Doetags: brute-force, password guessing, securityindex: auditdetection:selection:event_id: 4625log_name: securitycondition:selection:failed_login_count > 10duration < 30mip_address = *

In this example, the rule is titled “Brute-force attack detected” and includes a brief description of what it does. It also includes the name of the author and some relevant tags, as well as the index and event ID of the log where the rule will be applied. The detection section defines the criteria that will trigger the rule, in this case, a large number of failed login attempts from the same IP address within a short period of time.

Of course, this is just one simple example of what sigma rules can do. With sigma, you can create rules for detecting all sorts of security events, from malicious network activity to suspicious user behavior. For instance, you could create a rule that alerts you whenever a user with administrator privileges logs in to your system from an unusual location, or a rule that triggers an alert when a user attempts to access sensitive files without the proper permissions.

Here’s another example rule, from the official Sigma Github repository:

Another advantage of sigma rules is their flexibility. Because they are written in a generic format, sigma rules can be applied to any log data that is compatible with the rule’s syntax. This means that you can use the same rule on different logs, or even on logs from different systems, without having to rewrite the rule each time. This makes it easy to scale your rules and apply them to a wide range of security data, without having to worry about compatibility issues.

Overall, sigma rules are a valuable tool for enhancing the capabilities of SIEM systems and enabling security analysts to better protect their networks and systems. By providing a simple, flexible, and powerful way to define custom rules for detecting and analyzing security events, sigma rules enable security analysts to quickly and easily adapt to new threats and security challenges, and to keep their networks and systems safe from harm.

For more, see this video from Lima Charlie:

--

--