{"id":3175,"date":"2024-04-18T22:20:00","date_gmt":"2024-04-19T03:20:00","guid":{"rendered":"https:\/\/www.darkreading.com\/application-security\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware"},"modified":"2024-04-18T22:20:00","modified_gmt":"2024-04-19T03:20:00","slug":"evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware","status":"publish","type":"post","link":"https:\/\/ddi.mohflo.net\/index.php\/2024\/04\/18\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware\/","title":{"rendered":"Evil XDR: Researcher Turns Palo Alto Software Into Perfect Malware"},"content":{"rendered":"<div class=\"media_block\"><a href=\"https:\/\/i0.wp.com\/eu-images.contentstack.com\/v3\/assets\/blt6d90778a997de1cd\/bltfba5e8422c82ac69\/654e39b322bec1040ac53b52\/edrxdr-MauriceNorbert-alamy.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?w=640&#038;ssl=1\" class=\"media_thumbnail\"><\/a><\/div>\n<div><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?w=640&#038;ssl=1\" class=\"ff-og-image-inserted\"><\/div>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">A creative exploit of Palo Alto Networks&#8217; extended detection and response (XDR) software could have allowed attackers to puppet it like a malicious multitool.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">In <\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\"><a class=\"ContentText-BodyTextChunk ContentText-BodyTextChunk_link\" target=\"_blank\" href=\"https:\/\/www.blackhat.com\/asia-24\/briefings\/schedule\/index.html#the-dark-side-of-edr-repurpose-edr-as-an-offensive-tool-37846\" rel=\"noopener\">a briefing at Black Hat Asia on April 17<\/a><\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">, Shmuel Cohen, security researcher at SafeBreach, described how he not only reverse-engineered and cracked into the company&#8217;s signature Cortex product but also weaponized it to deploy a reverse shell and ransomware.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">All but one of the weaknesses associated with his exploit have since been mended by Palo Alto. Whether other, similar XDR solutions are vulnerable to a similar attack is as yet unclear.<\/span><\/p>\n<h2 class=\"ContentText ContentText_variant_h2 ContentText_align_left\" data-testid=\"content-text\" id=\"A Devil's Bargain in Cybersecurity\">A Devil&#8217;s Bargain in Cybersecurity<\/h2>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">There is an inescapable devil&#8217;s bargain when it comes to using certain kinds of far-reaching security tools. In order for these platforms to do their jobs, they must be granted highly privileged carte blanche access over every nook and cranny in a system.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">For instance, to perform <\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\"><a class=\"ContentText-BodyTextChunk ContentText-BodyTextChunk_link\" target=\"_blank\" href=\"https:\/\/www.darkreading.com\/cyberattacks-data-breaches\/xdr-what-it-is-what-it-isn-t\" rel=\"noopener\">real-time monitoring and threat detection<\/a><\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\"> across IT ecosystems, XDR demands the highest possible permissions, and access to very sensitive information. And, to boot, it can&#8217;t be easily removed. It was this immense power wielded by these programs that inspired in Cohen a twisted idea.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">&#8220;I thought to myself: Would it be possible to turn an EDR solution itself into malware?&#8221; Cohen tells Dark Reading. &#8220;I&#8217;d take all these things that the XDR has and use them against the user.&#8221;<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">After picking a laboratory subject \u2014 Cortex \u2014 he began reverse-engineering its various components, trying to figure out how it defined what is and isn&#8217;t malicious.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">A lightbulb switched on when he discovered a series of plaintext files the program relied on more than most.<\/span><\/p>\n<h2 class=\"ContentText ContentText_variant_h2 ContentText_align_left\" data-testid=\"content-text\" id=\"How to Turn XDR Evil\">How to Turn XDR Evil<\/h2>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">&#8220;But those rules are inside my computer,&#8221; Cohen thought. &#8220;What would happen if I manually removed them?&#8221;<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">It turned out that Palo Alto had thought of this already. An anti-tampering mechanism prevented any user from touching those precious Lua files \u2014 except the mechanism had an Achilles&#8217; heel. It worked by protecting not each individual Lua file by name, but the folder that encapsulated them all. To reach the files he wanted, then, he wouldn&#8217;t have to undo the anti-tampering mechanism, if he could just reorient the path used to reach them and bypass the mechanism altogether.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">A simple shortcut probably wouldn&#8217;t have sufficed, so he used a hard link: the computer&#8217;s way of connecting a filename with the actual data stored on a hard drive. This allowed him to point his own new file to the same location on the drive as the Lua files.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">&#8220;The program was not aware that this file was pointing to the same location in the hard disk as the original Lua file, and this allowed me to edit the original content file,&#8221; he explains. &#8220;So I created a hard link to the files, edited and removed some rules. And I saw that as I removed them \u2014 and did another little thing that caused the app to load new rules\u2014I could load a vulnerable driver. And from there, the whole computer was mine.&#8221;<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">After taking complete control in his proof of concept attack, Cohen recalls, &#8220;What I did first was change the protection password on the XDR so it cannot be removed. I also blocked any communication to its servers.&#8221;<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">Meanwhile, &#8220;Everything seems like it&#8217;s working. I can hide the malicious activities from the user. Even for an action which would&#8217;ve been prevented, the XDR won&#8217;t provide a notification. The endpoint user will see the green marks that indicate everything is OK, while underneath I&#8217;m running my malware.&#8221;<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">The malware he decided to run was, first, a reverse shell, enabling full control over the targeted machine. Then he successfully deployed ransomware, right under the program&#8217;s nose.<\/span><\/p>\n<h2 class=\"ContentText ContentText_variant_h2 ContentText_align_left\" data-testid=\"content-text\" id=\"The Fix Palo Alto Didn't Make\">The Fix Palo Alto Didn&#8217;t Make<\/h2>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">Palo Alto Networks was receptive to Cohen&#8217;s research, working closely with him to understand the exploit and develop fixes.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">There was one vulnerability in his attack chain, however, that they chose to leave as is: the fact that Cortex&#8217;s Lua files are stored entirely in plaintext, with no encryption whatsoever, despite their highly sensitive nature.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">That seems alarming, but the reality is that encryption wouldn&#8217;t be much of a deterrent for attackers, so after discussing the matter, he and the security company agreed that they didn&#8217;t need to change that. As he notes, &#8220;The XDR eventually needs to understand what to do. So even if it&#8217;s encrypted, at some point in its operation it will need to decrypt those files in order to read them. So attackers could just catch the content of the files then. It would be one more step for me in order to read those files, but I can still read them.&#8221;<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">He also says that other XDR platforms are likely susceptible to the same kind of attack.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">&#8220;Other XDRs will implement this differently, maybe,&#8221; he says. &#8220;Maybe the files will be encrypted. But no matter what they will do, I can always bypass it.&#8221;<\/span><\/p>\n<p><a href=\"https:\/\/www.darkreading.com\/application-security\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A creative exploit of Palo Alto Networks&#8217; extended detection and<\/p>\n","protected":false},"author":12,"featured_media":3176,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[809],"class_list":["post-3175","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-dark-reading"],"featured_image_urls":{"full":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=1200%2C800&ssl=1",1200,800,false],"thumbnail":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?resize=150%2C150&ssl=1",150,150,true],"medium":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=300%2C200&ssl=1",300,200,true],"medium_large":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=640%2C427&ssl=1",640,427,true],"large":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=640%2C427&ssl=1",640,427,true],"1536x1536":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=1200%2C800&ssl=1",1200,800,true],"2048x2048":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=1200%2C800&ssl=1",1200,800,true],"chromenews-featured":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=1024%2C683&ssl=1",1024,683,true],"chromenews-large":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?resize=825%2C575&ssl=1",825,575,true],"chromenews-medium":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?resize=590%2C410&ssl=1",590,410,true]},"author_info":{"display_name":"Dark Reading","author_link":"https:\/\/ddi.mohflo.net\/index.php\/author\/darkreading\/"},"category_info":"<a href=\"https:\/\/ddi.mohflo.net\/index.php\/category\/uncategorized\/\" rel=\"category tag\">Uncategorized<\/a>","tag_info":"Uncategorized","comment_count":"0","jetpack_featured_media_url":"https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2024\/04\/evil-xdr-researcher-turns-palo-alto-software-into-perfect-malware.jpg?fit=1200%2C800&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/posts\/3175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/comments?post=3175"}],"version-history":[{"count":0,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/posts\/3175\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/media\/3176"}],"wp:attachment":[{"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/media?parent=3175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/categories?post=3175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/tags?post=3175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}