{"id":7040,"date":"2025-01-23T09:00:00","date_gmt":"2025-01-23T15:00:00","guid":{"rendered":"https:\/\/www.darkreading.com\/endpoint-security\/black-magic-enterprise-juniper-routers-backdoor"},"modified":"2025-01-23T09:00:00","modified_gmt":"2025-01-23T15:00:00","slug":"black-magic-targets-enterprise-juniper-routers-with-backdoor","status":"publish","type":"post","link":"https:\/\/ddi.mohflo.net\/index.php\/2025\/01\/23\/black-magic-targets-enterprise-juniper-routers-with-backdoor\/","title":{"rendered":"Black &#8216;Magic&#8217; Targets Enterprise Juniper Routers With Backdoor"},"content":{"rendered":"<div class=\"media_block\"><a href=\"https:\/\/i0.wp.com\/eu-images.contentstack.com\/v3\/assets\/blt6d90778a997de1cd\/bltbae2bbe8a3fb3c94\/67913f4ca0c960646d8f3781\/Magic-LJSphotography-Alamy.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.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\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.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\">Dozens of organizations have been infected with router malware that uses a packet-sniffing technique to minimize its footprint.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">Rather than their <\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\"><a class=\"ContentText-BodyTextChunk ContentText-BodyTextChunk_link\" target=\"_self\" href=\"https:\/\/www.darkreading.com\/threat-intelligence\/china-apt-cracks-cisco-firmware-attacks-against-us-japan\">far more popular Cisco counterparts<\/a><\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">, the campaign, which Black Lotus Labs named &#8220;J-magic,&#8221; hones in on Juniper-brand routers at the edge of high-value networks. Exposed enterprise routers are tapped with a variant of a quarter-century-old backdoor, &#8220;cd00r,&#8221; which stays dormant until it receives an activation phrase \u2014 a &#8220;magic packet.&#8221; Only then does it grant access to a reverse shell, from which its attackers can steal data, manipulate configurations, and spread to more devices.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">&#8220;There&#8217;s been a lot of emphasis on <\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\"><a class=\"ContentText-BodyTextChunk ContentText-BodyTextChunk_link\" target=\"_self\" href=\"https:\/\/www.darkreading.com\/cloud-security\/volt-typhoon-soho-botnet-infects-us-govt-entities\">small office\/home office (SOHO) devices<\/a><\/span><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">, but attackers are just as active in the enterprise space,&#8221; warns Danny Adamitis, principal information security engineer with Black Lotus Labs. &#8220;It&#8217;s just that they&#8217;re living on these devices that don&#8217;t really have endpoint detection and response (EDR), that are in front of a firewall, and don&#8217;t really run things like Sysmon, so it&#8217;s a little bit harder for people to detect these attacks.&#8221;<\/span><\/p>\n<h2 class=\"ContentText ContentText_variant_h2 ContentText_align_left\" data-testid=\"content-text\" id=\"Backdoor Malware Infests Juniper Routers\">Backdoor Malware Infests Juniper Routers<\/h2>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">Exactly how the hackers obtained initial access to affected routers is unknown, but the openings they exploited are clear. Around half the Juniper routers victimized by J-magic were configured as virtual private network (VPN) gateways, and the other half possessed exposed Network Configuration Protocol (NETCONF) ports, which allow administrators to remotely manage and configure network settings, but also allow attackers to sneak through and do the same. These routers served as points of entry and control for much larger networks, affording attackers a wide canvas for their malicious deeds.<\/span><\/p>\n<p data-component=\"related-article\" class=\"RelatedArticle\"><span data-testid=\"related-article-title\" class=\"RelatedArticle-Title\">Related:<\/span><a class=\"RelatedArticle-RelatedContent\" href=\"https:\/\/www.darkreading.com\/endpoint-security\/15k-fortinet-device-configs-leaked-dark-web\" target=\"_self\" data-discover=\"true\">15K Fortinet Device Configs Leaked to the Dark Web<\/a><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">To exploit these prized devices, the attackers install their malware, cd00r, in a position where it can observe all TCP traffic coming into the edge device. Then it waits for one of five predefined packets meeting highly specific conditions, which act like an activation phrase. When a packet meeting one of these presets is received, the program will spawn a reverse shell connected to the attacker&#8217;s IP address, through the port specified in the magic packet.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">The technique works because it circumvents the already limited methods defenders have for picking up on edge malware. In a typical infection, Adamitis says, &#8220;If you&#8217;re able to monitor traffic from a firewall or router, you can see that there is a beacon that occurs at a set interval. And if you perform a time series analysis, you can see activity continuously occurring with that interval, and it kind of stands out. With something like this, you don&#8217;t have that consistent call out. This will evade that form of detection.&#8221;<\/span><\/p>\n<p data-component=\"related-article\" class=\"RelatedArticle\"><span data-testid=\"related-article-title\" class=\"RelatedArticle-Title\">Related:<\/span><a class=\"RelatedArticle-RelatedContent\" href=\"https:\/\/www.darkreading.com\/endpoint-security\/extension-poisoning-campaign-gaps-browser-security\" target=\"_self\" data-discover=\"true\">Extension Poisoning Campaign Highlights Gaps in Browser Security<\/a><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">A J-magic attack isn&#8217;t entirely complete upon reception of the magic packet, though. To confirm that the handler is the intended attacker \u2014 not just some passerby trying to piggyback on their work \u2014 cd00r sends out a &#8220;challenge&#8221; string encrypted with a hardcoded public key. Only if the attacker passes this test \u2014 by returning the string back using their associated private key \u2014 do they obtain control over the reverse shell, and with it the power to control the infected device, steal enterprise data, and deploy further malware.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">Evidence of these J-magic infections dates back to September 2023, but the majority of cases appear to have popped up in the spring and summer of 2024. In that year or so, cd00r spread to the US, the UK, Russia, Norway, India, and more countries in between, affecting organizations in construction, bioengineering, insurance, and IT services, among others.<\/span><\/p>\n<h2 class=\"ContentText ContentText_variant_h2 ContentText_align_left\" data-testid=\"content-text\" id=\"Blind Spot in Edge Network Cybersecurity\">Blind Spot in Edge Network Cybersecurity<\/h2>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">Easily overlooked is the fact that cd00r, though updated with new features, is a 25-year-old program. It was originally developed and released in 2000, as a proof-of-concept (PoC) for an &#8220;invisible&#8221; backdoor, on the information security website Packet Storm.<\/span><\/p>\n<p data-component=\"related-article\" class=\"RelatedArticle\"><span data-testid=\"related-article-title\" class=\"RelatedArticle-Title\">Related:<\/span><a class=\"RelatedArticle-RelatedContent\" href=\"https:\/\/www.darkreading.com\/endpoint-security\/trend-micro-and-intel-innovate-to-weed-out-covert-threats\" target=\"_self\" data-discover=\"true\">Trend Micro and Intel Innovate to Weed Out Covert Threats<\/a><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">That such an old, and in some ways atavistic, malware would still suffice in 2025 speaks to just how much attackers can get away with in edge networks.<\/span><\/p>\n<p class=\"ContentParagraph ContentParagraph_align_left\" data-testid=\"content-paragraph\"><span class=\"ContentText ContentText_variant_bodyNormal\" data-testid=\"content-text\">&#8220;On your corporate laptop, you probably have Windows Defender and something from your favorite EDR vendor. There tend to be a lot of vendors for end-user workstations, but edge devices don&#8217;t really seem to have anything on them. So by living in those blind spots, attackers are able to get away with using this 20-year-old malware, because there&#8217;s no one and nothing on that particular device to actually capture that sort of user interaction,&#8221; Adamitis says.<\/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 reporting around these kinds of enterprise-grade routers tends to be a lot more sparse,&#8221; he adds. &#8220;What we&#8217;re trying to say is: We think there might be this low visibility spot in the perimeter.&#8221;<\/span><\/p>\n<p><a href=\"https:\/\/www.darkreading.com\/endpoint-security\/black-magic-enterprise-juniper-routers-backdoor\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dozens of organizations have been infected with router malware that<\/p>\n","protected":false},"author":12,"featured_media":7041,"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-7040","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\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=8853%2C4980&ssl=1",8853,4980,false],"thumbnail":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?resize=150%2C150&ssl=1",150,150,true],"medium":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=300%2C169&ssl=1",300,169,true],"medium_large":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=640%2C360&ssl=1",640,360,true],"large":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=640%2C360&ssl=1",640,360,true],"1536x1536":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=1536%2C864&ssl=1",1536,864,true],"2048x2048":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=2048%2C1152&ssl=1",2048,1152,true],"chromenews-featured":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=1024%2C576&ssl=1",1024,576,true],"chromenews-large":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?resize=825%2C575&ssl=1",825,575,true],"chromenews-medium":["https:\/\/i0.wp.com\/ddi.mohflo.net\/wp-content\/uploads\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.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\/2025\/01\/black-magic-targets-enterprise-juniper-routers-with-backdoor.jpg?fit=8853%2C4980&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/posts\/7040","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=7040"}],"version-history":[{"count":0,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/posts\/7040\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/media\/7041"}],"wp:attachment":[{"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/media?parent=7040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/categories?post=7040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ddi.mohflo.net\/index.php\/wp-json\/wp\/v2\/tags?post=7040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}