Best practices for code signing with App Control for Business

Note

Some capabilities of App Control for Business are only available on specific Windows versions. Learn more about App Control feature availability.

Code signing lets Windows verify that a file hasn't changed since it was signed and associates the file with a publisher identity. App Control for Business can combine that identity with signed file metadata to create rules that are more specific and easier to maintain than individual hash rules.

Use these practices as application acceptance requirements and as guidance for internal development teams. The strongest approach is to sign code in the build pipeline. Catalog signing provides a migration path for existing applications that can't immediately be rebuilt.

Require signatures for every executable artifact

Don't limit signing requirements to the primary executable or installer. Inventory and sign every supported file that an application builds, installs, downloads, or runs, including:

  • Executable files, DLLs, drivers, and ActiveX controls.
  • Installers, bootstrap executables, custom actions, and uninstallers.
  • PowerShell scripts, modules, and manifests.
  • JavaScript, VBScript, Windows Script Files, and other supported scripts.
  • Plug-ins, add-ins, extensions, helper tools, update agents, and repair tools.
  • Temporary or generated executable content used during installation, update, or removal.

App Control evaluates files when they're loaded or run. A signed installer doesn't automatically establish trust for every loose file that the installer places on the device.

Require external software vendors to provide an artifact inventory and signature-coverage statement. Give internal line-of-business (LOB) development teams access to an organization-controlled signing service or certificate and make signing a release gate.

Prefer embedded signing for actively maintained applications

An embedded signature travels with the file when the file is copied or moved. Integrate embedded signing into the build or release pipeline for applications that your organization develops or can rebuild.

Use consistent publisher identities and RFC 3161 timestamps. Timestamping preserves evidence that a signature was created while the signing certificate was valid. Verify signatures after signing, after packaging, and after installation to detect packaging or post-build processes that modify signed files.

Protect private keys by using a managed signing service, hardware security module, or another organization-approved key-protection mechanism. Limit who and what can request signatures, record signing operations, and define a process to revoke trust after a key compromise.

Add authenticated metadata to scripts and non-PE files

Portable Executable (PE) files normally provide file identity and version information through version resources. Scripts and other non-PE files don't usually contain those resources. SignTool can add equivalent information to the signature of non-PE files as authenticated metadata attributes.

At minimum, provide stable values for:

  • Original file name.
  • Internal name.
  • File description.
  • File version.
  • Product name.
  • Product version.

App Control can use supported signed attributes when it creates file name, signed version, and file publisher rules. Consistent metadata lets a policy authorize a specific product or script instead of everything signed by the same publisher.

For the supported fields, SignTool commands, and App Control rule considerations, see Use signed metadata for scripts and non-PE files.

Use the narrowest practical signer rules

A broad certificate rule can allow more software than intended. For example, a publisher rule for a major software vendor might allow every product that vendor signs. Prefer FilePublisher rules when reliable file metadata is available. These rules combine the signer, a file attribute, and a minimum version.

Review generated rules before deployment and confirm:

  • The certificate chain represents the intended publisher.
  • The selected file attribute is stable and specific to the application.
  • Minimum and maximum versions match the maintenance strategy.
  • Fallback hash rules don't unintentionally authorize unrelated files.

For more information, see Understand App Control policy rules and file rules.

Use catalogs to remediate existing and partially signed applications

A signed catalog contains hashes for one or more files. A covered file can use the catalog signature without modifying the file. Catalogs are useful for:

  • Existing unsigned applications.
  • Applications where only some components are signed.
  • Legacy applications that can't be rebuilt.
  • Third-party applications where trusting every file from the vendor's publisher certificate would be too broad.
  • Files that don't support embedded signatures.

Catalogs are hash-bound. Regenerate, sign, test, and deploy the catalog whenever any covered file changes. Pay particular attention to self-updating applications and files generated during installation or first use.

Catalog trust depends on both the signing certificate and deployment of the catalog to each managed endpoint. Catalog signing isn't a universal replacement for embedded signing on unmanaged devices.

For the end-to-end procedure, see Deploy catalog files to support App Control for Business.

Integrate signing with application intake and CI/CD

App Control works best when applications are signed and include file identity and version information. Require signing and version metadata as part of your build and application intake processes.

  1. Inventory every executable artifact and identify whether it uses an embedded or catalog signature.

  2. Apply stable identity and version metadata before signing.

  3. Sign and timestamp artifacts in a controlled pipeline.

  4. Verify signatures and catalog membership after packaging and installation.

  5. Test the complete application in an App Control audit policy, including installation, update, repair, optional features, and removal.

  6. Retain the artifact manifest, signature-verification results, catalog version, and signing identity with the release record.

  7. Block promotion when an expected artifact is unsigned, has changed after signing, or is missing from its catalog.

Sign App Control policies

An App Control policy begins as XML and is converted into a binary policy before deployment. Signing the binary policy helps protect it from unauthorized modification or removal, including by a local administrator.

For more information, see Use signed policies to protect App Control for Business against tampering.

Obtain code signing certificates for your own use

Use one of these approaches:

App Control signer-based rules support RSA signing certificates with a maximum key length of 4,096 bits. For current cryptography limitations, see App Control file rule levels.