Detection rules › Elastic
Crypto Wallet File Access by Unsigned or Untrusted Binary
Detects when a suspicious process attempts to access a crypto wallet sensitive file. This is an alpha version of this rule and meant to be used to assess and test.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| macOS | ESF event open (NOTIFY): Fires after the kernel grants a process access to open a file. |
Rule body
[rule]
description = """
Detects when a suspicious process attempts to access a crypto wallet sensitive file. This is an alpha version of this
rule and meant to be used to assess and test.
"""
id = "a3050eae-c8ae-434d-aeff-97112eddcb48"
license = "Elastic License v2"
name = "Crypto Wallet File Access by Unsigned or Untrusted Binary"
os_list = ["macos"]
reference = ["https://www.elastic.co/security-labs/beyond-the-wail"]
version = "1.0.19"
query = '''
file where event.action == "open" and
file.path like~ ("/Users/*/.electrum/*",
"/Users/*/Library/Application_Support/*/Default/Extensions/*",
"/Users/*/Library/Application Support/*/Default/Local Extension Settings/*",
"/Users/*/Library/Application Support/Electrum/*",
"/Users/*/Library/Application Support/Exodus/*",
"/Users/*/Library/Application Support/Coinomi/*",
"/Users/*/Library/Application Support/Atomic/*",
"/Users/*/Library/Application Support/@trezor/*",
"/Users/*/Library/Application Support/Ledger Live/*",
"/Users/*/Library/Application Support/WasabiWallet/*",
"/Users/*/Monero/*",
"/Users/*/Library/Application Support/Bitcoin/*",
"/Users/*/Library/Application Support/Litecoin/*",
"/Users/*/Library/Application Support/DashCore/*",
"/Users/*/Library/Application Support/ElectronCash/*",
"/Users/*/Library/Application Support/Guarda/*",
"/Users/*/Library/Application Support/Dogecoin/*",
"/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/BraveWallet/*",
"/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/Default/Local Extension Settings/pgojbichloddijphfmfhhfolimnhjklk/*",
"/Users/*/Library/Application Support/Firefox/Profiles/*/extensions/*") and
process.executable != null and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
not process.code_signature.signing_id : ("rg-*", "git-*", "rg") and
not process.executable like "/opt/homebrew/Cellar/rtk/*/bin/rtk" and
not (Effective_process.executable like "/Library/Elastic/Agent/data/elastic-agent-*/elastic-agent.app/Contents/MacOS/elastic-agent" and process.executable like "/Library/Elastic/Agent/data/elastic-agent-*/components/osquery-extension.ext")
'''
min_endpoint_version = "8.11.1"
optional_actions = []
[[actions]]
action = "kill_process"
field = "Effective_process.executable"
state = 0
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"
[[threat.technique.subtechnique]]
id = "T1552.001"
name = "Credentials In Files"
reference = "https://attack.mitre.org/techniques/T1552/001/"
[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[internal]
min_endpoint_version = "8.11.1"
Stages and Predicates
Stage 1: file
file where event.action == "open" and
file.path like~ ("/Users/*/.electrum/*",
"/Users/*/Library/Application_Support/*/Default/Extensions/*",
"/Users/*/Library/Application Support/*/Default/Local Extension Settings/*",
"/Users/*/Library/Application Support/Electrum/*",
"/Users/*/Library/Application Support/Exodus/*",
"/Users/*/Library/Application Support/Coinomi/*",
"/Users/*/Library/Application Support/Atomic/*",
"/Users/*/Library/Application Support/@trezor/*",
"/Users/*/Library/Application Support/Ledger Live/*",
"/Users/*/Library/Application Support/WasabiWallet/*",
"/Users/*/Monero/*",
"/Users/*/Library/Application Support/Bitcoin/*",
"/Users/*/Library/Application Support/Litecoin/*",
"/Users/*/Library/Application Support/DashCore/*",
"/Users/*/Library/Application Support/ElectronCash/*",
"/Users/*/Library/Application Support/Guarda/*",
"/Users/*/Library/Application Support/Dogecoin/*",
"/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/BraveWallet/*",
"/Users/*/Library/Application Support/BraveSoftware/Brave-Browser/Default/Local Extension Settings/pgojbichloddijphfmfhhfolimnhjklk/*",
"/Users/*/Library/Application Support/Firefox/Profiles/*/extensions/*") and
process.executable != null and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
not process.code_signature.signing_id : ("rg-*", "git-*", "rg") and
not process.executable like "/opt/homebrew/Cellar/rtk/*/bin/rtk" and
not (Effective_process.executable like "/Library/Elastic/Agent/data/elastic-agent-*/elastic-agent.app/Contents/MacOS/elastic-agent" and process.executable like "/Library/Elastic/Agent/data/elastic-agent-*/components/osquery-extension.ext")
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Effective_process.executable | wildcard | /Library/Elastic/Agent/data/elastic-agent-*/elastic-agent.app/Contents/MacOS/elastic-agent | excludes:Effective_process.executable field:"Effective_process.executable" value:"/Library/Elastic/Agent/data/elastic-agent-*/elastic-agent.app/Contents/MacOS/elastic-agent" |
process.executable | wildcard | /Library/Elastic/Agent/data/elastic-agent-*/components/osquery-extension.ext | excludes:process.executable field:"process.executable" value:"/Library/Elastic/Agent/data/elastic-agent-*/components/osquery-extension.ext" |
process.code_signature.signing_id | wildcard | rg-*, git-*, rg | excludes:process.code_signature.signing_id field:"process.code_signature.signing_id" value:"rg-*" field:"process.code_signature.signing_id" value:"git-*" field:"process.code_signature.signing_id" value:"rg" |
process.executable | wildcard | /opt/homebrew/Cellar/rtk/*/bin/rtk | excludes:process.executable field:"process.executable" value:"/opt/homebrew/Cellar/rtk/*/bin/rtk" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"open" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard |
process.code_signature.exists | eq |
| field:"process.code_signature.exists" kind:eq value:"false" |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"false" |
process.executable | is_not_null | field:"Image" kind:is_not_null |