Skip to content

Commit

Permalink
Merge pull request #9 from SigmaHQ/fdr_updates
Browse files Browse the repository at this point in the history
FDR pipeline updates
  • Loading branch information
thomaspatzke authored Jul 7, 2024
2 parents 009f4b5 + 7e69f06 commit 1d673ea
Show file tree
Hide file tree
Showing 9 changed files with 1,344 additions and 1,399 deletions.
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,22 @@

This is the CrowdStrike backend for pySigma. It provides the package `sigma.backends.crowdstrike` with the `LogScaleBackend` class.

Further it contains the following processing pipelines:
- `crowdstrike_fdr_pipeline` which was mainly written for the Falcon data Replicator data but Splunk queries should work in the legacy CrowdStrike Splunk
- `crowdstrike_falcon_pipeline` which was written for data collected by the CrowdStrike Falcon Agent stored in CrowdStrike Logscale. It effectively translates rules to the CrowdStrike Query Language used by LogScale.
Further it contains the following processing pipelines under `sigma.pipelines.crowdstrike`:
- `crowdstrike_fdr_pipeline` which was mainly written for the Falcon Data Replicator data but Splunk queries should work in the legacy CrowdStrike Splunk. The pipeline can also be used with other backends in case you ingest Falcon data to a different SIEM.
- `crowdstrike_falcon_pipeline` which was written for data collected by the CrowdStrike Falcon Agent stored natively in CrowdStrike Logscale. It effectively translates rules to the CrowdStrike Query Language used by LogScale. This is designed to be used with the `LogScaleBackend`.

## Supported Rules
### Falcon Pipeline
The following categories and products are supported by the `crowdstrike_falcon_pipeline` pipeline:
The following categories and products are supported by the pipelines:
| category | product | CrowdStrike event_simpleName |
|-|-|-|
|`process_creation` | `windows`, `linux`| ProcessRollup2 |
|`process_creation` | `windows`, `linux`| ProcessRollup2, SyntheticProcessRollup2 |
|`network_connection` | `windows`| NetworkConnectIP4, NetworkReceiveAcceptIP4 |
|`dns_query` | `windows`| DnsRequest |
|`image_load` | `windows`| ClassifiedModuleLoad |
|`driver_load` | `windows`| DriverLoad |
|`ps_script` | `windows`| CommandHistory, ScriptControlScanTelemetry |

### Falcon Data Replicator Pipeline
The following categories and products are supported by the `crowdstrike_fdr_pipeline` pipeline:
| category | product | CrowdStrike event_simpleName |
|-|-|-|
|`process_creation` | `windows`| ProcessRollup2 |
|`network_connection` | `windows`| NetworkConnectIP4, NetworkReceiveAcceptIP4 |

There's likely more windows categories that can be supported by the pipelines; We will be adding support gradually as availability allows.

## Limitations and caveats:
Expand All @@ -43,6 +36,9 @@ Falcon `dns_query` events return the IP records of a successful query in [semico
- **Unsupported fields**:
Falcon does not always capture the same fields as sysmon for the categories supported. In cases where the rule requires unsupported fields, the transformation fails.

- **PS Script Logging**:
There is not a clean equivelant between the events Falcon generates and PowerShell Script Logging. Our transformation is a best-effort approach that contains multiple fields that might contain the value in the field.

## References
- [LogScale Community Content](https://github.com/CrowdStrike/logscale-community-content)

Expand Down
15 changes: 0 additions & 15 deletions sigma/backends/crowdstrike/logscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,6 @@ def convert_condition_field_eq_val_cidr(
state, cond.field, super().convert_condition_field_eq_val_cidr(cond, state)
).postprocess(None, cond)

def convert_condition_as_in_expression(
self, cond: ConditionOR, state: ConversionState
) -> LogScaleDeferredInOperator:
return LogScaleDeferredInOperator(
state,
cond.args[0].field,
super().convert_condition_as_in_expression(cond, state),
).postprocess(None, cond)

def convert_condition_field_eq_val_str(
self, cond: ConditionFieldEqualsValueExpression, state: ConversionState
) -> Union[str, DeferredQueryExpression]:
Expand Down Expand Up @@ -293,12 +284,6 @@ def convert_condition_field_eq_val_str(
):
expr = self.contains_expression
value = cond.value[1:-1]
elif ( # wildcard match expression: string contains wildcard
self.wildcard_match_expression is not None
and cond.value.contains_special()
):
expr = self.wildcard_match_expression
value = cond.value
else:
expr = self.re_exact_match
value = cond.value
Expand Down
4 changes: 2 additions & 2 deletions sigma/pipelines/crowdstrike/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .crowdstrike_fdr import crowdstrike_fdr_pipeline
from .crowdstrike_falcon import crowdstrike_falcon_pipeline
from .crowdstrike import crowdstrike_fdr_pipeline
from .crowdstrike import crowdstrike_falcon_pipeline

pipelines = {
"crowdstrike_fdr": crowdstrike_fdr_pipeline,
Expand Down
Loading

0 comments on commit 1d673ea

Please sign in to comment.