AppLocker

On this page 7

AppLocker is an application control feature in Windows that lets administrators define which executables, scripts, installers, packaged apps and DLLs users are permitted to run, based on publisher signature, file path or file hash. Within Windows security, it sits between broad malware defenses such as Microsoft Defender and the stricter, kernel-enforced App Control for Business, and it is managed mainly through Group Policy or mobile device management.

Introduced with Windows 7 and Windows Server 2008 R2 as the successor to Software Restriction Policies, AppLocker is designed around an allowlisting model: once rules exist for a file type, anything not explicitly allowed is blocked. It is valued for flexible, per-user and per-group rules, but Microsoft does not treat it as a security boundary, which shapes how it should be deployed.

How AppLocker evaluates and enforces rules

AppLocker enforces policy through the Application Identity service (AppIDSvc) and a kernel driver that intercept each attempt to load a controlled file. When a user launches a program, Windows checks the file against the rule collection for its type and decides whether the operation is allowed, denied or only logged.

Evaluation follows a fixed logic. An explicit deny rule always wins over an allow rule, an allow rule permits the file, and a file that matches no rule in an enforced collection is implicitly denied. Rule collections that contain no rules at all are not enforced, which means an administrator can control executables while leaving scripts untouched.

The following table lists the five rule collections and the file types each one governs.

Rule collectionFile types coveredTypical concern
Executable rules.exe and .comUnapproved programs and portable tools
Windows Installer rules.msi, .msp and .mstUnauthorized software installation
Script rules.ps1, .bat, .cmd, .vbs and .jsScript-based malware and admin abuse
Packaged app rules.appx and .msixStore and sideloaded modern apps
DLL rules.dll and .ocxLibrary injection and side-loading
AppLocker rule collections

DLL rules are disabled by default because they check every library load, which adds measurable overhead and requires extensive testing. Each collection can be set independently to Enforce rules or Audit only mode.

Rule conditions and their trade-offs

Every AppLocker rule identifies files through one of three rule conditions, and the choice determines how much maintenance the policy needs. Publisher conditions are generally preferred for signed software, while hash conditions cover unsigned files that cannot be identified any other way.

ConditionHow it identifies a fileStrengthWeakness
PublisherDigital signature, product name, file name and versionSurvives updates when versions are wildcardedRequires signed files
PathFolder or file location, with wildcardsSimple to create and readWeak if users can write to the path
File hashSHA-256 Authenticode hash of the fileIdentifies one exact fileBreaks on every update
Comparison of rule conditions

Path rules are the most common weakness in real deployments. The default rules allow everything under %WINDIR% and %PROGRAMFILES%, yet several subfolders of the Windows directory are writable by standard users, so an attacker can copy a binary there and run it. Experienced administrators add exceptions for writable folders or replace broad path rules with publisher rules.

Rules can also target a specific user or security group, so the same device can let help desk staff run diagnostic tools while blocking them for ordinary accounts. This granularity is one of the main reasons organizations still choose AppLocker.

AppLocker is one of several application control technologies in Windows, and the differences matter for threat modeling. The comparison below places it next to the controls most often confused with it.

FeatureEnforcement levelScope of rulesSecurity boundary
AppLockerUser mode service and driverPer user or groupNo
App Control for BusinessKernel and user mode code integrityWhole deviceYes, when properly configured
Smart App ControlCloud reputation and code integrityConsumer devicesLimited, no admin rules
Software Restriction PoliciesLegacy user mode checksPer user or computerNo, deprecated
Application control options in Windows

The key distinction is that App Control for Business, formerly Windows Defender Application Control, also protects kernel-mode drivers and can be hardened with memory integrity and virtualization-based security. Microsoft recommends it as the primary control and positions AppLocker as a complementary layer where per-user rules are required.

Deploying AppLocker in practice

A safe AppLocker rollout begins in Audit only mode, which records would-be blocks in the event log without stopping anything. Events appear under Applications and Services Logs, Microsoft, Windows, AppLocker, and the most important are event 8003 for audited files and event 8004 for blocked executables.

  1. Inventory the software that users genuinely need.
  2. Create the default rules and generate publisher rules from a reference machine.
  3. Remove or tighten path rules for user-writable folders.
  4. Deploy in audit mode and review events for several weeks.
  5. Switch collections to Enforce rules one at a time.

Enforcement requires the Application Identity service to be running, so policies typically set it to automatic start. Full enforcement is supported on Enterprise and Education editions and on Windows Server; Pro editions can create policies, but enforcement there is not a supported configuration.

The decision table below summarizes common situations and the matching configuration.

SituationRecommended choiceReason
Kiosk or shared terminalStrict executable allowlistFew apps, predictable use
Signed line-of-business softwarePublisher rules with version wildcardsUpdates do not break rules
Unsigned internal toolFile hash ruleNo signature to match
Need to stop PowerShell abuseScript rules plus Constrained Language ModeLimits script capabilities
Strong protection against adminsApp Control for Business insteadAppLocker is not a boundary
Choosing an AppLocker approach

Limitations and common bypasses

AppLocker has well-documented limits that every defender should understand. The most important is that local administrators can bypass it, for example by stopping the Application Identity service or changing local policy, so it protects best against standard users.

  • Trusted signed binaries such as mshta.exe, regsvr32.exe or InstallUtil.exe can run arbitrary code if they are allowed.
  • Writable allowed paths let attackers place payloads inside trusted folders.
  • Disabled DLL rules leave library side-loading uncovered.
  • Audit mode left in place gives visibility but no protection.

Mitigation combines Microsoft-recommended block rules for abused binaries, careful path exceptions and layering with Attack surface reduction rules and Microsoft Defender. With these measures, AppLocker remains a practical hardening control, even though it is not a guarantee.

Stripped to the essentials

AppLocker works like a guest list at the door of a Windows computer. The administrator writes down which programs and scripts may come in, and anything not on the list is turned away.

Programs can be recognized by who signed them, where they are stored or their exact digital fingerprint. The main point is simple: instead of chasing every bad program, the computer only runs the good ones it already knows. It is a strong lock for ordinary users, but someone with full administrator rights can still find a way around it.

Where it is applied

A regional hospital runs about 400 shared Windows workstations at nursing stations. Staff log in with standard accounts and need only the electronic health record client, a browser and a label printing tool. The IT team creates publisher rules for these signed applications, a hash rule for an old unsigned barcode utility and script rules that allow only scripts signed by the internal certificate.

After four weeks in audit mode, the team reviews event 8003 entries, adds two missed vendor updaters and then enforces the policy. When a phishing email later tricks a nurse into opening a malicious script, AppLocker blocks it before it runs, and script block event 8007 alerts the security team, who confirm that no workstation was compromised.