Embedded Payload Dropped and Executed
Description
Detects when an executable file is modified in a temporary directory and immediately executed. We have observed several samples that bring additional payloads within their application structure or that embed another payload within their applications main binary dropping these payloads in the temporary directory and immediately executing them.
Query · eql
sequence with maxspan=10s
[file where event.action == "modification" and file.Ext.header_bytes like~ ("cffaedfe*", "cafebabe*") and
file.path like~ ("/tmp/*", "/private/tmp/*", "/Users/Shared/*") and
not process.executable like~ "/Library/Developer/*"] by Effective_process.entity_id
[process where event.type == "start" and event.action == "exec" and process.executable like~ ("/tmp/*", "/private/tmp/*", "/Users/Shared/*") and process.args_count == 1] by process.parent.entity_id