Exfiltration Data Staging in Temporary Directory via Osascript
Description
Detects when a directory gets created within a temporary directory and a file is created immediately after. This is a technique that has been observed being used by the most recent Atomic stealer samples in order to organize their data collection prior to exfiltration.
Query · eql
sequence with maxspan=10s
[process where event.type == "start" and event.action == "exec" and process.name == "mkdir" and process.args == "-p" and
process.args like ("/tmp/*", "/private/tmp/*") and
process.parent.name == "osascript"] by process.parent.entity_id
[file where event.action == "modification" and process.name == "osascript" and file.path like ("/tmp/*", "/private/tmp/*")] by Effective_process.entity_id