Dealing with Safe Executables
It’s possible to use Exclusions to prevent escalations or containment for known good applications. However, this requires a critical eye to be done effectively with a good risk trade-off.A Simple Example
The following is an example to allow a specific version of a known good executable to run. In this case, the executable was a helper application for banking software. It has only one purpose and is published directly by the business bank, with no history of being abused by attackers. Ideally, files like this would be enriched by their hashes, such as theSHA256
hash in this case, but it wasn’t found in Reversing Labs’ library of over 40 billion files. The best solution would be to submit that file for analysis and inclusion in their repository of files, but that’s not often feasible, so a simple exclusion like this can be safe enough to avoid future false positive alerts:
Excluding Remote Management Tools
The following can deceptively appear to be similar to the example above, but it comes with opening your organization to risks that Wirespeed does NOT recommend:ScreenConnect.WindowsClient.exe
, which is the primary executable for the ScreenConnect product, a remote management and IT help tool, that also happens to be commonly abused by attackers who leverage social engineering to masquerade as your IT support to your users, tricking them into running this legitimate application, but pointed at their remote management instance so that they can conduct nefarious steps, which can often lead to ransomware.
It is critical that you understand if an executable has a dual-use capability before you add it as an exclusion.
Excluding Live off the Land Tools
This is another deceptively simple exclusion that introduces significant risk:powershell.exe
binary. This is of course an official binary, but adding exclusions for it allows attackers to execute all kinds of badness, from first stage malware to privilege escalation, even in some cases locking you out of your files in ransomware. Wirespeed highly recommends never adding exclusions for known Live of the Land Tools.
Using Processes Instead
Another approach to dealing withpowershell
might be to exclude a specific process that is acceptable, like this example, which is powershell retrieving the name of the DNS domain the computer is joined to, which is common for legitimate software to do (and also common for attackers orienting themselves within your environment, but probably OK to ignore since there would likely be other detections beyond this that are higher fidelity signal to indicate their presence):
@=
and not @~=
. Processes is an array (collection of many processes), so we need to use an array operator. The operator we chose requires every process to match “powershell $env:USERDNSDOMAIN”, unlike the following exclusion, which only needs a single process in the detection to match: