Suspicious Executable Copied from Volume Mount
Description
Detects when an executable file is copied from a hidden directory on a volume mounted disk to the applications directory. Geacon samples have been observed utilizing this technique as a method for setting up persistence with the second stage payload prior to establishing persistence via the .zshrc file.
Query · eql
sequence by process.entity_id with maxspan=3s
[process where event.type == "start" and event.action == "exec" and process.name == "cp" and
process.args_count == 3 and process.args in ("cp", "/bin/cp", "/usr/bin/cp") and
process.args like~ "/Volumes/*/.*" and process.args like "/Applications/*"] as event0
[file where event.action == "modification" and process.name == "cp" and file.path like "/Applications/*" and
file.Ext.header_bytes like~ ("cffaedfe*", "cafebabe*") and
stringcontains~(event0.process.command_line, file.name)]