Let’s resume our discussion of endpoint attack prevention approaches with the options available once an attack actually begins to execute, or once it has already executed on a device.
Once malicious code begin to execute, prevention of compromise requires recognizing bad behavior and blocking it before the attack can take control of the device. The first decision point is whether you want the protection to run in user mode (within the operating system and leveraging operating system protections) or kernel mode (at a lower level on the device, with access to everything – including interactions between the kernel and CPU). Many attacks exploit the operating system and applications which run within the OS, so it’s reasonable to protect in user mode.
But you cannot preclude adversaries from attacking the kernel directly, so as so often, the best answer is often both. You need OS and application specific protections, but to comprehensively protect devices you need to monitor and protect the kernel as well. Otherwise you cannot defend against privileged processes and kernel-level rootkits.
Pros: You cannot really stop advanced exploits without protecting devices against these techniques, so it’s not really a question of whether to include these features or not. It’s about understanding how a vendor develops the models they use to distinguish legitimate behavior from illegitimate.
Cons: These preventions require models of appropriate behavior, so false positives are always a concern, which comes down to opportunity cost. Whenever you need to spend time chasing down things that aren’t real issues, you aren’t doing something more useful. Ensuring that any agent provides granularity in terms of what gets blocked versus generating an alert is absolutely critical. Be aware of application impersonation, where a malicious application spoofs a legitimate one to access its privileges. Also consider differences between operating systems, in terms of ability to detect kernel activity or privilege escalation.
Isolation: Another common technique is isolation within the operating system to shield critical system resources (such as memory, storage, and networking) from direct access by executables running on the system. This abstraction layer between applications and system services enables monitoring of system calls and blocking of abnormal behavior.Pros: Isolation is a time-honored approach to making sure a problem in one area of the environment doesn’t spread anywhere else. Abstracting operating system services and blocking malicious behavior before it can spread provides resilience to the device and prevents full compromise.
Cons: Isolation of operating system functions is very complicated and resource-intensive on the device. This approach requires high-powered devices and considerable testing before rollout, to ensure it doesn’t break applications and impair employee productivity.
Endpoint sandbox/emulation: A few years ago network-based malware sandboxes were all the rage. Files coming across ingress networks could be analyzed and unrecognized files would be executed inside the sandbox to see what it did. If a file showed malware characteristics it would be blocked at the perimeter. These devices worked great… until malware writers figured out how to evade them, at which point effectiveness took a hit, although there is still value in this approach and some prevention products detonate any unknown files in a sandbox on the endpoint to look for malicious characteristics. We’ll discuss this in more detail below, including integration with network and cloud based sandboxes.Performance: Network sandboxes were plagued by latency and delay waiting for a verdict, so organizations were forced to let files pass through during analysis to avoid unacceptable performance; they later had to chase down files which turned out to be malicious. There is nowhere else to go on an endpoint, so performance of the emulation environment is critical to avoid impairing the end-user experience. The analysis should be imperceptible to users.
Evasion: Similar to network-based sandboxes, endpoint sandboxes are part of a cat-and-mouse game, as malware writers strive to evade emulation and other prevention techniques. Look for both bare metal and virtual emulation capabilities, intended to fool malware writers looking for indicators of execution in a sandbox. Ensuring that the emulator cannot be detected by malware is critical.
Integration with network/cloud sandboxes: For performance purposes, it may not make sense to detonate a file locally, so the ability to send it to a network or cloud sandbox provides additional flexibility in dynamic analysis of potential threats.
Pros: If malicious code can be be detected by execution in a walled garden, then the device can be protected and without recourse to the other exploit protection techniques above.
Cons: Performance, evasion, and resource consumption are all concerns for emulating on endpoint devices.
Once the malware has executed and the device is compromised, it’s a matter of containing damage and cleaning up the mess. This isn’t prevention, but post-execution activities are an important step between the prevention and response processes, so expect some of these capabilities in any advanced endpoint protection offering.
Given the sophistication of advanced malware, the most reliable means of cleaning a device was to reimage it and start over again. This was expensive and made many employees grumpy because they lost work and productivity, but necessary because it was difficult (or outright impossible) to be confident you had really cleaned everything off the machine. Now, given the visibility and granularity provided by advanced endpoint security agents, it has once more become realistic to actually clean devices.
Pros: The deeper into containment an advanced endpoint prevention offering goes, the more quickly you can contain damage and restore your environment to a clean and healthy state. This is where integration between prevention and detection/response starts to come in handy, providing all the telemetry and analysis responders want.
Cons: There is a measure of necessary complexity to EDR – even relatively simple EDR. Tools which integrate this capability run the risk of overcomplicating usage for less sophisticated practitioners. And in larger organizations a different group tends to handle incident response, so make sure any information uncovered during validation can be sent to and leveraged by whatever EDR tool incident responders use.
Pros: The ability for an endpoint prevention product to clean up a compromised device can substantially improve response time and return device to normal operation sooner, which is critical given the business impact of compromised endpoints.
Cons: Remediating prior to full investigation can wipe out key evidence and telemetry which could provide clues as to the adversary, mission, and tactics. More mature security teams tend to use different tools for response, forensics, and remediation, to maintain chain of custody and ensure ful eradication of the adversary. Any tool you use for remediation should to work with your response and forensics tools and processes.
Now that we are through the prevention approaches, we are ready to examine the foundational technologies which enable all this shiny new prevention stuff.