Document/describe wildcard is case insensitive#411 (#415)
* describe case-sensitive when use startswith,endswith,contains,re to aboutrulecreation-japanese #411 * describe case-insensitive when not use startswith,endswith,contains,re to aboutrulecreation #411 * slight wording update Co-authored-by: Tanaka Zakku <71482215+YamatoSecurity@users.noreply.github.com>
This commit is contained in:
@@ -280,15 +280,17 @@ detection:
|
||||
```
|
||||
|
||||
This is a list of what you can specify after the pipe. At the moment, hayabusa does not support chaining multiple pipes together.
|
||||
String matches are normally case insensitive. However, they become case sensitive whenever the following are used:
|
||||
|
||||
* startswith: Checks the string from the beginning
|
||||
* endswith: Checks the end of the string
|
||||
* contains: Checks if a word is contained in the data
|
||||
* re: Use regular expressions. (We are using the regex crate so please out the documentation at https://docs.rs/regex/1.5.4/regex/ to know how to write correct regular expressions.)
|
||||
> Caution: Some sigma rules that use regular expressions may fail to detect due to differences in how rust uses regular expressions.
|
||||
> Caution: Some sigma rules that use regular expressions may fail to detect due to differences in Rust's implementation of regex.
|
||||
|
||||
## Wildcards
|
||||
Wildcards can be used in eventkeys. In the example below, if `ProcessCommandLine` starts with the string "malware", the rule will match.
|
||||
The specification is fundamentally the same as sigma rule wildcards.
|
||||
The specification is fundamentally the same as sigma rule wildcards so will be case insensitive.
|
||||
|
||||
```yaml
|
||||
detection:
|
||||
|
||||
@@ -285,14 +285,17 @@ detection:
|
||||
```
|
||||
|
||||
パイプには以下のキーワードを指定できます。v1の時点で複数のパイプを連結することはできません。
|
||||
通常は大文字小文字を区別しません。以下のキーワードを指定した場合は大文字小文字を区別します。
|
||||
|
||||
* startswith: 指定された文字列で始まることをチェックします。
|
||||
* endswith: 指定された文字列で終わることをチェックします。
|
||||
* contains: 指定された文字列が含まれることをチェックします。
|
||||
* re: 正規表現を使用します。(正規表現の書き方については https://docs.rs/regex/1.5.4/regex/ を参照してください)。
|
||||
* re: 正規表現を使用します。(正規表現の書き方については https://docs.rs/regex/1.5.4/regex/ を参照してください)。
|
||||
> 注意: SigmaルールとHayabusaルールは正規表現の記法に一部差異があります。そのため、HayabusaではSigmaルールを正しく検知できない場合があります。
|
||||
|
||||
## ワイルドカード
|
||||
Hayabusaルールではワイルドカードを使用することができます。以下の例では、`ProcessCommandLine` が "malware" という文字列で始まる場合、このルールでログが検知されます。この仕様はSigmaルールのワイルドカードと同じです。
|
||||
|
||||
Hayabusaルールではワイルドカードを使用することができます。以下の例では、`ProcessCommandLine` が "malware" という文字列で始まる場合、このルールでログが検知されます。この仕様はSigmaルールのワイルドカードと同じく、大文字小文字を区別しません。
|
||||
|
||||
```yaml
|
||||
detection:
|
||||
|
||||
Reference in New Issue
Block a user