Detection rules › Panther

Panther rules: macos

MacOS Browser Credential Access

#
Source
github.com/panther-labs/panther-analysis

Detects processes that contain known browser credential files in arguments.

Rule specification

AnalysisType: scheduled_query
Description: Detects processes that contain known browser credential files in arguments.
Enabled: false
SnowflakeQuery: |
  SELECT
    *
  FROM
    panther_logs.public.crowdstrike_processrollup2
  WHERE
    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 imagefilename NOT IN (
      '/bin/rm'
    )
    */
    and p_occurs_since('1 day')

DatabricksQuery: |
  SELECT
    *
  FROM
    panther_logs.crowdstrike_processrollup2
  WHERE
    (
      commandline LIKE '%/Users/%/Library/Application Support/Google/Chrome/Default/Login Data%'
      OR commandline LIKE '%/Users/%/Library/Application Support/Google/Chrome/Default/Cookies%'
      OR commandline LIKE '%/Users/%/Library/Application Support/Google/Chrome/Profile%/Cookies%'
      OR commandline LIKE '%/Users/%/Library/Cookies%'
      OR commandline LIKE '%/Users/%/Library/Application Support/Firefox/Profiles/%.default/cookies.sqlite%'
      OR commandline LIKE '%/Users/%/Library/Application Support/Firefox/Profiles/%.default/key%.db%'
      OR commandline LIKE '%/Users/%/Library/Application Support/Firefox/Profiles/%.default/logins.json%'
      OR commandline LIKE '%Login Data%'
      OR commandline LIKE '%Cookies.binarycookies%'
      OR commandline LIKE '%key4.db%'
      OR commandline LIKE '%key3.db%'
      OR commandline LIKE '%logins.json%'
      OR commandline LIKE '%cookies.sqlite%'
    )
    /*
    -- allowlist of applications
    and imagefilename NOT IN (
      '/bin/rm'
    )
    */
    AND p_occurs_since('1 day')
QueryName: "MacOS Browser Credential Access"
Schedule:
  RateMinutes: 1440
  TimeoutMinutes: 5

Stages and Predicates

Stage 1: source

Table
panther_logs.public.crowdstrike_processrollup2

Stage 2: filter

  • any of:
    • commandline matches the pattern */Users/*/Library/Application Support/Google/Chrome/Default/Login Data*
    • commandline matches the pattern */Users/*/Library/Application Support/Google/Chrome/Default/Cookies*
    • commandline matches the pattern */Users/*/Library/Application Support/Google/Chrome/Profile*/Cookies*
    • commandline matches the pattern */Users/*/Library/Cookies*
    • commandline matches the pattern */Users/*/Library/Application Support/Firefox/Profiles/*.default/cookies.sqlite*
    • commandline matches the pattern */Users/*/Library/Application Support/Firefox/Profiles/*.default/key*.db*
    • commandline matches the pattern */Users/*/Library/Application Support/Firefox/Profiles/*.default/logins.json*
    • commandline matches the pattern *Login Data*
    • commandline matches the pattern *Cookies.binarycookies*
    • commandline matches the pattern *key4.db*
    • commandline matches the pattern *key3.db*
    • commandline matches the pattern *logins.json*
    • commandline matches the pattern *cookies.sqlite*
Window
1d

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
commandlinewildcard
  • */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*
  • */Users/*/Library/Application Support/Google/Chrome/Default/Cookies*
  • */Users/*/Library/Application Support/Google/Chrome/Default/Login Data*
  • */Users/*/Library/Application Support/Google/Chrome/Profile*/Cookies*
  • */Users/*/Library/Cookies*
  • *Cookies.binarycookies*
  • *Login Data*
  • *cookies.sqlite*
  • *key3.db*
  • *key4.db*
  • *logins.json*
field:"CommandLine" kind:wildcard

Output fields

Fields the rule emits when it matches, drawn from the rule's alert_context.

Field
*

MacOS Browser Credential Access (crowdstrike_fdrevent table)

#
Source
github.com/panther-labs/panther-analysis

Detects processes that contain known browser credential files in arguments. (crowdstrike_fdrevent table)

Rule specification

# 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
SnowflakeQuery: |
  SELECT
    *
  FROM panther_logs.public.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')

DatabricksQuery: |
  SELECT
    *
  FROM panther_logs.crowdstrike_fdrevent
  WHERE
    fdr_event_type = 'ProcessRollup2' AND
    (
      event:CommandLine LIKE '%/Users/%/Library/Application Support/Google/Chrome/Default/Login Data%'
      OR event:CommandLine LIKE '%/Users/%/Library/Application Support/Google/Chrome/Default/Cookies%'
      OR event:CommandLine LIKE '%/Users/%/Library/Application Support/Google/Chrome/Profile%/Cookies%'
      OR event:CommandLine LIKE '%/Users/%/Library/Cookies%'
      OR event:CommandLine LIKE '%/Users/%/Library/Application Support/Firefox/Profiles/%.default/cookies.sqlite%'
      OR event:CommandLine LIKE '%/Users/%/Library/Application Support/Firefox/Profiles/%.default/key%.db%'
      OR event:CommandLine LIKE '%/Users/%/Library/Application Support/Firefox/Profiles/%.default/logins.json%'
      OR event:CommandLine LIKE '%Login Data%'
      OR event:CommandLine LIKE '%Cookies.binarycookies%'
      OR event:CommandLine LIKE '%key4.db%'
      OR event:CommandLine LIKE '%key3.db%'
      OR event:CommandLine LIKE '%logins.json%'
      OR event:CommandLine LIKE '%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

Stages and Predicates

Stage 1: source

Table
panther_logs.public.crowdstrike_fdrevent

Stage 2: filter

  • fdr_event_type is ProcessRollup2
  • any of:
    • event:CommandLine matches the pattern */Users/*/Library/Application Support/Google/Chrome/Default/Login Data*
    • event:CommandLine matches the pattern */Users/*/Library/Application Support/Google/Chrome/Default/Cookies*
    • event:CommandLine matches the pattern */Users/*/Library/Application Support/Google/Chrome/Profile*/Cookies*
    • event:CommandLine matches the pattern */Users/*/Library/Cookies*
    • event:CommandLine matches the pattern */Users/*/Library/Application Support/Firefox/Profiles/*.default/cookies.sqlite*
    • event:CommandLine matches the pattern */Users/*/Library/Application Support/Firefox/Profiles/*.default/key*.db*
    • event:CommandLine matches the pattern */Users/*/Library/Application Support/Firefox/Profiles/*.default/logins.json*
    • event:CommandLine matches the pattern *Login Data*
    • event:CommandLine matches the pattern *Cookies.binarycookies*
    • event:CommandLine matches the pattern *key4.db*
    • event:CommandLine matches the pattern *key3.db*
    • event:CommandLine matches the pattern *logins.json*
    • event:CommandLine matches the pattern *cookies.sqlite*
Window
1d

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event:CommandLinewildcard
  • */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*
  • */Users/*/Library/Application Support/Google/Chrome/Default/Cookies*
  • */Users/*/Library/Application Support/Google/Chrome/Default/Login Data*
  • */Users/*/Library/Application Support/Google/Chrome/Profile*/Cookies*
  • */Users/*/Library/Cookies*
  • *Cookies.binarycookies*
  • *Login Data*
  • *cookies.sqlite*
  • *key3.db*
  • *key4.db*
  • *logins.json*
field:"event:CommandLine" kind:wildcard
fdr_event_typeeq
  • ProcessRollup2
field:"fdr_event_type" kind:eq value:"ProcessRollup2"

Output fields

Fields the rule emits when it matches, drawn from the rule's alert_context.

Field
*