Skip to content
Threat Feed
medium advisory

Abuse of AppX Deployment Service for Malicious Package Installation

Adversaries are leveraging the Windows AppX deployment mechanism to execute malicious packages by placing them in non-standard file paths to bypass traditional deployment directory restrictions.

Threat actors have been observed abusing the Windows AppX deployment mechanism to facilitate the execution of malicious applications. By placing AppX or MSIX packages in unconventional file system paths and triggering the AppxDeployment-Server to process them, attackers can evade security controls that typically monitor or restrict execution from standard installation directories like Program Files or Windows\SystemApps. This technique, often seen in loader campaigns like BazarLoader, relies on the AppxDeployment-Server event log (Event ID 854) to record the addition of packages to the deployment pipeline. Defenders should focus on identifying anomalous package source paths that fall outside established enterprise update channels and standard installation directories.

Attack Chain

  1. Attacker crafts a malicious AppX or MSIX package containing a payload (e.g., loader or backdoor).
  2. Attacker drops the malicious package into an unconventional, user-writable directory (e.g., C:\Users\Public\, C:\ProgramData\).
  3. Attacker triggers an installation request via the Windows AppxDeployment-Server service, pointing to the malicious package file.
  4. The AppxDeployment-Server service (Event ID 854) initiates the ingestion of the package into the deployment pipeline.
  5. The OS validation logic checks the package, but if the path is not strictly validated, it proceeds to stage the application.
  6. The application is registered in the user environment or system-wide, depending on execution context.
  7. The application executes, establishing persistence or performing malicious operations.

Impact

Successful abuse of this mechanism allows attackers to achieve arbitrary code execution under the guise of legitimate application installation. This vector has been historically utilized by malware families such as BazarLoader to gain initial persistence and bypass security software that may have broader trust for Microsoft-signed or AppX-based deployment flows.

Recommendation

  • Deploy the provided Sigma rule to monitor Event ID 854 for packages loaded from paths outside of trusted application directories.
  • Implement a policy of least privilege for writing to directories outside of known, permitted application installation paths.
  • Review AppxDeployment-Server logs for persistent, recurring package registration events originating from user-temp folders or web-downloaded locations.

Immediate actions

Deploy Sigma rule for Event ID 854 and audit current deployment paths.

Detection Engineering 48h

Threat Hunt

Search for Event ID 854 where Path does not contain standard installation directories.

medium medium confidence hunt now

Data: AppxDeployment/Operational logs

Mitigations

Restrict user write access to directories used for application staging where possible.

short_term IT Operations

Detection coverage 1

Detect AppX Package Added from Uncommon Directory

medium

Detects an AppX package being added to the deployment pipeline from an uncommon location that is not part of a standard install directory or trusted CDN.

sigma tactics: stealth sources: process_creation, windows

Detection queries are available on the platform. Get full rules →