Curl Local File Read or Write via Osascript
Description
Detects when Curl is executed via Osascript and reads or writes to a local file. Threat actors will often use Curl to download or upload files to a local file path on the system. The use of Curl via Osascript elevates the suspiciousness of the activity as osascript is a scripting language that can be used to execute AppleScript commands. The combination of these two activities is indicative of a threat actor attempting to download or upload a file on the system.
Query · eql
process where event.type == "start" and event.action == "exec" and process.name in ("curl", "nscurl") and
process.command_line : "*file://*" and process.parent.name == "osascript"