{"id":23838,"date":"2024-01-31T13:10:43","date_gmt":"2024-01-31T21:10:43","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2024\/01\/31\/news-17568\/"},"modified":"2024-01-31T13:10:43","modified_gmt":"2024-01-31T21:10:43","slug":"news-17568","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2024\/01\/31\/news-17568\/","title":{"rendered":"Nitrogen shelling malware from hacked sites"},"content":{"rendered":"\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2023\/07\/26\/into-the-tank-with-nitrogen\/\">Nitrogen<\/a> is the name given to a campaign and associated malware that have been distributed via malicious search ads. Its signature move is using Python and DLL side-loading to connect to the attacker&#8217;s command and control server.<\/p>\n<p>In this blog post, we look at a recent Nitrogen campaign and specifically at how the initial payload is being served onto victims. The threat actors seem to have a preference for hosting their payloads on compromised WordPress sites, many of which are already hacked with malicious PHP shell scripts.<\/p>\n<p>We also review the connection between malvertising and ransomware in the context of increased web-based attacks.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-malicious-ads\">Malicious ads<\/h2>\n<p>The ads are displayed via Google searches for popular search terms related to programs used by IT and system administrators. The ads are attached to domain names that have a previous history but expired, which allowed the threat actors to register them and bypass certain security checks that involve looking at the age of a domain name.<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"709\" height=\"221\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_4fbe6b.png\" alt=\"\" class=\"wp-image-103187\" \/><figcaption class=\"wp-element-caption\">Malicious ad<\/figcaption><\/figure>\n<p>The first step upon clicking on the ad consists of filtering visitors. If it doesn&#8217;t like your IP address or other client-side setting, it will display a fake page. The content looks like it was generated via Chat-GPT or some other LLM.<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"965\" height=\"827\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_1c3c72.png\" alt=\"\" class=\"wp-image-103211\" \/><figcaption class=\"wp-element-caption\">Decoy website<\/figcaption><\/figure>\n<p>Real victims will instead be served a 302 redirect to a decoy site at windirsstat[.]net:<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"703\" height=\"179\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_f4ec6b.png\" alt=\"\" class=\"wp-image-103213\" \/><figcaption class=\"wp-element-caption\">Malicious redirect<\/figcaption><\/figure>\n<p>The page is designed to look identical to the real website except for the download link which points somewhere else.<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"745\" height=\"709\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_da1c53.png\" alt=\"\" class=\"wp-image-103191\" \/><figcaption class=\"wp-element-caption\">Fake WinDirStat website<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\" id=\"h-compromised-sites\">Compromised sites<\/h2>\n<p>The threat actor is using a number of hacked sites to host their malicious payloads which they regularly rotate through. This is not a new technique, but it is yet odd to see the fake installers cohabit with various web shells.<\/p>\n<p>In fact, anyone could easily change the files or even delete them. Here, we&#8217;re simply observers and looking at the file managers that are open on the internet.<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"743\" height=\"792\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_594494.png\" alt=\"\" class=\"wp-image-103199\" \/><figcaption class=\"wp-element-caption\">403WebShell<\/figcaption><\/figure>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"882\" height=\"739\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_e28563.png\" alt=\"\" class=\"wp-image-103200\" \/><figcaption class=\"wp-element-caption\">Nega1ve Shell<\/figcaption><\/figure>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"776\" height=\"861\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_e769bb.png\" alt=\"\" class=\"wp-image-103207\" \/><figcaption class=\"wp-element-caption\">WSOX Shell<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\" id=\"h-payload\">Payload<\/h2>\n<p>Nitrogen uses DLL side-loading via a signed executable to launch its payload:<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"812\" height=\"517\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_739dbc.png\" alt=\"\" class=\"wp-image-103266\" \/><figcaption class=\"wp-element-caption\">Side-loading a malicious DLL<\/figcaption><\/figure>\n<p>It then proceeds with running Python from a newly created folder under %appdata%:<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"791\" height=\"430\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_a8f3d6.png\" alt=\"\" class=\"wp-image-103267\" \/><figcaption class=\"wp-element-caption\">Python running a malicious file<\/figcaption><\/figure>\n<p>The Python file it executes is heavily obfuscated:<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"429\" height=\"608\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_9eee51.png\" alt=\"\" class=\"wp-image-103268\" \/><figcaption class=\"wp-element-caption\">Obfuscated Python file<\/figcaption><\/figure>\n<p><a href=\"https:\/\/www.threatdown.com\/\">ThreatDown<\/a> will detect this malicious activity and quarantine the malicious Python file:<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1000\" height=\"776\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_694ef2.png\" alt=\"\" class=\"wp-image-103270\" \/><figcaption class=\"wp-element-caption\">ThreatDown detecting and blocking the malicious Python file<\/figcaption><\/figure>\n<p>Blocking the payload at this step is crucial as it is the point where it will otherwise contact its command and control server (C2):<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"779\" height=\"413\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_032292.png\" alt=\"\" class=\"wp-image-103272\" \/><figcaption class=\"wp-element-caption\">Network traffic between victim and C2<\/figcaption><\/figure>\n<p>In recent Zip installers for Nitrogen, we noticed two files likely related to their control panel. It&#8217;s worth noting that one of them is in Ukrainian language:<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"487\" height=\"756\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_795d46.png\" alt=\"\" class=\"wp-image-103218\" \/><figcaption class=\"wp-element-caption\">Panel template files<\/figcaption><\/figure>\n<p>Victims are added to the attackers&#8217; control panel for further processing. The threat actors will need to cleanup their database to remove uninteresting entries such as those generated by malware sandboxes and researchers. The remaining victim can then be divided into a team of specialists that will use post exploitation tools to further gather information and compromise the network, before launching additional payloads.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-protecting-networks-from-malicious-ads\">Protecting networks from malicious ads<\/h2>\n<p>What makes Nitrogen a serious threat for businesses is its known <a href=\"https:\/\/www.esentire.com\/blog\/nitrogen-campaign-2-0-reloads-with-enhanced-capabilities-leading-to-alphv-blackcat-ransomware\">connection with ransomware<\/a>. The threat actors who gain access to a compromised machine deploy adversary emulation framework tools such as <a href=\"https:\/\/github.com\/BishopFox\/sliver\">Sliver<\/a> before dropping ransomware, namely <a href=\"https:\/\/www.malwarebytes.com\/blog\/news\/2023\/11\/ransomware-gang-files-sec-complaint-about-target\">ALPHV\/BlackCat<\/a>.<\/p>\n<p>Many businesses are not adequately protected when it comes to malicious ads. This is typically reflected in the tools and security software installed on endpoints, which will often focus on spam and phishing emails.<\/p>\n<p>Threat actors are well aware of this, and they have been using online ads as a delivery vector for malware heavily since late 2022. Based on our own stats from tracked incidents, we have been seeing a rise in reported incidents since summer 2023.<\/p>\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"648\" height=\"395\" src=\"https:\/\/www.malwarebytes.com\/wp-content\/uploads\/sites\/2\/2024\/01\/image_2f39bc.png\" alt=\"\" class=\"wp-image-103284\" \/><\/figure>\n<p><a href=\"https:\/\/www.threatdown.com\/\">ThreatDown<\/a> protects your networks thanks to its web-based and malware blocking features. Being able to block the infrastructure used by criminals to funnel traffic from ads is critical to avoid malware even landing on endpoints.<\/p>\n<p><a href=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2024\/01\/nitrogen-shelling-malware-from-hacked-sites\" target=\"bwo\" >https:\/\/blog.malwarebytes.com\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> Threat actors are using all the tools at their disposal to deliver malware. Malicious ads are only one step in the chain, with compromised sites providing the free hosting and changing capabilities that can evade detection. <\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10488,10378],"tags":[10531,29862,12040],"class_list":["post-23838","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-malvertising","tag-nitrogen","tag-threat-intelligence"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/23838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=23838"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/23838\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=23838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=23838"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=23838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}