Detection of Unauthorized Access to macOS Web Browser Sensitive Files
This detection identifies potential credential theft by monitoring untrusted processes or osascript attempting to access sensitive browser session cookies and password databases on macOS.
Adversaries targeting macOS systems frequently attempt to exfiltrate stored credentials and session tokens to maintain persistence or conduct further unauthorized activities. By accessing files such as cookies.sqlite, logins.json, and various key databases located within browser-specific directories, attackers can bypass multi-factor authentication or directly access protected online services.
This threat brief focuses on detecting unauthorized processes - specifically those that are unsigned, untrusted, or leveraging the osascript utility - that attempt to interact with these sensitive files. Such behavior is a common indicator of modular malware or credential-stealing scripts. Defenders should monitor for these file-access patterns to identify potential information-stealing activity, as these files are rarely accessed by legitimate, non-browser-related background processes.
Attack Chain
- An attacker gains initial execution on a macOS system via phishing or an exploited application.
- The attacker identifies the presence of target web browsers (e.g., Chrome, Safari, Brave) by inspecting the file system.
- The attacker locates sensitive browser storage files, such as
Login DataorCookies.binarycookies, in the user's Library directory. - The attacker launches an unsigned binary or a malicious
osascriptpayload to interact with these files. - The malicious process opens the sensitive files to read the contents into memory.
- The exfiltrated data (cookies or passwords) is bundled and encrypted by the attacker's script.
- The stolen data is exfiltrated to an attacker-controlled command-and-control server.
Impact
Successful access to browser storage files results in the compromise of stored user credentials and active session tokens. This can lead to account takeover, unauthorized access to sensitive corporate or personal SaaS applications, and potential lateral movement within the network. In targeted attacks, this enables persistent access that persists even after browser restarts.
Recommendation
- Enable file-monitoring telemetry via Elastic Defend or equivalent EDR on all macOS endpoints.
- Deploy the provided detection rule to identify unsigned or suspicious processes accessing browser-specific files.
- Investigate any alerts generated by the rule to determine if the process is a legitimate backup tool, security agent, or a malicious credential stealer.
- If malicious activity is confirmed, isolate the host and initiate a credential rotation for accounts associated with the compromised browser profiles.
Immediate actions
Deploy the Sigma-compatible rule to the EDR platform.
Threat Hunt
Search logs for unsigned processes interacting with browser directory paths.
Data: file_event logs
Mitigations
Enforce code signing requirements for all custom internal applications.
Credential Access techniques
Detection coverage 1
Suspicious Web Browser Sensitive File Access
highDetects access to sensitive web browser files (cookies, login data) by unsigned/untrusted processes or osascript.
Detection queries are available on the platform. Get full rules →