Detection rules › Elastic

Suspicious Access to Web Browser Credential Stores

Time window
1m
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies access to more than one web browser's credential store data by the same process. Adversaries may steal credentials from web browsers by reading files specific to the target browser.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies access to more than one web browser's credential store data by the same process. Adversaries may steal
credentials from web browsers by reading files specific to the target browser.
"""
id = "03758167-3eed-465f-9174-b284d599036d"
license = "Elastic License v2"
name = "Suspicious Access to Web Browser Credential Stores"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/globally-distributed-stealers"]
version = "1.0.37"

query = '''
sequence by process.entity_id with maxspan=1m
  [file where event.action == "open" and process.executable != null and
    user.id : ("S-1-5-21*", "S-1-12-*") and not process.pid == 4 and process.code_signature.trusted != true and
    file.path :
       (  /* chromium based browsers (chrome, edge, brave etc.) */
        "?:\\Users\\*\\AppData\\Local\\*\\User Data\\Default\\Login Data",

         /* some infostealers access only the cookies file and don't touch pwd file logins.json */
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\logins.json",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\cookies.sqlite") and
	 not process.executable :
	           ("?:\\Program Files\\*.exe",
			    "?:\\Program Files (x86)\\*.exe",
				"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
				"?:\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
				"*\\Program Files*\\Windows Defender\\MsMpEng.exe" ,
				"\\Device\\Mup\\*\\firefox.exe")] as event0
   [file where event.action == "open" and process.executable != null and
    file.path :
       ("?:\\Users\\*\\AppData\\Local\\*\\User Data\\Default\\Login Data",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\logins.json",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\cookies.sqlite") and
    not startswith~(file.path, event0.file.path)]
'''

min_endpoint_version = "8.4.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1539"
name = "Steal Web Session Cookie"
reference = "https://attack.mitre.org/techniques/T1539/"

[[threat.technique]]
id = "T1555"
name = "Credentials from Password Stores"
reference = "https://attack.mitre.org/techniques/T1555/"
[[threat.technique.subtechnique]]
id = "T1555.003"
name = "Credentials from Web Browsers"
reference = "https://attack.mitre.org/techniques/T1555/003/"



[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id.

Stage 1: file

[file where event.action == "open" and process.executable != null and
    user.id : ("S-1-5-21*", "S-1-12-*") and not process.pid == 4 and process.code_signature.trusted != true and
    file.path :
       (
        "?:\\Users\\*\\AppData\\Local\\*\\User Data\\Default\\Login Data",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\logins.json",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\cookies.sqlite") and
	 not process.executable :
	           ("?:\\Program Files\\*.exe",
			    "?:\\Program Files (x86)\\*.exe",
				"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
				"?:\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
				"*\\Program Files*\\Windows Defender\\MsMpEng.exe" ,
				"\\Device\\Mup\\*\\firefox.exe")] as event0

Stage 2: file

[file where event.action == "open" and process.executable != null and
    file.path :
       ("?:\\Users\\*\\AppData\\Local\\*\\User Data\\Default\\Login Data",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\logins.json",
        "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*default*\\cookies.sqlite") and
    not startswith~(file.path, event0.file.path)]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executablewildcard?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\ProgramData\Microsoft\Windows Defender\Platform\*\MsMpEng.exe, ?:\Program Files\Microsoft Security Client\MsMpEng.exe, *\Program Files*\Windows Defender\MsMpEng.exe, \Device\Mup\*\firefox.exeexcludes:process.executable
process.pideq4excludes:process.pid field:"process.pid" value:"4"
file.pathstarts_withevent0.file.pathexcludes:file.path field:"file.path" value:"event0.file.path"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • open corpus 52 (elastic 51, sigma 1)
field:"EventType" kind:eq value:"open"
file.pathwildcard
  • ?:\Users\*\AppData\Local\*\User Data\Default\Login Data
  • ?:\Users\*\AppData\Roaming\Mozilla\Firefox\Profiles\*default*\cookies.sqlite
  • ?:\Users\*\AppData\Roaming\Mozilla\Firefox\Profiles\*default*\logins.json
field:"TargetFilename" kind:wildcard
process.code_signature.trustedne
  • true transforms: boolean corpus 8 (elastic 8)
field:"process.code_signature.trusted" kind:ne value:"true"
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
user.idwildcard
  • S-1-12-* corpus 46 (elastic 46)
  • S-1-5-21* corpus 47 (elastic 47)
field:"user.id" kind:wildcard