# Rule Tester

Write a Sigma or YARA rule and test it against samples, or read a Suricata rule back in plain English.

Write a detection rule and prove it fires on the right things before it reaches production. Sigma and YARA rules run against samples here, and Suricata rules read back in plain English.

## How to read it

A rule is only as good as the samples that should not match. Add the benign look-alikes, then tighten until they stay quiet.

The YARA tab does real byte-level matching, and the Sigma tab evaluates every modifier it supports. Anything unsupported is named rather than silently ignored.

The Suricata tab explains the header and each option next to the content it modifies, which is where most rule mistakes hide.

## Tab by tab

### Sigma

Open it: https://www.cyberkit.win/tools/rule-tester/?tab=sigma

Build a Sigma rule and test it against sample events in the page. Sigma describes detection logic once, and converters turn it into each SIEM's own query language.

Write each selection as one field per line, Field|modifier: value. Fields in one selection are ANDed.

The condition combines selections by name: and, or, 1 of selection*, all of them.

Paste one event per line on the Test tab, as JSON or key=value. Each row says whether the rule matched and which selections did.

### YARA

Open it: https://www.cyberkit.win/tools/rule-tester/?tab=yara

Build a YARA rule and scan text, hex or a file with it, byte by byte, in the page. Every offset shown is where the bytes were actually found.

Text strings take ascii, wide and nocase. Windows binaries keep many strings in UTF-16, so add wide when you hunt them.

Hex strings take ?? for any byte. Use it for version digits and other bytes that change between builds.

The condition says how many strings must hit: any of them, all of them, 2 of them, or a list.

### Suricata

Open it: https://www.cyberkit.win/tools/rule-tester/?tab=suricata

This explains a rule; it does not run one. It serves the moment after an alert fires, when you have to work out whether the rule means what its msg claims.

Every rule starts with seven header fields in a fixed order, then a semicolon-separated option list where order carries meaning.

A modifier such as nocase or http_uri applies to the content match right before it, not to the whole rule. Misreading that is how people conclude a rule does something it does not.

A rule with only a PCRE and no content match has nothing for the fast pattern matcher, so it runs against every packet. The tool warns about it.

## Related

- [Rule Range: Sigma](https://www.cyberkit.win/drills/rule-range/?stage=sigma)
- [Rule Range: YARA](https://www.cyberkit.win/drills/rule-range/?stage=yara)
- [Regex Tester](https://www.cyberkit.win/tools/regex-tester/)

Canonical: https://www.cyberkit.win/tools/rule-tester/

This runs in the browser. Nothing you enter is uploaded.
