Merge pull request #2392 from redsand/hawk_fix_regex_type

fixes error when implementing regex type, data should not be escaped
This commit is contained in:
Florian Roth
2021-12-07 06:15:10 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ logsources:
vendor_id: "11"
windows-file-event:
product: windows
category: file_create
category: file_event
conditions:
product_name: "Sysmon"
vendor_id: "11"
+2 -1
View File
@@ -328,7 +328,8 @@ class HAWKBackend(SingleTextQueryBackend):
if type(value) == SigmaRegularExpressionModifier:
value = str(value)
value = value.replace("*", "EEEESTAREEE")
value = re.escape(self.generateValueNode(value, True))
# IS REGEX, NEVER NEED TO ESCAPE!
value = self.generateValueNode(value, True)
value = value.replace("EEEESTAREEE", ".*")
endsWith = False
startsWith = False