Suspicious Dscl Auth Validation
Description
Detects the execution of the Dscl binary with the '-authonly' option set, via an unsigned or untrusted binary. This allows a username and password to be provided validating that username and password against the directory services on macOS. Many malware samples will execute this after collecting a users password via some type of prompt in order to validate the correct password was provided and authenticate them locally without logging in.
Query · eql
process where event.type == "start" and event.action == "exec" and process.name == "dscl" and
process.args like~ "-authonly" and ((process.parent.code_signature.exists == false or process.parent.code_signature.trusted == false) or process.parent.name in ("sh", "zsh", "bash")) and
not process.Ext.effective_parent.executable in ("/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon",
"/Library/csdaemon/csdaemon",
"/Applications/NinjaRMMAgent/programfiles/ninjarmm-macagent",
"/usr/bin/dscl",
"/usr/local/jamf/bin/jamf",
"/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfManagementService.app/Contents/MacOS/JamfManagementService",
"/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon")