Skip to content

Commit

Permalink
Added test for issue
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspatzke committed Oct 13, 2024
1 parent b0b58b0 commit 9a4b97e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_processing_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,22 @@ def test_crowdstrike_falcon_image_with_placeholder(resolver : ProcessingPipeline
backend = LogScaleBackend(pipeline)
assert backend.convert(sigma_rule) == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i ImageFileName=/^foo\\.exe$/i or ImageFileName=/^bar\\.exe$/i or ImageFileName=/^test\\.exe$/i"

def test_crowdstrike_falcon_image_contains_with_trailing_backslash(resolver : ProcessingPipelineResolver):
sigma_rule = SigmaCollection.from_yaml("""
title: Image with Placeholder Test
status: test
logsource:
category: process_creation
product: windows
detection:
sel:
Image|contains: ":\\\\Windows\\\\System32\\\\"
condition: sel
""")
pipeline = resolver.resolve_pipeline("crowdstrike_falcon")
backend = LogScaleBackend(pipeline)
assert "ImageFileName=/\\\\Windows\\\\System32\\\\/i" in backend.convert(sigma_rule)


def test_crowdstrike_falcon_pipeline_parentimage(
resolver: ProcessingPipelineResolver, process_creation_sigma_rule_parentimage
Expand Down

0 comments on commit 9a4b97e

Please sign in to comment.