Windows Installer via Windows Script
Description
Detects attempts to invoke a Windows Installer from a Windows script. Some malware installers use this method to avoid spawning a child process and continue execution via the Windows installer service.
Query · eql
api where process.Ext.api.name == "AmsiScanBuffer" and process.executable != null and user.id != "S-1-5-18" and
(process.name in~ ("wscript.exe", "cscript.exe", "mshta.exe", "msxsl.exe", "powershell.exe") or
process.Ext.api.parameters.app_name in ("JScript", "VBScript", "PowerShell")) and
(
(process.Ext.api.parameters.buffer : "*ActiveXObject*" and
process.Ext.api.parameters.buffer : ("*.InstallProduct(*", "*.WindowsInstaller.Installer*")) or
(process.Ext.api.parameters.buffer : "*WindowsInstaller*" and
process.Ext.api.parameters.buffer : "*InstallProduct*" and process.Ext.api.parameters.buffer : "*http*")
) and
not process.Ext.api.parameters.content_name : ("?:\\Program Files (x86)\\*", "?:\\Program Files\\*") and
not process.parent.executable :
("?:\\Program Files\\HP\\HP LaserJet Pro *\\Bin\\HP LaserJet Pro *.exe",
"?:\\Program Files (x86)\\Tanium\\Tanium Client\\TaniumClient.exe",
"?:\\Program Files\\System Center Operations Manager\\Gateway\\MonitoringHost.exe",
"?:\\Program Files\\Microsoft Monitoring Agent\\Agent\\MonitoringHost.exe") and
not (process.executable : "C:\\Windows\\LSDeployment\\RemoteDeployment*.exe" and
process.code_signature.subject_name == "Lansweeper NV" and process.code_signature.trusted == true)