{"id":6199,"date":"2025-08-16T10:04:28","date_gmt":"2025-08-16T10:04:28","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/08\/16\/palo-alto-networks-released-a-mega-malware-analysis-tutorials-useful-for-every-malware-analyst\/"},"modified":"2025-08-16T10:04:28","modified_gmt":"2025-08-16T10:04:28","slug":"palo-alto-networks-released-a-mega-malware-analysis-tutorials-useful-for-every-malware-analyst","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/08\/16\/palo-alto-networks-released-a-mega-malware-analysis-tutorials-useful-for-every-malware-analyst\/","title":{"rendered":"Palo Alto Networks Released A Mega Malware Analysis Tutorials Useful for Every Malware Analyst"},"content":{"rendered":"<p>    Palo Alto Networks Released A Mega Malware Analysis Tutorials Useful for Every Malware Analyst<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>Palo Alto Networks has published an extensive malware analysis tutorial detailing the dissection of a sophisticated .NET-based threat that delivers the Remcos remote access trojan (RAT).<\/p>\n<p>The malware\u2019s emergence highlights a trend in which threat actors increasingly abuse legitimate development environments and tools\u2014such as the Microsoft .NET runtime\u2014to execute complex, multi-stage infection campaigns.<\/p>\n<p>This particular sample demonstrates an elevated level of evasion capability, including managed-to-unmanaged code transitions, runtime API resolution, and process injection against benign executables.<\/p>\n<p>The attack chain begins with a seemingly innocuous .NET executable, obfuscated to conceal its intent. This initial loader retrieves an online payload masquerading as a PDF from a compromised Bitbucket repository.<\/p>\n<p>Instead of document data, the file contains Donut-generated shellcode designed to execute directly in memory. By avoiding disk writes, the attackers significantly reduce the risk of detection by traditional antivirus engines that rely on static signature scanning.<\/p>\n<p>Palo Alto Networks analysts <a href=\"https:\/\/github.com\/PaloAltoNetworks\/Unit42-Threat-Intelligence-Article-Information\/blob\/main\/Mega-Malware-Analysis-Tutorial-Featuring-Donut.pdf\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">identified<\/a> the sample during a targeted threat hunting operation and noted its ability to transition execution between different runtime environments, a hallmark of advanced intrusion techniques.<\/p>\n<p>Once downloaded, the payload undergoes a simple ASCII-hexadecimal decoding routine to reconstruct the actual shellcode.<\/p>\n<p>The loader uses .NET\u2019s interop services to invoke native Windows API calls dynamically, allocating executable memory with VirtualAlloc before copying the decoded payload into it.<\/p>\n<p>This combination of obfuscated managed code and late-bound unmanaged calls complicates static analysis, while also bypassing many heuristics that flag suspicious imports.<\/p>\n<p>Palo Alto Networks researchers noted that this deliberate API resolution at runtime allowed the attacker to omit sensitive imports from the Portable Executable (PE) header, further evading static detection.<\/p>\n<p>From a technical standpoint, the payload\u2019s sophistication is evident when examining the in-memory AMSI and ETW bypass routines.<\/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\/AVvXsEhgmwYHVgThLKzVdHmlHN8eAM5JM3f7ULNECSfPS9Dt1iiduFczJanyIMz-O0-HqGcQ0KvlnT0e0aA_l6okXfIAwn5zSaxIMUDwTfzg9bTtWmFMk6ZLj_OcBjrP58x-PceJZO0biJgqizO2MWvAhOiOASmuMf-pjZzb9_GAA1GZ_No0ti6XQKNkaYyJ-VPa\/s16000\/In-memory%2520AMSI%2520and%2520ETW%2520bypass%2520routines%2520%28Source%2520-%2520GitHub%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">In-memory AMSI and ETW bypass routines (Source \u2013 GitHub)<\/figcaption><\/figure>\n<\/div>\n<p>AMSI functions such as <code>AmsiScanBuffer<\/code> are patched directly in memory with instructions that force them to always return <code>AMSI_RESULT_CLEAN<\/code>.<\/p>\n<p>A representative snippet illustrates this patching mechanism:-<\/p>\n<pre class=\"wp-block-code\"><code>byte[] patch = { 0x33, 0xC0, 0xC2, 0x18, 0x00 }; \/\/ xor eax,eax; ret 0x18\nMarshal.Copy(patch, 0, amsiScanBufferPtr, patch.Length);<\/code><\/pre>\n<p>This ensures that even if security tools hook these functions, malicious buffers will appear harmless.<\/p>\n<p>Similarly, calls to <code>EtwEventWrite<\/code> are replaced with a single <code>ret<\/code> instruction, effectively blinding Event Tracing for Windows, which many endpoint detection products use to correlate malicious behaviors.<\/p>\n<p>One of the most technically intriguing aspects of the infection mechanism is its creation of a Common Language Runtime (CLR) instance from unmanaged shellcode.<\/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\/AVvXsEjJf21k7ROaMZ6awuDb-W6lrKSpWKa4pR1j0PxBY8OauSfLdaDnlvA6_qkW_PzDiKYCdyNfHUgkSEA-LiYFws6PkreD6DAr8pon1ktecbhN0t4FGla9vYE9a11rRFC8IWt3ONpzQSigxEuKYWI-kLCfmUi591qP2V6gBDlLGzpQ8hDO_SWQJzHPiQUadXNj\/s16000\/CLRCreateInstance%2520%28Source%2520-%2520GitHub%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">CLRCreateInstance (Source \u2013 GitHub)<\/figcaption><\/figure>\n<\/div>\n<p>After disabling defensive hooks, the shellcode uses <code>CLRCreateInstance<\/code> and <code>ICLRMetaHost::GetRuntime<\/code> to spawn a new .NET runtime within the same process, then loads an <a href=\"https:\/\/cybersecuritynews.com\/highly-obfuscated-net-sectoprat\/\" target=\"_blank\" rel=\"noreferrer noopener\">obfuscated<\/a> .NET assembly into an <code>AppDomain<\/code>.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-persistence-of-this-execution-chain\"><strong>Persistence of this execution chain<\/strong><\/h2>\n<p>The final stage leverages the <code>_Type.InvokeMember<\/code> method to execute a specific entry point method inside that assembly, which in turn spawns <code>InstallUtil.exe<\/code> in a suspended state.<\/p>\n<p>The persistence of this execution chain relies heavily on process injection. The malicious assembly writes a decrypted Remcos payload into the suspended process\u2019s memory via multiple <code>WriteProcessMemory<\/code> calls before changing the memory protection back to <code>PAGE_EXECUTE_READ<\/code> with <code>VirtualProtectEx<\/code> and resuming execution.<\/p>\n<p>This multi-chunk injection method may help evade memory scanners designed to detect large, contiguous malicious allocations.<\/p>\n<p>While the dynamic analysis, conclusively shows the <a href=\"https:\/\/cybersecuritynews.com\/threats-delivering-remcos\/\" target=\"_blank\" rel=\"noreferrer noopener\">Remcos RAT<\/a> ASCII banner embedded in the injected executable, confirming the campaign\u2019s end goal.<\/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\/AVvXsEiRsqnRYaE3dV_yAvJt1IQMy04-YaYQUWcJ9g6xvQZvrdmfdcUM1WZhKIuLHezV0cmvj6-bSYZhvapH6HqCxu0dd2qe2jPZ1OrLms5_LBVF6QOuVsSY7RDUL7F2r4dKBZi73E4Sh8PiU9YEfB20KvTPdkU1ZTUOdqSHbwgoV68AHAPsbA29Uma9y09iVzit\/s16000\/Remcos%2520RAT%2520ASCII%2520banner%2520%28Source%2520-%2520GitHub%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Remcos RAT ASCII banner (Source \u2013 GitHub)<\/figcaption><\/figure>\n<\/div>\n<p>By walking readers through every stage from initial obfuscation to final payload activation, Palo Alto Networks\u2019 tutorial not only dissects a live threat but also arms analysts with repeatable techniques for dissecting complex, hybrid-runtime <a href=\"https:\/\/cybersecuritynews.com\/chatgpt-powered-malware-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">malware<\/a>.<\/p>\n<p>This release stands out as both a detailed forensic walkthrough and a practical lab guide, making it a valuable resource for reverse engineers confronting threats that blend managed code obfuscation with native API exploitation in modern attack chains.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 91%,rgb(169,184,195) 100%)\"><strong><code>Boost\u00a0your\u00a0SOC and help your team protect your business with free top-notch threat intelligence:\u00a0<a href=\"https:\/\/intelligence.any.run\/plans\/?utm_source=csn&amp;utm_medium=article&amp;utm_campaign=alert_fatigue&amp;utm_content=lookup_plan&amp;utm_term=120825\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Request TI Lookup Premium Trial<\/a>.<\/code><\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/palo-alto-networks-released-a-mega-malware-analysis-tutorials\/\">Palo Alto Networks Released A Mega Malware Analysis Tutorials Useful for Every Malware Analyst<\/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\/palo-alto-networks-released-a-mega-malware-analysis-tutorials\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Palo Alto Networks Released A Mega Malware Analysis Tutorials Useful for Every Malware Analyst Palo Alto Networks has published an extensive malware analysis tutorial detailing the dissection of a sophisticated .NET-based threat that delivers the Remcos remote access trojan (RAT). The malware\u2019s emergence highlights a trend in which threat actors increasingly abuse legitimate development environments [&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-6199","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\/6199"}],"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=6199"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/6199\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=6199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=6199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=6199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}