-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce detections and rules for Crowdstrike.FDREvent (#648)
- Loading branch information
Showing
26 changed files
with
783 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
queries/aws_queries/AWS_Authentication_from_CrowdStrike_Unmanaged_Device_FDREvent.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This file is the part of the Crowdstrike FDREvent migration, and it's the equivalent of | ||
# https://github.com/panther-labs/panther-analysis/blob/b61db1ecf3967c5f6a44c1782f8891fd5f54384d/queries/aws_queries/AWS_Authentication_from_CrowdStrike_Unmanaged_Device.yml | ||
# | ||
AnalysisType: scheduled_query | ||
Description: Detects AWS Authentication events with IP Addresses not found in CrowdStrike's AIP List | ||
Enabled: false | ||
Query: | | ||
SELECT * | ||
FROM aws_cloudtrail | ||
WHERE p_occurs_since('1 days') | ||
AND eventName IN ('ConsoleLogin', 'SignIn', 'GetSessionToken') | ||
AND eventSource IN ('sts.amazonaws.com', 'signin.amazonaws.com') | ||
AND sourceIPAddress NOT IN | ||
( | ||
SELECT DISTINCT aip | ||
FROM crowdstrike_fdrevent | ||
WHERE p_occurs_since('3 days') AND crowdstrike_fdrevent.fdr_event_type = 'aid_master' | ||
) | ||
QueryName: AWS Authentication from CrowdStrike Unmanaged Device (crowdstrike_fdrevent table) | ||
Schedule: | ||
RateMinutes: 1440 | ||
TimeoutMinutes: 3 |
67 changes: 67 additions & 0 deletions
67
queries/crowdstrike_queries/CrowdStrike_Large_Zip_Creation_FDREvent.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# This file is the part of the Crowdstrike FDREvent migration, and it's the equivalent of | ||
# https://github.com/panther-labs/panther-analysis/blob/b61db1ecf3967c5f6a44c1782f8891fd5f54384d/queries/crowdstrike_queries/CrowdStrike_Large_Zip_Creation.yml | ||
# | ||
AnalysisType: scheduled_query | ||
Description: Detects creation of large zip files, which can indicate attempts of exfiltration (crowdstrike_fdrevent table) | ||
Enabled: false | ||
Query: | | ||
select | ||
ppr.event:CommandLine as parent_commandline, | ||
zip_proc.* | ||
from | ||
( | ||
select | ||
zips.*, | ||
pr2.event:TargetProcessId as process_targetpid, | ||
pr2.event:ParentProcessId as process_parentpid, | ||
pr2.event:CommandLine as process_commandline | ||
from | ||
( | ||
select | ||
* | ||
from | ||
crowdstrike_fdrevent | ||
where | ||
event_simpleName IN ( | ||
'GzipFileWritten', | ||
'SevenZipFileWritten', | ||
'ZipFileWritten', | ||
'BZip2FileWritten' | ||
) | ||
and p_occurs_since('1 day') | ||
and CAST(event:Size as integer) > 10000000 | ||
) zips | ||
left join crowdstrike_fdrevent pr2 | ||
on zips.ContextProcessId = pr2.TargetProcessId_decimal and pr2.fdr_event_type = 'ProcessRollup2' | ||
where | ||
pr2.event:CommandLine like any( | ||
'%zip%' | ||
) | ||
and not ( | ||
pr2.event:CommandLine like any ( | ||
'%curl%', | ||
'/Application%', | ||
'%install%' | ||
) | ||
) | ||
) zip_proc | ||
LEFT JOIN crowdstrike_fdrevent ppr | ||
on zip_proc.process_parentpid = ppr.TargetProcessId_decimal and ppr.fdr_event_type = 'ProcessRollup2' | ||
where | ||
( | ||
(parent_commandline is null) or | ||
not (parent_commandline like any ( | ||
'%homebrew%', | ||
'%Homebrew%', | ||
'/Application%', | ||
'%install%' | ||
) | ||
) | ||
) | ||
QueryName: CrowdStrike Large Zip Creation (crowdstrike_fdrevent table) | ||
Schedule: | ||
RateMinutes: 1440 | ||
TimeoutMinutes: 5 |
38 changes: 38 additions & 0 deletions
38
queries/crowdstrike_queries/MacOS_Browser_Credential_Access_FDREvent.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This file is the part of the Crowdstrike FDREvent migration, and it's the equivalent of | ||
# https://github.com/panther-labs/panther-analysis/blob/b61db1ecf3967c5f6a44c1782f8891fd5f54384d/queries/crowdstrike_queries/MacOS_Browser_Credential_Access.yml | ||
# | ||
AnalysisType: scheduled_query | ||
Description: Detects processes that contain known browser credential files in arguments. (crowdstrike_fdrevent table) | ||
Enabled: false | ||
Query: | | ||
SELECT | ||
* | ||
FROM crowdstrike_fdrevent | ||
WHERE | ||
fdr_event_type = 'ProcessRollup2' AND | ||
event:CommandLine LIKE ANY ( | ||
'%/Users/%/Library/Application Support/Google/Chrome/Default/Login Data%', | ||
'%/Users/%/Library/Application Support/Google/Chrome/Default/Cookies%', | ||
'%/Users/%/Library/Application Support/Google/Chrome/Profile%/Cookies%', | ||
'%/Users/%/Library/Cookies%', | ||
'%/Users/%/Library/Application Support/Firefox/Profiles/%.default/cookies.sqlite%', | ||
'%/Users/%/Library/Application Support/Firefox/Profiles/%.default/key%.db%', | ||
'%/Users/%/Library/Application Support/Firefox/Profiles/%.default/logins.json%', | ||
'%Login Data%', | ||
'%Cookies.binarycookies%', | ||
'%key4.db%', | ||
'%key3.db%', | ||
'%logins.json%', | ||
'%cookies.sqlite%' | ||
) | ||
/* | ||
-- allowlist of applications | ||
and event:ImageFileName NOT IN ( | ||
'/bin/rm' | ||
) | ||
*/ | ||
and p_occurs_since('1 day') | ||
QueryName: MacOS Browser Credential Access (crowdstrike_fdrevent table) | ||
Schedule: | ||
RateMinutes: 1440 | ||
TimeoutMinutes: 5 |
Oops, something went wrong.