T1657

Financial Theft

This detection identifies behaviors associated with adversary financial theft operations including cryptocurrency wallet credential harvesting, business email compromise (BEC) infrastructure setup, ransomware extortion precursors, and unauthorized access to financial application data. The detection covers multiple attack vectors: process-level access to browser-stored cryptocurrency wallet extensions and keystore files, suspicious inbox rule creation indicative of BEC email redirection, mass file enumeration of financial document paths, and execution of known financial theft malware behaviors such as those exhibited by InvisibleFerret and BeaverTail. Detection logic correlates file access events against high-value financial paths (wallet.dat, MetaMask/Exodus/Coinbase browser extension storage, banking application credential stores) with suspicious process ancestry and user context anomalies.

Microsoft Sentinel / Defender
kusto
let CryptoWalletPaths = dynamic([
    "wallet.dat", "keystore", ".ethereum", ".bitcoin", "electrum",
    "exodus", "metamask", "coinbase", "ledger", "trezor",
    "\\AppData\\Roaming\\Exodus\\", "\\AppData\\Local\\Coinbase\\",
    "\\AppData\\Roaming\\Electrum\\", "\\AppData\\Local\\Google\\Chrome\\User Data\\"
]);
let FinancialDocPaths = dynamic([
    "bank", "invoice", "wire_transfer", "swift", "routing_number",
    "account_number", "tax_return", "payroll", "credit_card"
]);
let SuspiciousTools = dynamic([
    "powershell.exe", "cmd.exe", "python.exe", "python3.exe",
    "node.exe", "wscript.exe", "cscript.exe"
]);
// Crypto wallet file access by suspicious processes
let CryptoWalletAccess = DeviceFileEvents
| where TimeGenerated > ago(1h)
| where ActionType in ("FileRead", "FileAccessed", "FileCopied")
| where FileName has_any (CryptoWalletPaths)
    or FolderPath has_any (CryptoWalletPaths)
| where InitiatingProcessFileName in~ (SuspiciousTools)
    or InitiatingProcessParentFileName in~ (SuspiciousTools)
| where not (
    InitiatingProcessFileName in~ ("chrome.exe", "msedge.exe", "firefox.exe", "brave.exe")
    and FolderPath has "AppData"
)
| extend AlertType = "CryptoWalletAccess"
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName,
    InitiatingProcessCommandLine, InitiatingProcessParentFileName,
    FolderPath, FileName, AlertType;
// Browser extension storage enumeration (MetaMask, Coinbase Wallet, etc.)
let ExtensionEnumeration = DeviceFileEvents
| where TimeGenerated > ago(1h)
| where FolderPath has_all ("Chrome", "Extensions")
    or FolderPath has_all ("Firefox", "extensions")
| where ActionType in ("FileRead", "FileAccessed")
| where FileName in~ ("data", "Local State", "Login Data", "Web Data", "000003.log")
| where InitiatingProcessFileName !in~ ("chrome.exe", "msedge.exe", "firefox.exe", "brave.exe", "opera.exe")
| extend AlertType = "BrowserExtensionEnum"
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName,
    InitiatingProcessCommandLine, InitiatingProcessParentFileName,
    FolderPath, FileName, AlertType;
// Exchange/M365 inbox rule creation for BEC redirection
let BECEmailRules = CloudAppEvents
| where TimeGenerated > ago(1h)
| where ActionType in ("New-InboxRule", "Set-InboxRule", "UpdateInboxRules")
| extend RuleDetails = tostring(RawEventData.Parameters)
| where RuleDetails has_any ("ForwardTo", "RedirectTo", "ForwardAsAttachmentTo", "DeleteMessage")
    and RuleDetails has_any ("invoice", "payment", "wire", "transfer", "bank", "finance",
                              "cfo", "ceo", "accounting", "payroll", "urgent")
| extend AlertType = "BECInboxRule"
| project TimeGenerated, AccountDisplayName, AccountObjectId, IPAddress,
    UserAgent, RuleDetails, AlertType
| extend DeviceName = "", InitiatingProcessCommandLine = "";
// Combine all signals
union CryptoWalletAccess, ExtensionEnumeration,
    (BECEmailRules | project TimeGenerated, DeviceName, AccountName = AccountDisplayName,
        InitiatingProcessFileName = UserAgent, InitiatingProcessCommandLine,
        InitiatingProcessParentFileName = "", FolderPath = "", FileName = RuleDetails, AlertType)
| summarize AlertCount = count(), AlertTypes = make_set(AlertType),
    FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated)
    by DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine,
       bin(TimeGenerated, 5m)
| extend RiskScore = case(
    array_length(AlertTypes) > 1, "Critical",
    AlertTypes has "BECInboxRule", "High",
    AlertTypes has "CryptoWalletAccess", "High",
    "Medium"
)
| where RiskScore in ("Critical", "High", "Medium")
| sort by RiskScore asc, FirstSeen desc
high severity medium confidence

Data Sources

Microsoft Defender for Endpoint Microsoft Defender for Cloud Apps Microsoft 365 Defender

Required Tables

DeviceFileEvents CloudAppEvents

False Positives

  • Legitimate cryptocurrency portfolio management tools (CryptoCompare, Koinly, CoinTracking) reading wallet files for tax/portfolio reporting
  • IT backup software (Veeam, Acronis, Windows Backup) scanning AppData directories including wallet application folders
  • Finance team members creating legitimate email forwarding rules for invoice or payment notification workflows
  • Password manager applications (1Password, Bitwarden, LastPass) accessing browser extension storage during sync operations
  • Antivirus or EDR scanning engines performing file access on wallet directories during scheduled scans

Unlock Pro Content

Get the full detection package for T1657 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections