Article: Prevent tampering of the Fleet agent and installer settings on Windows
Prevent tampering of Fleet agent and installer settings on Windows
Introduction
On Windows, users with administrative rights can remove or modify management agents like Fleet Orbit. Unlike many EDR and DLP tools that include built-in tamper protection, Fleet doesn’t attempt to hide or lock itself down. This is intentional, Fleet is built on openness and transparency, with enforcement driven by policies you can see and manage.
To keep the agent in place, IT teams can add their own guardrails using a combination of: • A PowerShell script that sets hardened registry values • A Fleet policy that checks those values and reapplies them if missing • A Windows configuration profile that blocks MDM unenrollment
Together, these components create a self-healing enforcement loop that ensures protections remain in place, without relying on hidden or opaque mechanisms.
Hardening the installer
Apply registry values via a PowerShell script to help prevent uninstallation or tampering of protected applications.
https://github.com/fleetdm/fleet/blob/main/assets/scripts/windows-fleet-hardening.ps1
Policies in Fleet
A Fleet policy confirms that the hardened registry key exists. If it’s missing, the policy fails, triggering automation to run the script again. Once applied, the policy becomes compliant. If tampering occurs later, the cycle repeats.
https://github.com/fleetdm/fleet/blob/main/assets/policies/windows-fleet-hardening.policies.yml
⚠️ On first run, this policy fails intentionally to ensure automation executes the hardening script.
Blocking unenrollment
Deploy a configuration profile to prevent devices from unenrolling from MDM.
https://github.com/fleetdm/fleet/blob/main/assets/configuration-profiles/BlockMDMUnenrollment.xml
📌 The
AllowManualMDMUnenrollmentCSP is only supported on certain versions of Windows, verify compatibility before deployment.
More advanced approaches
More mature organisations may already be using additional controls to protect against tampering. For example:
- ADMX-backed CSPs, such as
ADMX_AddRemovePrograms, which can restrict software removal across the board. This provides strong protection, but applies to all applications, not just the Fleet agent. - AppLocker or similar application control solutions, which can explicitly block execution of unapproved installers or uninstallers.
These options are powerful, but they require more careful design and typically broader organisational adoption. The Fleet script + policy + profile approach offers a lightweight, targeted way to enforce persistence without restricting unrelated applications.
Conclusion
Combining a PowerShell hardening script, a Fleet policy with automation, and a configuration profile gives you dependable protection against tampering with the Fleet agent and other critical installer settings.
Fleet’s open model makes enforcement visible and verifiable, without relying on concealed or fragile mechanisms.
Want to learn more about how Fleet approaches transparent, cross-platform device management?
Visit fleetdm.com or check out the other guides for macOS, Windows, and Linux.
TODO Irena: create PR with this article and have Mike T review before it goes live. Let's also get this scheduled on the content calendar.
@irenareedy I've updated the links to point to the Fleet repo rather than mine just waiting on approval of this PR https://github.com/fleetdm/fleet/pull/32307
The above PR containing the assets has been merged @irenareedy can you please add @nonpunctual as a reviewer as well as @mike-j-thomas to the PR for the article thank you :)
@irenareedy @AdamBaali If this is the article, I read through & it looks great! No need to add me as reviewer to close. Thanks.
@nonpunctual I don't think there will be any other changes to it, so that sounds good 👍
Closing this issue as i've made it into a PR for Mike T to review.
Agent hardens, like stone, Policies the river's flow, Cyber tampering gone.