{"id":107321,"date":"2020-03-06T10:00:31","date_gmt":"2020-03-06T18:00:31","guid":{"rendered":"https:\/\/www.paloaltonetworks.com\/blog\/?p=107321"},"modified":"2020-03-12T14:35:03","modified_gmt":"2020-03-12T21:35:03","slug":"cortex-busted-by-cortex-xdr","status":"publish","type":"post","link":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/2020\/03\/cortex-busted-by-cortex-xdr\/","title":{"rendered":"Busted by Cortex XDR: Network Traffic Analysis in Action"},"content":{"rendered":"<p><i><span style=\"font-weight: 400;\">Join us on March 17 for our \u201c<\/span><\/i><a href=\"https:\/\/event.on24.com\/wcc\/r\/2189502\/CF4EA3DD7C83BE1FE5F0B51774C4DB68\" rel=\"nofollow,noopener\" ><i><span style=\"font-weight: 400;\">Leverage Your Firewall to Expose Attackers Hiding in Your Network<\/span><\/i><\/a><i><span style=\"font-weight: 400;\">\u201d webinar to learn more about how to use Network Traffic Analysis, including a live attack demo.\u00a0<\/span><\/i><\/p>\n<p><b>For the most accurate threat detection, enterprises should integrate good data across different sources: cloud, network and endpoint. But in a reality where companies have visibility gaps and imperfect integration, layered defenses can save the day. This article tells a customer story of a large pharmaceutical company who could easily have missed the signs of an incoming cyberattack after its endpoint agents failed. Luckily, Network Traffic Analysis (NTA) recognized a threat, even though attackers used smart tactics to fool IT\u2019s detection strategies.<\/b><\/p>\n<p><span style=\"font-weight: 400;\"><div style=\"max-width:100%\" data-width=\"888\"><span class=\"ar-custom\" style=\"padding-bottom:50%;\"><img loading=\"lazy\" decoding=\"async\"  class=\" wp-image-107322 aligncenter lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2020\/03\/image1.jpg\" alt=\"This conceptual image illustrates the concept of network traffic analysis and threat detection, showing data flowing past two analysts.\" width=\"888\" height=\"444\" \/><\/span><\/div><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Network Traffic Analysis (NTA) is an emerging category of next-generation network detection and analytics tools that enables security teams to better detect and track attackers who move laterally through their IT infrastructure. Thanks to a combination of good network data and the development of machine learning (ML), NTA has evolved substantially over the past few years to levels that we hadn\u2019t previously imagined. Advanced ML models can now detect sophisticated events combining various attack tactics that, in the absence of NTA, may just look like noise on the network.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-weight: 400;\">A Sign of Attack<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The story begins at a large pharmaceutical company that had <\/span><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/2020\/02\/cortex-network-traffic-analysis\/\"><span style=\"font-weight: 400;\">Cortex XDR deployed using firewalls as sensors<\/span><\/a><span style=\"font-weight: 400;\"> to analyze their network traffic. Cortex XDR triggered an alert about a host performing a ton of random-looking domain name queries on the network. While for many readers, there may be nothing special in the sentence prior, allow me to highlight 2 important points:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Our human intuition can easily pick up random-looking domain name queries, but it\u2019s a different story for a computer. Systematically recognizing random-looking things is extremely <img loading=\"lazy\" decoding=\"async\"  class=\" wp-image-107336 alignright lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2020\/03\/image2-1.png\" alt=\"This screenshot shows how Cortex XDR identified malware attempting to use random domain names to communicated with its command and control server on the internet. \" width=\"605\" height=\"334\" \/>complicated to do: the Cortex XDR team had to build several ML models just for this use case. More on that later.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">If you\u2019ve ever worked in the Security Operations Center (SOC) at an enterprise, you\u2019ll appreciate that Cortex XDR grouped 24 random-looking DNS query alerts into a single incident, eliminating the need for an analyst to go over them one-by-one and group them manually.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Back to the story: Cortex XDR identified that these random domain names looked suspiciously like malware trying to communicate with its \u201ccommand and control\u201d (C2) server on the internet.<\/span><\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>What is C2?<\/b><span style=\"font-weight: 400;\"> Once malware has successfully deployed, it waits for remote commands from the attacker to execute. The cybersecurity jargon for this method is \u201ccommand and control\u201d or C2. C2 traffic has to cross the company firewall to send and receive data from the C2 server: it sends \u201cbeacons\u201d as a sign of life, downloads commands from the attacker and exfiltrates data. Over the years, attackers have evolved their tactics to make C2 more sophisticated. They may use social media sites as C2 infrastructure, and they build more autonomous malware in case organizations attempt to isolate it from the internet.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">The Endpoint Agent Misses the Threat<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The host was running one of our competitors' agents on the endpoint -- an agent that failed to detect the malware. Boom! If this customer relied solely on their endpoint protection, this malware would have gone undetected. This is a classic example of why layered defense (also known as \u201cdefense in depth\u201d) is so important. With sophisticated threat agents constantly working to find ways around your defenses, some are bound to succeed. You may never even realize that an attacker is in your system if you rely on just a single layer of defense.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Luckily, this company had Cortex XDR to monitor network traffic, providing the organization with a second layer of security that made it possible to successfully detect and mitigate the threat.<\/span><\/p>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">How Do Attackers Control Their Malware?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">When malware deploys, the instances attempt to establish a connection with their C2 server over the internet to get commands and transfer stolen data to the attacker. Some malware is built to fly under the radar by using domain names consisting of random characters, changed frequently to maintain C2 communication in the face of simple domain blocking rules. This technique also makes IT security teams\u2019 lives hard by making it nearly impossible for them to manually block domain names at a fast enough rate.<\/span><\/p>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">Cortex XDR Catches Domain Name Generation Behavior<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To pass IT Security, these domain names have to be unique, never-before used and certainly never-before blocked. To implement this, attackers build an algorithm that comes up with random domain names (we call this method \u201cdomain name generation,\u201d or DGA), and they register these new random-looking public domain names one by one as the attacked organization blocks them manually.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Because the malware comes up with a huge number of domain name variations and the attacker only registers them one by one, the network log will show many failed DNS lookups, attempting to resolve weird, random-looking domain names. This is the main signal that the analytics engine in Cortex XDR uses to catch C2 behavior in network traffic.<\/span><\/p>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">How Does an Algorithm Recognize Random-Looking Domain Names?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Cortex XDR has several detection models specifically built for detecting malware C2 events, each model leveraging many-to-many ML models through a process called ensemble learning. This particular C2 detection model looks for random-looking domain names on the network.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Ensemble learning<\/b><span style=\"font-weight: 400;\"> is the process by which multiple ML models are strategically generated and combined to solve a particular computational intelligence problem. Ensemble learning is primarily used to improve the classification and prediction performance of a model \u2013 to detect random-looking domain names in our case.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">The detection model is based on an unsupervised anomaly detection algorithm called binomial cumulative distribution function (binomial CDF). This model leverages multiple features, the most important ones being the domain name randomness and the normal patterns of successful and failed domain queries from hosts in the organization. The domain name randomness feature is computed by a language model using n-grams \u2013 character strings that recur in legitimate domain names. Give this model a domain name, and it produces a score for how \u201cweird\u201d that domain name is.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The model also uses the organization\u2019s DNS query patterns. Since attackers only register a small portion of the domain names the DGA generates, infected hosts will perform a lot of failed DNS queries to domain names the attackers did not register. The ML model utilized by this NTA use case caught a ton of failed DNS lookup attempts and only a few successful ones. The reason why attackers don\u2019t define the list of C2 server domain names ahead of time is that some of this malware is designed to operate over months (or years!). Over that sort of timeframe, even hundreds of pre-defined domain names wouldn\u2019t be enough, and eventually, the malware would no longer be able to reach the C2 server.\u00a0<\/span><\/p>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">Anomaly Detection Is Not Enough<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Anomaly detection is never enough, as it is too noisy on its own. Cortex XDR strives for precision, since every minute analysts spend triaging false positive alerts is a minute they could have otherwise spent making a positive impact on their organization\u2019s security posture. The random-looking domain names detection model therefore leverages many other models to filter out false positives.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">First, Cortex XDR only queries for new domain names (names not seen in the organization over the last 30 days). The long-term collection of metadata about hundreds of different aspects of the traffic flowing throughout the organization is therefore key.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Second, Cortex XDR leverages models that detect the local domain suffixes from DNS and DHCP and filter them out.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Third, benign sources of what may otherwise be considered \u201canomalous\u201d DNS queries are then discarded. Examples of this are: another security product on the customer\u2019s network that performs a large number of reverse DNS queries to do its job, or a harmless-but-malfunctioning piece of software on the network constantly attempting to resolve nonexistent DNS records. These shouldn\u2019t raise an alarm that reduces the SOC team\u2019s coffee time.<\/span><\/p>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">NTA + Good Data: The Foundation of Accurate Threat Detection<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Network traffic analysis is a must for true defense in depth: malware may find its way to hosts without endpoint protection, but any network communication leaves a trace. Even if endpoint protection is in place, we come across cases where malware bypasses it. Endpoint agents provide important telemetry and protection, but they aren\u2019t infallible. Traces cannot be hidden on the network: sophisticated though it may be, most malware will have to send packets on the network in order to communicate with its C2 server.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Using over 100 ML models, learning at a rate of millions of events per second in some customer deployments, Cortex XDR picks the anomalies that are worth your while.<\/span><\/p>\n<h1><\/h1>\n<h2><span style=\"font-weight: 400;\">Join our NTA webinar<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To learn more about how to use Cortex XDR for NTA use cases, sign up for our March 17 webinar, \u201c<\/span><a href=\"https:\/\/event.on24.com\/eventRegistration\/EventLobbyServlet?target=reg30.jsp&amp;referrer=https%3A%2F%2Fwcc.on24.com%2Fwebcast%2Fregistration%2F2189502&amp;eventid=2189502&amp;sessionid=1&amp;key=CF4EA3DD7C83BE1FE5F0B51774C4DB68&amp;regTag=&amp;sourcepage=register\" rel=\"nofollow,noopener\" ><span style=\"font-weight: 400;\">Leverage Your Firewall to Expose Attackers Hiding in Your Network<\/span><\/a><span style=\"font-weight: 400;\">.\u201d<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">Read more stories in the <\/span><\/i><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/tag\/ai-stories\/\"><i><span style=\"font-weight: 400;\">Busted by Cortex XDR<\/span><\/i><\/a><i><span style=\"font-weight: 400;\"> series.<\/span><\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Attackers made it past this large pharmaceutical company's endpoint agents, only to be \"Busted by Cortex XDR\" and its network traffic analysis.<\/p>\n","protected":false},"author":663,"featured_media":107322,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6770],"tags":[6900,6737,4321,422],"coauthors":[6848],"class_list":["post-107321","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-secure-the-future","tag-ai-stories","tag-cortex-xdr","tag-machine-learning","tag-threat-detection"],"jetpack_featured_media_url":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2020\/03\/image1.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts\/107321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/users\/663"}],"replies":[{"embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/comments?post=107321"}],"version-history":[{"count":6,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts\/107321\/revisions"}],"predecessor-version":[{"id":107778,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts\/107321\/revisions\/107778"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/media\/107322"}],"wp:attachment":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/media?parent=107321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/categories?post=107321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/tags?post=107321"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/coauthors?post=107321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}