Suspicious Child Process of Expect
Description
Detects when commonly abused tools on macOS are executed via the Expect binary. The Expect binary on macOS (by default and other Unix-like systems) is a powerful scripting tool designed to automate interactive applications. It utilizes the TCL (Tool Command Language) for its syntax. An Expect script can be created using the .exp file extension. It can then be executed as either a normal binary or via the Expect binary itself. Expect is ripe for abuse by threat actors that can use it to avoid security controls and traditional defense detections.
Query · eql
process where event.type == "start" and event.action == "exec" and process.parent.name == "expect" and
((process.name in ("curl", "nscurl", "osascript", "security", "node", "ruby")) or
(process.code_signature.trusted == false or process.code_signature.exists == false)) and
process.Ext.effective_parent.executable != "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon"