Back to Intelligence

Counterfeit Installer Campaign: Detecting and Blocking Trojanized Software Downloads with Microsoft Defender XDR

SA
Security Arsenal Team
September 1, 2026
12 min read

Microsoft Defender Experts has published findings on an active, ongoing campaign in which threat actors impersonate legitimate software vendors to distribute malicious installers. The operation relies on look-alike download pages — pixel-perfect clones of legitimate vendor sites — paired with regenerated installer archives that bundle malware alongside (or inside) what appears to be genuine software.

This is not a theoretical supply-chain compromise of a build pipeline. It is a distribution-layer attack: the vendor's real infrastructure is untouched, but users searching for or clicking ads promoting popular software are steered to attacker-controlled pages hosting weaponized installers. The initial access broker economy has made this one of the most reliable intrusion vectors we see in incident response engagements — a single user downloading a "free" utility, PDF tool, remote access client, or browser update can hand an attacker a foothold that escalates to ransomware deployment within days.

Every organization with end users who self-install software — which is effectively every organization — is in scope. Defenders need to treat software download behavior as a monitored attack surface, not an HR policy problem.

Why Defenders Should Care

Three characteristics make this campaign class particularly dangerous:

  1. It bypasses perimeter email controls. There is no malicious attachment to sandbox. The payload arrives over HTTPS from a site the user deliberately visited.
  2. The installer often works. Victims get functioning software alongside the malware, which suppresses user reporting and helpdesk tickets.
  3. Regenerated archives defeat hash-based blocklists. Because attackers repackage installers continuously, static IOC feeds go stale almost immediately. Behavioral detection is the only durable control.

In our IR casework, trojanized installers consistently appear as the patient-zero event in incidents that end with credential theft, persistence via scheduled tasks or Run keys, and staged follow-on payloads. Treat every detection in this post as a potential pre-ransomware signal.

Technical Analysis

Attack Chain

Based on Microsoft's reporting and the TTPs we observe across similar engagements, the campaign follows a consistent pattern:

  1. Lure distribution (T1189 / TA0042): Victims reach look-alike download pages via search engine poisoning (SEO manipulation), malicious ads (malvertising), or typosquatted domains mimicking legitimate vendor URLs. The pages clone the real vendor's branding, layout, and download buttons.
  2. Payload delivery (T1105): The download is a regenerated installer archive — commonly a ZIP, MSI, or EXE — repackaged so the malicious components are embedded alongside legitimate application files. Filenames mimic the real product (<ProductName>_Setup.exe, <Product>-win-x64.zip, etc.).
  3. Execution (T1204.002): The user runs the installer with their own privileges. Because the archive was user-initiated, most naive application-control policies permit it.
  4. Staged payload execution (T1059 / T1218): The trojanized installer drops and launches secondary payloads, frequently abusing signed Microsoft binaries (LOLBins) such as rundll32.exe, mshta.exe, regsvr32.exe, or msiexec.exe spawning unexpected child processes — blending malicious activity into trusted system behavior.
  5. Persistence and defense evasion (T1053 / T1547 / T1562): Observed follow-on behavior in this campaign class includes scheduled task creation, registry Run key persistence, and attempts to tamper with or exclude paths from security tooling.
  6. C2 and follow-on staging (T1071): Outbound connections to attacker-controlled infrastructure, often hosted behind legitimate cloud services or freshly registered domains, to retrieve second-stage tooling.

Affected Platforms and Products

  • Primary target: Windows endpoints (Windows 10/11 and Windows Server) where users possess local installation rights.
  • Impersonated software: The campaign impersonates multiple legitimate vendors. Any widely downloaded free or trial software — browsers, remote access tools, PDF readers, archivers, conferencing clients — is a plausible lure.
  • No CVE is associated with this campaign. This is pure social engineering plus supply-chain-style repackaging. There is no patch; the mitigations are behavioral, architectural, and procedural.

Exploitation Status

Confirmed active exploitation in the wild. Microsoft Defender Experts describes this as an ongoing tracked campaign, not a proof of concept. Because the installers are regenerated continuously, hash-based IOCs have a shelf life measured in hours. Defenders must pivot to behavioral and reputation-based detection.

Detection & Response

Sigma Rules

The following rules target the durable behaviors of this campaign class rather than disposable file hashes. Tune the allowlists to your environment's software deployment tooling (SCCM/MECM, Intune, Chocolatey) before enabling at high sensitivity.

YAML
---
title: Installer Executed From User Downloads or Temp Directory Spawning Scripting Engine
id: 3f9c1a2e-7b84-4d51-9a2c-5e6f7a8b9c0d
status: experimental
description: Detects installers executed from user-writable download locations spawning script interpreters or LOLBins, consistent with trojanized installer staging behavior observed in counterfeit software download campaigns.
references:
  - https://www.microsoft.com/en-us/security/blog/2026/09/01/counterfeit-installers-system-compromise-tracking-deceptive-software-download-campaign/
  - https://attack.mitre.org/techniques/T1204/002/
  - https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/09/02
tags:
  - attack.execution
  - attack.t1204.002
  - attack.t1059
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|contains:
      - '\Downloads\'
      - '\AppData\Local\Temp\'
      - '\AppData\Local\Microsoft\Windows\INetCache\'
  selection_child:
    Image|endswith:
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\cmd.exe'
      - '\wscript.exe'
      - '\cscript.exe'
      - '\mshta.exe'
      - '\rundll32.exe'
      - '\regsvr32.exe'
  filter_sccm:
    ParentImage|contains: 'C:\Windows\ccmcache\'
  condition: selection_parent and selection_child and not filter_sccm
falsepositives:
  - Legitimate software installers that run post-install scripts (e.g., browser updaters, Node.js installers)
  - Enterprise packaging tools — allowlist known deployment paths
level: high
---
title: Scheduled Task Created by Process Running From User-Writable Path
id: 8b2e4f61-3c97-4a18-b5d3-9f0e1a2b3c4d
status: experimental
description: Detects schtasks or Register-ScheduledTask execution from binaries in user-writable locations, a persistence technique observed following trojanized installer execution in counterfeit download campaigns.
references:
  - https://www.microsoft.com/en-us/security/blog/2026/09/01/counterfeit-installers-system-compromise-tracking-deceptive-software-download-campaign/
  - https://attack.mitre.org/techniques/T1053/005/
author: Security Arsenal
date: 2026/09/02
tags:
  - attack.persistence
  - attack.t1053.005
  - attack.privilege_escalation
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    Image|endswith: '\schtasks.exe'
  selection_cmd:
    CommandLine|contains:
      - '/create'
      - '/tn'
  selection_suspicious_payload:
    CommandLine|contains:
      - '\AppData\'
      - '\Users\Public\'
      - '\ProgramData\'
      - '\Temp\'
  filter_admin:
    User|contains: 'SYSTEM'
  condition: selection_img and selection_cmd and selection_suspicious_payload and not filter_admin
falsepositives:
  - Legitimate application updaters registering maintenance tasks (e.g., browser and conferencing clients) — tune per approved software list
level: high
---
title: Msiexec Installing Package From Non-Standard or User-Writable Location With External URL
id: c47d2a91-5e63-4f08-a1b7-2d4e6f8a0c1b
status: experimental
description: Detects msiexec installing packages directly from URLs or user-writable paths, consistent with delivery of regenerated malicious installer archives from look-alike vendor download pages.
references:
  - https://www.microsoft.com/en-us/security/blog/2026/09/01/counterfeit-installers-system-compromise-tracking-deceptive-software-download-campaign/
  - https://attack.mitre.org/techniques/T1218/007/
author: Security Arsenal
date: 2026/09/02
tags:
  - attack.defense_evasion
  - attack.t1218.007
  - attack.execution
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    Image|endswith: '\msiexec.exe'
  selection_url:
    CommandLine|contains:
      - 'http://'
      - 'https://'
  selection_local:
    CommandLine|contains:
      - '\Downloads\'
      - '\AppData\Local\Temp\'
      - '\Users\Public\'
  condition: selection_img and (selection_url or selection_local)
falsepositives:
  - Legitimate web-based MSI deployments and enterprise app catalogs — allowlist known distribution URLs and internal shares
level: medium

KQL — Microsoft Sentinel / Defender XDR Hunting

This query hunts the full behavior chain in Defender XDR advanced hunting: an installer launched from a user download location that subsequently spawns scripting engines, LOLBins, or persistence tooling. Run it over 7 days and enrich with file signer reputation before triage.

KQL — Microsoft Sentinel / Defender
let SuspiciousChildren = dynamic(["powershell.exe","pwsh.exe","cmd.exe","wscript.exe","cscript.exe","mshta.exe","rundll32.exe","regsvr32.exe","schtasks.exe","bitsadmin.exe","certutil.exe"]);
let UserWritablePaths = dynamic(["\\Downloads\\","\\AppData\\Local\\Temp\\","\\AppData\\Local\\Microsoft\\Windows\\INetCache\\","\\Users\\Public\\"]);
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where FileName in~ (SuspiciousChildren)
| join kind=inner (
    DeviceProcessEvents
    | where TimeGenerated > ago(7d)
    | where FolderPath has_any (UserWritablePaths)
    | where FileName endswith ".exe" or FileName endswith ".msi"
    | project ParentTime=TimeGenerated, DeviceId, InitiatingProcessId=ProcessId, InstallerName=FileName, InstallerPath=FolderPath, InstallerCmd=ProcessCommandLine, InstallerSHA256=SHA256
) on $left.ProcessId == $right.InitiatingProcessId and $left.DeviceId == $right.DeviceId
| where TimeGenerated between (ParentTime .. ParentTime + 10m)
| join kind=leftouter (
    DeviceFileCertificateInfo
    | summarize arg_max(TimeGenerated, *) by SHA256
    | project SHA256, Signer, IsTrusted, IsRootSignerMicrosoft
) on $left.InstallerSHA256 == $right.SHA256
| extend UnsignedOrUntrusted = iff(IsTrusted == true, 0, 1)
| project ChildTime=TimeGenerated, DeviceName, AccountName, InstallerName, InstallerPath, InstallerCmd, ChildProcess=FileName, ChildCmd=ProcessCommandLine, Signer, IsTrusted, InstallerSHA256
| order by ChildTime desc

For network-layer hunting of C2 staging to freshly seen domains following a user download event:

KQL — Microsoft Sentinel / Defender
let Lookback = 7d;
let RecentDownloads = DeviceFileEvents
    | where TimeGenerated > ago(Lookback)
    | where FolderPath has_any ("\\Downloads\\", "\\AppData\\Local\\Temp\\")
    | where FileName endswith_any (".exe",".msi",".zip",".iso")
    | project DownloadTime=TimeGenerated, DeviceId, DeviceName, DownloadedFile=FileName, SHA256;
DeviceNetworkEvents
| where TimeGenerated > ago(Lookback)
| where RemoteUrl != "" and ActionType == "ConnectionSuccess"
| join kind=inner RecentDownloads on DeviceId
| where TimeGenerated between (DownloadTime .. DownloadTime + 30m)
| where InitiatingProcessFolderPath has_any ("\\Downloads\\", "\\AppData\\", "\\ProgramData\\", "\\Users\\Public\\")
| summarize Connections=count(), DistinctURLs=dcount(RemoteUrl), URLs=make_set(RemoteUrl, 20) by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, DownloadedFile, bin(TimeGenerated, 1h)
| order by Connections desc

Velociraptor VQL

Use this hunt artifact to sweep endpoints for unsigned or non-Microsoft-signed executables in user-writable paths that have recently spawned child processes — a strong signal of trojanized installer staging.

VQL — Velociraptor
-- Hunt: TrojInstallerUserPathExec
-- Finds recently created executables in user-writable locations and correlates
-- with running/spawned processes to surface trojanized installer staging.

LET recent_files = SELECT FullPath, Mtime, Size
FROM glob(globs=['C:/Users/*/Downloads/*.exe',
                 'C:/Users/*/Downloads/*.msi',
                 'C:/Users/*/AppData/Local/Temp/*.exe',
                 'C:/Users/Public/*.exe',
                 'C:/ProgramData/*.exe'])
WHERE Mtime > now() - (7 * 24 * 3600)

SELECT FullPath AS SuspiciousBinary,
       Mtime AS WrittenTime,
       Size,
       Pid,
       Name AS RunningProcessName,
       CommandLine AS ProcessCommandLine,
       Username AS ProcessOwner,
       CreateTime AS ProcessStartTime
FROM pslist()
WHERE Exe IN (SELECT FullPath FROM recent_files)
   OR CommandLine =~ '(?i)(Downloads|AppData\\Local\\Temp|Users\\Public).+\.(exe|msi|dll)'
ORDER BY WrittenTime DESC

Triage and Verification Script

Run this on any host where the above detections fire. It inventories recently written executables in user-writable paths, checks Authenticode signature status, and enumerates persistence surfaces commonly abused in the follow-on stage.

PowerShell
# Triage script: counterfeit installer campaign
# Run elevated on suspected hosts. Read-only — collects evidence, does not remediate.

$report = @()
$cutoff = (Get-Date).AddDays(-7)

# 1. Recently written executables/MSIs in user-writable locations
$paths = @("$env:SystemDrive\Users\*\Downloads", "$env:SystemDrive\Users\Public", "$env:SystemDrive\ProgramData")
$files = foreach ($p in $paths) {
    Get-ChildItem -Path $p -Include *.exe,*.msi,*.dll,*.ps1,*.bat -Recurse -ErrorAction SilentlyContinue |
    Where-Object { $_.CreationTime -gt $cutoff }
}

foreach ($f in $files) {
    $sig = Get-AuthenticodeSignature -FilePath $f.FullName
    $hash = (Get-FileHash -Path $f.FullName -Algorithm SHA256).Hash
    $report += [PSCustomObject]@{
        Type      = 'File'
        Path      = $f.FullName
        Created   = $f.CreationTime
        SigStatus = $sig.Status
        Signer    = $sig.SignerCertificate.Subject
        SHA256    = $hash
    }
}

# 2. Scheduled tasks created in the last 7 days by non-system principals
Get-ScheduledTask | ForEach-Object {
    $info = $_ | Get-ScheduledTaskInfo -ErrorAction SilentlyContinue
    if ($_.Date -and ([datetime]$_.Date) -gt $cutoff -and $_.Principal.UserId -notmatch 'SYSTEM|LOCAL SERVICE|NETWORK SERVICE') {
        $report += [PSCustomObject]@{
            Type      = 'ScheduledTask'
            Path      = $_.TaskPath + $_.TaskName
            Created   = $_.Date
            SigStatus = 'N/A'
            Signer    = $_.Principal.UserId
            SHA256    = ($_.Actions | ForEach-Object { $_.Execute + ' ' + $_.Arguments }) -join '; '
        }
    }
}

# 3. Run key entries pointing at user-writable paths
$runKeys = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run',
             'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run')
foreach ($rk in $runKeys) {
    $props = Get-ItemProperty -Path $rk -ErrorAction SilentlyContinue
    if ($props) {
        $props.PSObject.Properties | Where-Object { $_.Value -match 'AppData|Users\\Public|Temp' } | ForEach-Object {
            $report += [PSCustomObject]@{
                Type      = 'RunKey'
                Path      = "$rk\$($_.Name)"
                Created   = 'N/A'
                SigStatus = 'Review'
                Signer    = $env:USERNAME
                SHA256    = $_.Value
            }
        }
    }
}

$report | Format-Table -AutoSize
$report | Export-Csv -Path ".\installer-triage-$(Get-Date -Format 'yyyyMMdd-HHmm').csv" -NoTypeInformation

# Flag unsigned binaries explicitly
$unsigned = $report | Where-Object { $_.Type -eq 'File' -and $_.SigStatus -ne 'Valid' }
if ($unsigned) {
    Write-Warning "$(@($unsigned).Count) unsigned/invalid executables found in user-writable paths. Escalate to IR."
}

Remediation and Mitigation

Because no patch exists for a social-engineering delivery vector, remediation is layered:

Immediate (24 hours)

  1. Deploy the detections above into your SIEM/EDR and validate with a controlled test installer. Tune allowlists for your legitimate deployment tooling.
  2. Review Defender XDR alerts for the behaviors Microsoft describes: installers spawning script interpreters, tampering attempts, and connections from freshly dropped binaries. Pivot on device timeline in the Defender portal for any hits.
  3. Block known look-alike domains at the DNS/web proxy layer using Microsoft's published IOCs from the source blog, but treat the IOC list as a point-in-time snapshot — pair it with category-based blocking of newly registered domains (NRDs) where policy permits.

Short term (1–2 weeks)

  1. Remove local admin rights from standard users. This single control neuters the majority of trojanized installer impact — the malware inherits the user's privilege level.
  2. Enforce application control via Windows Defender Application Control (WDAC) or AppLocker. At minimum, block execution from Downloads, Temp, and Public directories. Publish approved software through an internal catalog (Company Portal, Software Center) so users have a sanctioned path.
  3. Harden against malvertising and SEO poisoning: deploy a reputable ad-blocking extension via policy, enforce SafeSearch-annotated results where feasible, and train users to navigate directly to vendor domains rather than clicking search ads for software.
  4. Verify code-signing enforcement. SmartScreen and Smart App Control should be enabled on Windows 11 endpoints; ensure your proxy inspects and scores download reputation.

Structural (30–90 days)

  1. Centralize software distribution. Every user-side install that must happen outside your managed catalog is an exception — log it, alert on it, review it.
  2. DNS-layer egress filtering with new-domain and look-alike-domain heuristics. This campaign class lives and dies on domain infrastructure; cutting resolution kills the lure.
  3. Tabletop the scenario. Walk your SOC and IR teams through a trojanized-installer-to-ransomware escalation path. Confirm you can isolate a host, acquire triage artifacts (the script above is a starting point), and scorch persistence within your containment SLA.

If You Find a Compromised Host

  • Isolate the device via Defender XDR (or your EDR equivalent) — do not power off; volatile evidence matters.
  • Acquire the triage output from the script above plus a memory capture if lateral movement is suspected.
  • Treat all credentials used on the host as compromised: force resets, revoke tokens, and review sign-in logs for the affected identities.
  • Hunt fleet-wide for the same installer filename, signer, and child-process patterns — these campaigns are rarely one-user events.

Related Resources

Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.