14 KiB
title, description, ms.assetid, ms.pagetype, keywords, ms.prod, ms.mktglfcycl, ms.sitesec, author
title | description | ms.assetid | ms.pagetype | keywords | ms.prod | ms.mktglfcycl | ms.sitesec | author | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Get apps to run on Device Guard-protected devices (Windows 10) | Windows 10 introduces several new features and settings that when combined all equal what we're calling, Device Guard. | E62B68C3-8B9F-4842-90FC-B4EE9FF8A67E | security |
|
W10 | deploy | library | brianlic-msft |
Get apps to run on Device Guard-protected devices
Applies to
- Windows 10 Windows 10 introduces several new features and settings that when combined all equal what we're calling, Device Guard. Device Guard can help to protect your enterprise devices against the accidental running of malicious apps by requiring all of your apps to be signed by a trusted entity. To use Device Guard in an enterprise, you must be able to get your existing line-of-business and Independent Software Vendor (ISV)-developed apps to run on a protected device. Unfortunately, many line-of-business apps aren't signed, and in many cases, aren't even being actively developed. Similarly, you may have unsigned software from an ISV that you want to run, or you want to run certain applications from an ISV while not trusting all applications from that ISV. As part of the Device Guard features, Windows 10 includes a new tool called Package Inspector. Package Inspector scans your unsigned apps, and creates catalog files of the installed and running binaries, which can then be signed by the Sign Tool Windows SDK utility and distributed using Group Policy so that your apps will run on Device Guard-protected devices.
What you need to run your apps on Device-Guard protected devices
Before you can get your apps to run on Device Guard-protected devices, you must have:
- A device running Windows 10 Enterprise, Windows 10 Education, or Windows Server 2016 Technical Preview.
- Determined which unsigned apps you need to include in your catalog file.
- Created a code integrity policy for use by Device Guard.
- A code signing certificate, created using an internal public key infrastructure (PKI).
- SignTool. A command-line tool that digitally signs files, verifies signatures in files, or time stamps files. The tool is installed in the \Bin folder of the Microsoft Windows Software Development Kit (SDK) installation path.
Create a catalog file for unsigned apps
You must run Package Inspector on a device that's running a temporary Code Integrity Policy in audit mode, created explicitly for this purpose. Audit mode lets this policy catch any binaries missed by the inspection tool, but because it's audit mode, allows everything to continue running. Important This temporary policy, shouldn't be used for normal business purposes. To create a catalog file for an existing app
- Start PowerShell as an administrator, and create your temporary policy file by typing:
mkdir temp New-CIPolicy -l FileName -f .\tempdeny.xml -s .\temp -u ConvertFrom-CIPolicy .\tempdeny.xml .\tempdeny.bin cp .\tempdeny.bin C:\Windows\System32\CodeIntegrity\SIPolicy.p7b
- Restart your device.
- Start PowerShell as an administrator, and start scanning your file system by typing:
Where:PackageInspector.exe start c:
Option Description start <drive_letter>:
Specifies to start a scan. For example, starting to scan the C: drive.
-path
File path to the package being inspected.
- Copy the app installation media to your C:\ drive, and then install and run the program. Copying the media to your local drive helps to make sure that the installer and its related files are included in your catalog file. If you miss the install files, your Code Integrity Policy might trust the app to run, but not to install. After you've installed the app, you should check for updates. If updates happen while the app is open, you should close and restart the app to make sure everything is caught during the inspection process. Note Because the Package Inspector creates a log entry in the catalog for every binary laid down on the file system, we recommend that you don't run any other installations or updates during the scanning process.
- Optional: If you want to create a multi-app catalog (many apps included in a single catalog file), you can continue to run Steps 2-3 for each additional app. After you've added all of the apps you want to add, you can continue to Step 5.
Note To streamline your process, we suggest:
- Actively supported and updated apps. Create a single catalog file for each app.
- Legacy apps, non-active or not updated. Create a single catalog file for all of your legacy apps.
- Stop the scanning process and create the .\InspectedPackage.cat and InspectedPackage.cdf files for your single app in your specified location, by typing:
PackageInspector.exe stop c:
You can also use the scan
command in place of using both start
and stop
if you want to create a catalog of files that are already present on your hard drive. The scan
command recursively scans a specified directory and includes all signable files in the catalog. You can scan a specified directory by typing:
PackageInspector.exe scan c:\<insert directory path>
The following table shows the available options for both the scan
and stop
commands.
Option | Description |
---|---|
stop <drive_letter>: |
Specifies that a scan of the specified location is complete, creating either a catalog or a definition file. For example, C: |
scan <path to scan> |
Specifies a directory path to scan. This command recursively scans a specified directory and includes all signable files in the catalog. |
-out |
Specifies what type of info should be created by the tool. You can use either |
-listpath |
Specifies the location where the installer will output the list of files for |
-cdfPath <file_name> |
Specifies where the tool should put the created .cdf file. If you use this option, you must also specify the file name. We recommend that you use the full path to the file. However, relative paths are supported. |
-resdir |
This option isn't currently supported. |
-name |
This option isn't currently supported. |
-ph |
Specifies whether to include page hashes in the catalog. You can use either |
-en |
Specifies the catalog's encoding type. By default, it's PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, 0x00010001. |
-ca1 |
Specifies the CATATTR1 in the catalog and catalog definition files. |
-ca2 |
Specifies the CATATTR2 in the catalog and catalog definition files. |
Option | Description |
---|---|
signtool |
Specifies the full path location to SignTool.exe. |
sign |
Digitally signs files. For a list of the options supported by the sign command, see the [SignTool options](http://go.microsoft.com/fwlink/p/?LinkId=619283). |
/n SubjectName |
Specifies the name of the subject of the signing certificate. This value can be a substring of the entire subject name. |
/f SignCertFileLocation |
Specifies the signing certificate in a file. If the file is in .pfx format and protected by a password, use the /p option to specify the password. If the file does not contain private keys, use the /csp and /k options to specify the .csp and private key container name. |
/p Password |
Specifies the password to use when opening a PFX file. (Use the /f option to specify a PFX file.) |
/fd Algorithm |
Specifies the file digest algorithm to use for creating file signatures. The default is SHA2. |
/v |
Displays verbose output regardless of whether the command runs successfully or fails, and displays warning messages. |