URL as Process Argument via Installer Package
Description
Detects when a url is supplied as a command line argument to an installer package binary via the installer process itself. This technique is a creative way to download a second stage payload and evade curl based detections. This activity can be observed when in a pre or post install script it specifies a url as an argument to a binary included in the package that when executed will reach out to the specified url.
Query · eql
process where event.type == "start" and
process.Ext.effective_parent.executable like~ ("/usr/sbin/installer", "/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer") and
process.args like~ ("http://*", "https://*") and
not process.name in ("wget", "curl", "git", "nscurl") and
not process.executable like ("/opt/homebrew/*", "/usr/local/Cellar/*", "/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksadmin") and
not process.code_signature.team_id == "PXPZ95SK77"