The Fileless Attack SURVIVAL GUIDE
Total Page:16
File Type:pdf, Size:1020Kb
The Fileless Attack SURVIVAL GUIDE Protect Your Company from Attacks Antivirus Can’t Block THE FILELESS ATTACK SURVIVAL GUIDE 1 Table of Contents 3 Executive Summary 5 Introduction 8 Types of fileless attack techniques 10 How attackers use them to… 11 ......Gain initial access 13 ......Escalate privileges 15 ......Execute payloads 17 ......Gain persistence 19 ......Achieve lateral movement 21 Practical tips for preventing and mitigating fileless attacks 22 Fileless Attack Checklist THE FILELESS ATTACK SURVIVAL GUIDE 2 Executive Summary Attacks are constantly evolving. One of the most damaging trends we’ve seen of late is the increasingly widespread adoption of fileless attack techniques. These techniques are designed to silently infect target systems without ever downloading malicious programs or leaving behind any obvious trace, primarily by using a victim company’s trusted software and system tools against it. To clarify what actually constitutes a fileless attack and explain how it can work, here are three things every business leader should know: 1 Fileless attacks exploit a fundamental gap in traditional endpoint security Traditionally, attacks involving malware have revolved around attackers gaining access to a victim’s computer (typically by either exploiting a software vulnerability or tricking the victim into downloading something he or she shouldn’t), and then installing an executable file (the “payload”) that does the damage. The problem with this approach from an attacker’s perspective is that antivirus solutions are built to scan and block any suspicious files that land on the computer. By not installing malicious files, however, attackers can simply bypass these solutions. All they need to do is hijack otherwise legitimate system tools and processes to do their dirty work for them. 2 There are a variety of fileless techniques becoming more widespread Exploiting vulnerable applications and injecting code into normal system processes are both popular fileless techniques for gaining initial access and execution on target systems without getting noticed. Once the initial compromise is complete, attackers can continue avoiding detection by abusing powerful built-in administration tools like PowerShell and Windows Management Instrumentation (WMI). Because these tools have legitimate use cases, they allow attackers to hide in plain sight while they escalate privileges, move laterally throughout the network, and achieve persistence by making changes to the registry. 3 Fileless attacks can be stopped (just not by AV) While fileless techniques can be extremely difficult to detect, there are things you can do to protect your business and reduce your risk. With no files to scan, however, detecting and blocking fileless attacks ultimately comes down to your organization’s ability to take proactive preventative measures and identify malicious activity and behaviors on the endpoint in real-time — ideally before any damage is done. Find out how Barkly can help you do just that. THE FILELESS ATTACK SURVIVAL GUIDE 3 EXECUTIVE SUMMARY Key Takeaways • “Fileless” has become a handy shorthand to describe a variety of attack techniques ranging from malicious code injection to abusing legitimate, built-in system tools. • These techniques help attackers avoid dropping malicious executable files on disk, which means they can’t be detected by file-scanning AV solutions. • New attack tools and frameworks have made it easier for common criminals to use fileless attack techniques. As a result, they’re gaining widespread adoption. • 42 percent of organizations experienced one or more fileless attacks that successfully compromised their data or IT infrastructure in 2017. (Ponemon Institute) • 77 percent of successful compromises in 2017 involved fileless techniques. (Ponemon Institute) • Fileless attack techniques can be used to gain initial access to a system and/or to accomplish a wide variety of post-exploitation activities. • By utilizing exploits and code injection techniques attackers can filelessly load and execute malicious code directly in memory. • Attackers can gain persistence on compromised machines by storing malicious scripts in the registry. • By abusing powerful legitimate system administration tools like PowerShell and Windows Management Instrumentation (WMI), attackers can carry out malicious activities without raising red flags. See the checklist in the appendix for a complete list of practical steps every company should take to mitigate these threats. THE FILELESS ATTACK SURVIVAL GUIDE 4 Introduction Yes, we get it. The term “fileless” is confusing. It sounds like yet another new marketing buzzword, but what it actually refers to are evasive attack techniques that, in many cases, have been around for quite a while. Why all the fuss about “fileless” techniques now? For one thing, they’re more prevalent. As new attack tools and frameworks make these techniques easier to use they’re getting more popular and widespread. Another reason is they’re working. The Ponemon Institute recently found that 77 percent of successful compromises involved fileless techniques, and that attacks incorporating fileless techniques were 10x more likely to succeed than traditional file-based attacks. That success highlights obvious gaps in the traditional endpoint security approach of scanning files to identify malware (hence the marketing interest from new vendors). Buzzwordiness aside, the wider adoption of fileless attack techniques is a real problem. We all need to be aware of it, and we need to be taking steps to address it. That’s what this guide is all about. 54% 77% of companies experienced one or more of those attacks utilized successful attacks that compromised exploits or fileless techniques data and/or IT infrastructure THE FILELESS ATTACK SURVIVAL GUIDE 5 INTRODUCTION First, let’s clear things up. Confusing terms you won’t see in this guide (except for right here): • Fileless malware This may currently be the most widely-used term, but it’s also responsible for the majority of the confusion on this topic. Doesn’t malware refer to executable programs and files? How can it be fileless? If it is “fileless” is it really malware? What is “malware,” anyway? Rather than get lost in such deep, existential questions let’s just agree it’s a bad term and move on. • Non-malware We’ve never found it very useful to name something based on what it isn’t. It’s like an app that labels anything that isn’t a hotdog “Not hotdog” — it’s not especially helpful or descriptive. THE TERM “FILELESS” IS BEST USED TO DESCRIBE: Attack techniques that provide alternatives to dropping malicious executable files on disk. While we’re at it, a few other things fileless attacks aren’t: • Fileless attacks aren’t new Using the term “fileless” to describe attacks that don’t leave executable files behind on the victim’s hard drive is all the rage now, but that doesn’t mean the concept is new. In fact, attacks that store malicious code solely in memory date back to the prolificCode Red and SQL Slammer worms of the early 2000s. For a good history of fileless attacks and usage of the term, see this post from Lenny Zeltser. • Fileless attacks aren’t rare According to the Ponemon Institute’s 2017 State of Endpoint Security Risk report, 42 percent of organizations experienced one or more fileless attacks that successfully compromised their data or IT infrastructure in 2017. THE FILELESS ATTACK SURVIVAL GUIDE 6 INTRODUCTION • Fileless attacks aren’t always exclusively fileless at every stage Super shocking statement alert: Attacks can involve files and fileless techniques — they’re not mutually exclusive (gasp!). For example, many attacks may begin in a traditional way we’ve all become accustomed to (say, a user opens a file attached to a spam email), but once initial compromise is established, they can shift to using fileless ways of gathering information and spreading. Vice versa, attackers can also gain initial compromise filelessly (by exploiting a vulnerability, for example), and then use that access to deploy malicious executable files. The point is attackers can leverage both files and fileless techniques at different stages during an attack. For that reason, rather than get into semantic disputes over which attacks are truly fileless and which aren’t, let’s acknowledge that often what the term “fileless” is actually referring to are the techniques attackers use to avoid dropping malicious executable files on disk. THE FILELESS ATTACK SURVIVAL GUIDE 7 Types of Fileless Attack Techniques In-memory Script-based By utilizing exploits and code Scripts can be used as droppers injection techniques attackers can in early attack stages and for a load and execute malicious code wide variety of post-exploitation directly in memory. activities. Living off the land Registry-resident By abusing powerful legitimate system Attackers can gain persistence on administration tools like PowerShell, compromised machines by storing Windows Management Instrumentation, malicious scripts in the registry. Kovter PsExec, etc. that are built into Windows, and the QakBot banking trojan are two attackers can carry out malicious notorious examples of malware that sets activities without raising red flags. For up shop via autorun registry entries to more on “Living off the land” techniques, help it survive system reboots and make see Symantec’s ISTR report on the topic. itself frustratingly difficult to remove. A good hacker avoids the use of malware and code exploits whenever possible. There’s no