Skip to content

Trust and WDAC

On Windows the XrmGhost CLI is distributed as an Authenticode-signed binary. Administrators who run Windows Defender Application Control (WDAC) or who simply want to verify what they are installing will meet three different names. Each one belongs to a different context, and each one answers a different question.

NameWhat it isWhere you see it
XrmGhost.CliThe PackageIdentifier — the unique, machine-readable id of the packageThe PackageIdentifier field of the winget manifest, and the argument you pass to winget install / winget upgrade
XrmGhostThe brand — the product and publisher name shown to people in the winget manifestThe Publisher / display fields of the winget manifest and the winget listing
Agostini Lab SrlThe Authenticode publisher — the legal entity the code-signing certificate was issued toThe signature of the binary: Properties > Digital Signatures in Explorer, Get-AuthenticodeSignature, and the WDAC publisher rule

Use each name only in its own context:

  • To install or upgrade with winget, use the PackageIdentifier XrmGhost.Cli.
  • To recognise the product in a listing, look for the brand XrmGhost.
  • To decide whether a binary is trusted — manually or through WDAC — look at the Authenticode publisher, Agostini Lab Srl, and at the certificate details read from the signed binary itself.

Read the exact certificate subject from a signed binary

Section titled “Read the exact certificate subject from a signed binary”

A WDAC rule must match the certificate exactly as it appears in the signature. This page deliberately does not publish the certificate subject or any of its fields (CN, O, L, C): a value typed from the company name, or copied from documentation, may differ from the real one by a single character — and a rule that does not match lets nothing through.

Take the values from the signed binary itself, at the moment you write the policy.

  1. Download or install the XrmGhost CLI release you want to allow, and locate the signed executable (the xg binary) on disk.
  2. Right-click the file and open Properties > Digital Signatures.
  3. Select the signature whose name is Agostini Lab Srl and choose Details > View Certificate.
  4. On the Details tab, select Subject and copy the exact value shown.
  5. On the Certification Path tab, note the issuing CA — the certificate directly above the signing (leaf) certificate in the chain — and copy its exact name as well.

The same information is available from PowerShell, reading the binary rather than any document:

Terminal window
$sig = Get-AuthenticodeSignature -FilePath .\xg.exe
$sig.Status # must be Valid
$sig.SignerCertificate.Subject # the exact subject to use
$sig.SignerCertificate.Issuer # the issuing CA of the leaf certificate

If Status is anything other than Valid, stop: do not build a policy from that file.

Allow the CLI with a rule at the publisher level, built from both values read from the signed binary:

  • the exact subject of the signing certificate, and
  • the issuing CA of the certificate chain.

The simplest way to get both right is to let WDAC read them from the signed file you have just verified, instead of typing them:

Terminal window
$rules = New-CIPolicyRule -Level Publisher -DriverFilePath .\xg.exe
Merge-CIPolicy -PolicyPaths .\YourPolicy.xml -OutputFilePath .\YourPolicy.xml -Rules $rules

Then compare the signer that appears in the resulting policy XML with the subject and issuing CA you copied in the previous section. If they differ, trust the binary and investigate the policy.

  • Install with the PackageIdentifier XrmGhost.Cli.
  • The binary’s signature is Valid and its publisher is Agostini Lab Srl.
  • Subject and issuing CA were copied from a signed binary, not typed from this page or from the company name.
  • The WDAC rule is at the publisher level and uses both values.
  • No rule pins the leaf certificate thumbprint or the file hash.