I think this should do it.
Rule {
Process {
Include AggregateMatch {
Include OBJECT_NAME { -v "wscript.exe" }
Include PROCESS_CMD_LINE {
-v "*c:\\users*"
-v "*c:\\programdata*"
-v "c:\\windows\\temp*"
}
Exclude PROCESS_CMD_LINE {
-v "*FalsePositivesHere*"
}
}
Include AggregateMatch {
Include OBJECT_NAME { -v "cscript.exe" }
Include PROCESS_CMD_LINE {
-v "*c:\\users*"
-v "*c:\\programdata*"
-v "c:\\windows\\temp*"
}
Exclude PROCESS_CMD_LINE {
-v "*FalsePositivesHere*"
}
}
}
Target {
Match SECTION {
Include OBJECT_NAME { -v "version.dll" }
Include -access "CREATE"
}
}
}
When you want to block, change "version.dll" to just "**"
From an attack perspective, a bit cleaner and to minimize risk, you might consider the following:
Block Office from Executing these two processes.
Change the default file association of various scripts from c/wscript to notepad. So a user can't just double click them. Instead, they have to define the execution in a command line.
Dave
Hi,
This ER is working as expected.
Where can I find the command line launched by cscript.exe/wscript.exe ?
For the moment, this information is not present in the logs, only "C:\Windows\SysWOW64\cscript.exe, which accessed the process version.dll".
Thanks for your help!
Kr,
buijspa
For some alerts I received this :
Source Description:
cscript \windows\system32\slmgr.vbs -ato |
But for the majority only this :
Source Description:
cscript.exe |
Hard to say without 1) knowing your rule logic and 2) knowing the actual command line (is there really one?).
If you are using 10.7 you might consider going this route on the rule, which should give you even more visibility:
Rule {
Process {
Include OBJECT_NAME { -v "**" }
}
Target {
Match PROCESS {
Include AggregateMatch {
Include OBJECT_NAME { -v "wscript.exe" }
Include PROCESS_CMD_LINE {
-v "*c:\\users*"
-v "*c:\\programdata*"
-v "c:\\windows\\temp*"
}
Exclude PROCESS_CMD_LINE {
-v "*FalsePositivesHere*"
}
}
Include AggregateMatch {
Include OBJECT_NAME { -v "cscript.exe" }
Include PROCESS_CMD_LINE {
-v "*c:\\users*"
-v "*c:\\programdata*"
-v "c:\\windows\\temp*"
}
Exclude PROCESS_CMD_LINE {
-v "*FalsePositivesHere*"
}
}
Include -access "CREATE"
}
}
}
Hi Dave,
Thanks for your swift reply.
Indeed, it works better with this ER : now I see that the cscript process is launched from
"C:\Program Files (x86)\Adobe\Adobe Creative Cloud\CCXProcess\libs\node.exe" "C:\Program Files (x86)\Adobe\Adobe Creative Cloud\CCXProcess\js\main.js"
Thanks for your help!
Kind regards,
buijspa
Corporate Headquarters
6220 America Center Drive
San Jose, CA 95002 USA