Suspicious Image Creation via ScreenCapture
Description
Detects when the ScreenCapture binary executes and creates an image in a suspicious location like tmp or the shared directory. Malware has used the ScreenCapture binary to collect images of victim systems and exfiltrate them via C2.
Query · eql
sequence by process.entity_id with maxspan=10s
[process where event.type == "start" and event.action == "exec" and process.name == "screencapture" and
not process.command_line == "screencapture --help" and
not process.parent.executable like ("/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer",
"/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow") and
not (process.parent.code_signature.team_id == "2DC432GLL2" and process.parent.code_signature.trusted == true and
process.parent.executable like ("/Users/*/.codex/packages/*/bin/codex")) and
not (process.args like ("/tmp/claude-*/*", "/private/tmp/claude-*/*") and
descendant of [process where process.code_signature.team_id == "Q6L2SF6YDW" and process.code_signature.trusted == true]) and
not process.Ext.effective_parent.executable like ("/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer",
"/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow",
"/Applications/Visual Studio Code.app/*",
"/Applications/Cursor.app/*",
"/Applications/ChatGPT.app/*",
"/Applications/Claude.app/*",
"/Applications/Ghostty.app/*",
"/Applications/IntelliJ IDEA.app/*",
"/Users/*/Applications/Codex.app/*",
"/Users/*/Library/Application Support/Claude/claude-code/*/claude.app/*",
"/Applications/Codex.app/*",
"/private/var/folders/*/AppTranslocation/*/Visual Studio Code.app/*",
"/Users/*/.local/bin/uv",
"/Applications/Warp.app/*",
"/Applications/Obsidian.app/*",
"/Applications/Tabby.app/*",
"/Applications/Android Studio.app/Contents/MacOS/studio",
"/Applications/Zed.app/Contents/MacOS/zed",
"/Applications/WebStorm.app/*",
"/Applications/Grok Bot.app/*",
"/Applications/T3 Code*.app/*",
"/Applications/Cortex Code.app/*",
"/Applications/OpenCode.app/*")]
[file where event.action == "modification" and file.path like ("/Users/Shared/*", "/tmp/*", "/private/tmp/*")]