Potential Data Collection in Temporary Directory by Hidden Executable
Description
Detects when a hidden executable creates and then immediately deletes a temporary file within a temporary directory like /tmp. We have observed threat actors doing this for data collection, exfiltration and prompt deletion.
Query · eql
sequence by process.entity_id, file.path with maxspan=30s
[file where event.action == "modification" and process.name like~ ".*" and
file.path like ("/private/tmp/*", "/tmp/*", "/var/tmp/*") and
not process.executable like "/nix/store/*" and
not Effective_process.executable == "/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders"]
[file where event.action == "deletion" and process.name like~ ".*" and
file.path like ("/private/tmp/*", "/tmp/*", "/var/tmp/*") and
not process.executable like "/nix/store/*" and
not Effective_process.executable == "/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders"]