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
- Attacker crafts a malicious AppX or MSIX package containing a payload (e.g., loader or backdoor).
- Attacker drops the malicious package into an unconventional, user-writable directory (e.g.,
C:\Users\Public\,C:\ProgramData\). - Attacker triggers an installation request via the Windows
AppxDeployment-Serverservice, pointing to the malicious package file. - The
AppxDeployment-Serverservice (Event ID 854) initiates the ingestion of the package into the deployment pipeline. - The OS validation logic checks the package, but if the path is not strictly validated, it proceeds to stage the application.
- The application is registered in the user environment or system-wide, depending on execution context.
- 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-Serverlogs 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.
Threat Hunt
Search for Event ID 854 where Path does not contain standard installation directories.
Data: AppxDeployment/Operational logs
Mitigations
Restrict user write access to directories used for application staging where possible.
Detection coverage 1
Detect AppX Package Added from Uncommon Directory
mediumDetects 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.
Detection queries are available on the platform. Get full rules →