Detection rules › Elastic

Potential Browser Information Discovery

Source
github.com/elastic/protections-artifacts

Identifies attempts to access browser history and bookmarks files. Adversaries may enumerate information about browsers to learn more about compromised environments.

MITRE ATT&CK coverage

TacticTechniques
Discovery

Rule body

[rule]
description = """
Identifies attempts to access browser history and bookmarks files. Adversaries may enumerate information about browsers
to learn more about compromised environments.
"""
id = "b66bbe30-dd0a-4c79-ade4-2700930f8c09"
license = "Elastic License v2"
name = "Potential Browser Information Discovery"
os_list = ["windows"]
reference = ["https://attack.mitre.org/techniques/T1217/"]
version = "1.0.13"

query = '''
file where event.action == "open" and 
process.executable != null and not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20") and process.pid != 4 and
 file.path :
     ("?:\\users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\History",
      "?:\\users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks",
      "?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\History",
      "?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\Bookmarks",
      "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*.default*\\places.sqlite",
      "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*.default*\\formhistory.sqlite") and
 process.thread.Ext.call_stack_summary : "?*" and
 (
  (process.code_signature.trusted == false and not process.code_signature.status : ("errorExpired", "errorCode_endpoint*")) or
  process.code_signature.exists == false or
  (process.code_signature.subject_name : "Microsoft*" and process.thread.Ext.call_stack_contains_unbacked == true and not process.name : "powershell.exe") or
  process.executable :
                ("?:\\Users\\Public\\*",
                 "?:\\Users\\*\\Downloads\\*",
                 "?:\\Windows\\Temp\\*",
                 "?:\\Windows\\Tasks\\*",
                 "?:\\ProgramData\\*",
                 "?:\\Windows\\Microsoft.NET\\*")
 ) and
 not (process.code_signature.subject_name : ("Google LLC", "Mozilla Corporation", "BrowserWorks Ltd", "SAP SE", "Time Doctor LLC", "Emsisoft Ltd", "PIRIFORM SOFTWARE LIMITED") and
      process.code_signature.trusted == true) and
 not (process.code_signature.subject_name : "Shift Technologies Inc." and process.code_signature.status : "errorUntrustedRoot") and 
 not process.executable :
                  ("?:\\Program Files (x86)\\*.exe",
                   "?:\\Program Files\\*.exe",
                   "?:\\Windows\\System32\\svchost.exe",
                   "?:\\Windows\\BitLockerDiscoveryVolumeContents\\BitLockerToGo.exe",
                   "?:\\Users\\*\\User Data\\Default\\mozilla_downloads.exe",
                   "?:\\Users\\*\\User Data\\Default\\chrome_downloads.exe",
                   "?:\\Users\\*\\User Data\\Default\\msedge_downloads.exe",
                   "?:\\Users\\*\\AppData\\Local\\Chromium\\Application\\chrome.exe",
                   "?:\\Users\\*\\AppData\\Local\\Thorium\\Application\\thorium.exe") and
 not (process.executable : "C:\\Windows\\Temp\\RarSFX*\\scanstate.exe" and
      process.thread.Ext.call_stack_summary == "ntdll.dll|sophosed.dll|apphelp.dll|kernelbase.dll|migcore.dll|migstore.dll|migcore.dll|scanstate.exe|kernel32.dll|ntdll.dll") and
 not (process.executable : "C:\\Windows\\explorer.exe" and
      process.thread.Ext.call_stack_summary : "ntdll.dll|kernelbase.dll|hostshellextension.dll|Unbacked") and
 not _arraysearch(process.thread.Ext.call_stack, $entry,
                     $entry.symbol_info : ("*\\chrome.dll!GetHandleVerifier*",
                                           "*\\chrome.dll!ChromeMain*",
                                           "*\\nw.dll!sqlite3_dbdata_init*",
                                           "*\\nw.dll!GetHandleVerifier*",
                                           "*\\BrowserSettings.dll!SetEdgeAsDefaultBrowserOnWin8Beyond*",
                                           "*\\chrome.dll!IsSandboxedProcess*",
                                           "*BrowserSettings.dll!SetEdgeAsDefaultBrowserOnWin*"))
'''

min_endpoint_version = "8.7.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 = "T1217"
name = "Browser Information Discovery"
reference = "https://attack.mitre.org/techniques/T1217/"


[threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Stage 1: file

file where event.action == "open" and 
process.executable != null and not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20") and process.pid != 4 and
 file.path :
     ("?:\\users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\History",
      "?:\\users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks",
      "?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\History",
      "?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\Bookmarks",
      "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*.default*\\places.sqlite",
      "?:\\Users\\*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\*.default*\\formhistory.sqlite") and
 process.thread.Ext.call_stack_summary : "?*" and
 (
  (process.code_signature.trusted == false and not process.code_signature.status : ("errorExpired", "errorCode_endpoint*")) or
  process.code_signature.exists == false or
  (process.code_signature.subject_name : "Microsoft*" and process.thread.Ext.call_stack_contains_unbacked == true and not process.name : "powershell.exe") or
  process.executable :
                ("?:\\Users\\Public\\*",
                 "?:\\Users\\*\\Downloads\\*",
                 "?:\\Windows\\Temp\\*",
                 "?:\\Windows\\Tasks\\*",
                 "?:\\ProgramData\\*",
                 "?:\\Windows\\Microsoft.NET\\*")
 ) and
 not (process.code_signature.subject_name : ("Google LLC", "Mozilla Corporation", "BrowserWorks Ltd", "SAP SE", "Time Doctor LLC", "Emsisoft Ltd", "PIRIFORM SOFTWARE LIMITED") and
      process.code_signature.trusted == true) and
 not (process.code_signature.subject_name : "Shift Technologies Inc." and process.code_signature.status : "errorUntrustedRoot") and 
 not process.executable :
                  ("?:\\Program Files (x86)\\*.exe",
                   "?:\\Program Files\\*.exe",
                   "?:\\Windows\\System32\\svchost.exe",
                   "?:\\Windows\\BitLockerDiscoveryVolumeContents\\BitLockerToGo.exe",
                   "?:\\Users\\*\\User Data\\Default\\mozilla_downloads.exe",
                   "?:\\Users\\*\\User Data\\Default\\chrome_downloads.exe",
                   "?:\\Users\\*\\User Data\\Default\\msedge_downloads.exe",
                   "?:\\Users\\*\\AppData\\Local\\Chromium\\Application\\chrome.exe",
                   "?:\\Users\\*\\AppData\\Local\\Thorium\\Application\\thorium.exe") and
 not (process.executable : "C:\\Windows\\Temp\\RarSFX*\\scanstate.exe" and
      process.thread.Ext.call_stack_summary == "ntdll.dll|sophosed.dll|apphelp.dll|kernelbase.dll|migcore.dll|migstore.dll|migcore.dll|scanstate.exe|kernel32.dll|ntdll.dll") and
 not (process.executable : "C:\\Windows\\explorer.exe" and
      process.thread.Ext.call_stack_summary : "ntdll.dll|kernelbase.dll|hostshellextension.dll|Unbacked") and
 not _arraysearch(process.thread.Ext.call_stack, $entry,
                     $entry.symbol_info : ("*\\chrome.dll!GetHandleVerifier*",
                                           "*\\chrome.dll!ChromeMain*",
                                           "*\\nw.dll!sqlite3_dbdata_init*",
                                           "*\\nw.dll!GetHandleVerifier*",
                                           "*\\BrowserSettings.dll!SetEdgeAsDefaultBrowserOnWin8Beyond*",
                                           "*\\chrome.dll!IsSandboxedProcess*",
                                           "*BrowserSettings.dll!SetEdgeAsDefaultBrowserOnWin*"))

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.statuseqerrorUntrustedRootexcludes:process.code_signature.status field:"process.code_signature.status" value:"errorUntrustedRoot"
process.code_signature.subject_nameeqShift Technologies Inc.excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Shift Technologies Inc."
process.code_signature.subject_nameeqGoogle LLC, Mozilla Corporation, BrowserWorks Ltd, SAP SE, Time Doctor LLC, Emsisoft Ltd, PIRIFORM SOFTWARE LIMITEDexcludes:process.code_signature.subject_name
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executableeqC:\Windows\explorer.exeexcludes:process.executable field:"process.executable" value:"C:\Windows\explorer.exe"
process.thread.Ext.call_stack_summaryeqntdll.dll|kernelbase.dll|hostshellextension.dll|Unbackedexcludes:process.thread.Ext.call_stack_summary field:"process.thread.Ext.call_stack_summary" value:"ntdll.dll|kernelbase.dll|hostshellextension.dll|Unbacked"
process.executablewildcardC:\Windows\Temp\RarSFX*\scanstate.exeexcludes:process.executable field:"process.executable" value:"C:\Windows\Temp\RarSFX*\scanstate.exe"
process.thread.Ext.call_stack_summaryeqntdll.dll|sophosed.dll|apphelp.dll|kernelbase.dll|migcore.dll|migstore.dll|migcore.dll|scanstate.exe|kernel32.dll|ntdll.dllexcludes:process.thread.Ext.call_stack_summary field:"process.thread.Ext.call_stack_summary" value:"ntdll.dll|sophosed.dll|apphelp.dll|kernelbase.dll|migcore.dll|migstore.dll|migcore.dll|scanstate.exe|kernel32.dll|ntdll.dll"
process.thread.Ext.call_stackarray_any(no value, null check)excludes:process.thread.Ext.call_stack
process.executablewildcard?:\Program Files (x86)\*.exe, ?:\Program Files\*.exe, ?:\Windows\System32\svchost.exe, ?:\Windows\BitLockerDiscoveryVolumeContents\BitLockerToGo.exe, ?:\Users\*\User Data\Default\mozilla_downloads.exe, ?:\Users\*\User Data\Default\chrome_downloads.exe, ?:\Users\*\User Data\Default\msedge_downloads.exe, ?:\Users\*\AppData\Local\Chromium\Application\chrome.exe, ?:\Users\*\AppData\Local\Thorium\Application\thorium.exeexcludes:process.executable
user.idinS-1-5-18, S-1-5-19, S-1-5-20excludes:user.id field:"user.id" value:"S-1-5-18" field:"user.id" value:"S-1-5-19" field:"user.id" value:"S-1-5-20"

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\Roaming\Mozilla\Firefox\Profiles\*.default*\formhistory.sqlite
  • ?:\Users\*\AppData\Roaming\Mozilla\Firefox\Profiles\*.default*\places.sqlite
  • ?:\users\*\AppData\Local\Google\Chrome\User Data\Default\Bookmarks
  • ?:\users\*\AppData\Local\Google\Chrome\User Data\Default\History
  • ?:\users\*\appdata\local\microsoft\edge\user data\default\Bookmarks
  • ?:\users\*\appdata\local\microsoft\edge\user data\default\History
field:"TargetFilename" kind:wildcard
process.code_signature.existseq
  • false transforms: boolean corpus 119 (elastic 119)
field:"process.code_signature.exists" kind:eq value:"false"
process.code_signature.subject_namewildcard
  • Microsoft* corpus 22 (elastic 22)
field:"Signature" kind:wildcard value:"Microsoft*"
process.code_signature.trustedeq
  • false transforms: boolean corpus 115 (elastic 115)
field:"process.code_signature.trusted" kind:eq value:"false"
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
process.executablewildcard
  • ?:\ProgramData\* corpus 17 (elastic 17)
  • ?:\Users\*\Downloads\* corpus 12 (elastic 12)
  • ?:\Users\Public\* corpus 4 (elastic 4)
  • ?:\Windows\Microsoft.NET\* corpus 5 (elastic 5)
  • ?:\Windows\Tasks\* corpus 7 (elastic 7)
  • ?:\Windows\Temp\* corpus 9 (elastic 9)
field:"Image" kind:wildcard
process.pidne
  • 4 transforms: number corpus 44 (elastic 44)
field:"process_id" kind:ne value:"4"
process.thread.Ext.call_stack_contains_unbackedeq
  • true transforms: boolean corpus 4 (elastic 4)
field:"process.thread.Ext.call_stack_contains_unbacked" kind:eq value:"true"
process.thread.Ext.call_stack_summarywildcard
  • ?* corpus 14 (elastic 14)
field:"process.thread.Ext.call_stack_summary" kind:wildcard value:"?*"