- Updating List of Trusted Root Certificates in Windows 10/8.1/7
- Managing Trusted Root Certificates in Windows 10
- Rootsupd.exe Utility
- Certutil: Getting Latest Root Certificates from Windows Update
- The List of Root Certificates in STL Format
- Updating Root Certificates in Windows with GPO in an Isolated Environment
- Обновление корневых сертификатов в Windows 10 / Windows Server 2016
- Управление корневыми сертификатами компьютера в Windows 10
- Утилита rootsupd.exe
- Certutil: получение корневых сертификатов через Windows Update
- Список корневых сертификатов в формате STL
- Обновление корневых сертификатов в Windows с помощью GPO в изолированных средах
Updating List of Trusted Root Certificates in Windows 10/8.1/7
All Windows versions have a built-in feature for automatically updating root certificates from the Microsoft websites. As part of the Microsoft Trusted Root Certificate Program, MSFT maintains and publishes a list of certificates for Windows clients and devices in its online repository. If the verified certificate in its certification chain refers to the root CA that participates in this program, the system will automatically download this root certificate from the Windows Update servers and add it to the trusted ones.
Windows requests a trusted root certificate lists (CTL) renewal once a week. If Windows doesn’t have a direct access to the Windows Update directory, the system won’t be able to update the root certificates, so a user may have some troubles when browsing websites (which SSL certificates are signed by an untrusted CA – see the article about the “Chrome SSL error: This site can’t provide a secure connection”), or with installing/running signed scripts and apps.
In this article, we’ll try to find out how to manually update the list of root certificates in TrustedRootCA on isolated networks or computers/servers without a direct Internet connection.
Managing Trusted Root Certificates in Windows 10
How to see the list of root certificates of a Windows computer?
- To open the root certificate store of a computer running Windows 10/8.1/7/Windows Server, start the mmc.exe console;
- Select File ->Add/Remove Snap-in, select Certificates (certmgr) in the list of snap-ins ->Add;
- Select that you want to manage certificates of local Computer account;
- Next -> OK -> OK;
- Expand the Certificates node ->TrustedRootCertificationAuthoritiesStore. This section contains the list of trusted root certificates on your computer.
You can also get a list of trusted root certificates with expiration dates using PowerShell:
Get-Childitem cert:\LocalMachine\root |format-list
You can list the expired certificates, or which expire in the next 30 days:
Get-ChildItem cert:\LocalMachine\root | Where
In the mmc console, you can view information about any certificate or remove it from trusted ones.
You can manually transfer the root certificate file between Windows computers using the Export/Import function.
- You can export any certificate to a .CER file by clicking on it and selecting All Tasks -> Export;
- You can import this certificate on another computer using the option All Tasks -> Import.
Rootsupd.exe Utility
In Windows XP, the rootsupd.exe utility was used to update computer`s root certificates. The list of root and revoked certificates in it was regularly updated. The utility was distributed as a separate update KB931125 (Update for Root Certificates). Let’s see if we can use it now.
- Download the rootsupd.exe utility using the following link http://download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/rootsupd.exe . At the moment (August 2, 2019) the link doesn’t work, maybe Microsoft decided to remove it from the public. Today you can download the rootsupd.exe from kaspersky.com website — http://media.kaspersky.com/utilities/CorporateUtilities/rootsupd.zip ;
- To install the Windows root certificates, just run the rootsupd.exe file. But we will try to examine its contents more carefully. Extract the certificates from the executable file with the command: rootsupd.exe /c /t: C:\PS\rootsupd
- Certificates are stored in SST files, like authroots.sst, delroot.sst, etc. To delete/install a certificate, you can use the following commands:
updroots.exe authroots.sst
updroots.exe -d delroots.sst
However, as you can see, these certificate files were created on April 4, 2013 (almost a year before the end of official support of Windows XP). Thus, since then the utility has not been updated and cannot be used to install up-to-date certificates. A little later we will need the updroots.exe file.
Certutil: Getting Latest Root Certificates from Windows Update
The latest version of the Certutil.exe tool for managing certificates (available in Windows 10), allows you to download from Windows Update and save the actual root certificates list to the SST file.
To generate an SST file, run this command with the administrator privileges on a computer running Windows 10 and having a direct access to the Internet:
certutil.exe -generateSSTFromWU roots.sst
As a result, an SST file containing up-to-date list of root certificates will appear in the target directory. Double-click to open it. This file is a container containing trusted root certificates.
As you can see, a familiar Certificate Management snap-in opens, from which you can export any of the certificates you have got. In my case, there have been 358 items in the list of certificates. Obviously, it is not rational to export the certificates and install them one by one.
To install all the certificates from the SST file and add them to the list of trusted root certificates on a computer, you can use the PowerShell commands:
$sstStore = ( Get-ChildItem -Path C:\ps\rootsupd\roots.sst )
$sstStore | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root
To install all certificates listed in the file, use the updroots.exe (it is located in the rootsupd.exe file, which was extracted in the previous section).
Run the certmgr.msc snap-in and make sure that all certificates have been added to the Trusted Root Certification Authority.
The List of Root Certificates in STL Format
There is another way to get the list of root certificates from Microsoft website. To do it, download the file http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab (updated twice a month). Using any archiver (or even Windows Explorer) unpack authrootstl.cab. It contains one file authroot.stl.
The Authroot.stl file is a container with a list of trusted certificates in Certificate Trust List format.
You can install this file in the system using the context menu of the STL file (Install CTL).
Or using certutil.exe tool:
certutil -addstore -f root authroot.stl
You can also import certificates using the certificate management console (Trust Root Certification Authorities -> Certificates -> All Tasks -> Import). Specify the path to your STL file with certificates.
After you have run the command, a new section Certificate Trust List appears in Trusted Root Certification Authorities container of the Certificate Manager console (certmgr.msc).
In the same way, you can download and install the list of the revoked (disallowed) certificates that have been removed from Root Certificate Program. To do it, download disallowedcertstl.cab (http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab), unpack it and add to the Untrusted Certificates section using this command:
certutil -addstore -f disallowed disallowedcert.stl
Updating Root Certificates in Windows with GPO in an Isolated Environment
If you have the task of regularly updating root certificates in an Internet-isolated Active Directory domain, there is a slightly more complicated scheme for updating local certificate stores on domain joined computers using Group Policies. You can configure root certificate updates on user computers in the isolated Windows networks in several ways.
The first way assumes that you regularly manually download and copy to your isolated network a file with root certificates obtained as follows:
certutil.exe –generateSSTFromWU roots.sst
Then the certificates from this file can be distributed via SCCM or PowerShell logon script in GPO:
$sstStore = (Get-ChildItem -Path \\fr-dc01\SYSVOL\woshub.com\rootcert\roots.sst )
$sstStore | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root
The second way is to obtain the actual root certificates using the command:
Certutil -syncWithWU -f \\fr-dc01\SYSVOL\woshub.com\rootcert\
A number of root certificate files (CRT file format) will appear in the specified network shared folder, including files (authrootstl.cab, disallowedcertstl.cab, disallowedcert.sst, thumbprint.crt).
Then, using Group Policy Preference, you need to change the value of the RootDirURL parameter in the registry key HKLM\Software\Microsoft\SystemCertificates\AuthRoot\AutoUpdate. This parameter should point to the shared network folder from which your Windows computers should receive new root certificates. Run the domain GPMC console, create a new GPO, switch to the edit policy mode and expand the section Computer Configuration -> Preferences -> Windows Settings -> Registry. Create a new registry property with the following settings:
- Action: Update
- Hive: HKLM
- Key path: Software\Microsoft\SystemCertificates\AuthRoot\AutoUpdate
- Value name: RootDirURL
- Type: REG_SZ
- Value data: file://\\fr-dc01\SYSVOL\woshub.com\rootcert\
It remains to link this policy on a computer`s OU and after updating the policies to check for new root certificates in the certstore.
In this article, we looked at several ways to renew trusted root certificates on a Windows network that is isolated from the Internet.
Обновление корневых сертификатов в Windows 10 / Windows Server 2016
В операционные системы семейства Windows встроена система автоматического обновления корневых сертификатов с сайта Microsoft. Компания MSFT в рамках программы корневых сертификатов Microsoft Trusted Root Certificate Program, ведет и публикует в своем онлайн хранилище список сертификатов для клиентов и устройств Windows. Если проверяемый сертификат в своей цепочке сертификации относится к корневому CA, который участвует в этой программе, система автоматически скачает с узла Windows Update и добавит такой корневой сертификат в доверенные.
ОС Windows запрашивает обновление корневых сертификатов (certificate trust lists — CTL) один раз в неделю. Если в Windows отсутствует прямой доступ к каталогу Windows Update, то система не сможет обновить корневые сертификаты, соответственно у пользователя могут быть проблемы с открытием сайтов (SSL сертификаты которых подписаны CA, к которому нет доверия, см. статью об ошибке в Chrome «Этот сайт не может обеспечить безопасное соединение«), либо с установкой запуском подписанных приложений или скриптов.
В этой статье попробуем разобраться, как можно вручную обновить список корневых сертификатов в TrustedRootCA в изолированных сетях, или компьютерах/серверах без прямого подключения к Интернету.
Управление корневыми сертификатами компьютера в Windows 10
Как посмотреть список корневых сертфикатов компьютера с Windows?
- Чтобы открыть хранилище корневых сертфикатов компьютера в Windows 10/8.1/7/Windows Server, запустите консоль mmc.exe;
- Нажмите Файл (File) ->Добавить или удалить оснастку (Add/Remove Snap-in), в списке оснасток выберите Сертификаты (Certificates) ->Добавить (Add);
- В диалоговом окне выберите что вы хотите управлять сертификатами учетной записью компьютера (Computer account);
- Далее -> Ok -> Ok;
- Разверните Certificates (Сертификаты) ->Trusted Root Certification Authorities Store (Доверенные корневые сертификаты). В этом списке содержится список корневых доверенных сертификатов вашего компьютера.
Вы также можете получить список доверенных корневых сертификатов со сроками действия с помощью PowerShell:
Get-Childitem cert:\LocalMachine\root |format-list
Можно вывести список истекших сертификатов, или которые истекут в ближайшие 30 дней:
Get-ChildItem cert:\LocalMachine\root | Where
В консоли mmc вы можете просмотреть информацию о любом сертификате или удалить его из доверенных.
Вы можете вручную перенести файл корневого сертификата с одного компьютера на другой через функцию Экспорта/Импорта.
- Вы можете экспортировать любой сертификат .CER в файл, щелкнув по нему и выбрав “Все задачи” -> “Экспорт”;
- Затем с помощью команды Импорт можно импортировать этот сертификат на другом компьютере.
Утилита rootsupd.exe
В Windows XP для обновления корневых сертификатов использовалась утилита rootsupd.exe. В этой утилита содержится список корневых и отозванных сертификатов, зашитых в которой регулярно обновлялся. Сама утилита распространялась в виде отдельного обновления KB931125 (Update for Root Certificates).
- Скачайте утилиту rootsupd.exe, перейдя по ссылке (по состоянию на 15.07.2019 ссылка не работает, возможно в Microsoft решили убрать ее из общего доступа. На данный момент вы можете скачать утилиту с сайта kaspersky.com — http://media.kaspersky.com/utilities/CorporateUtilities/rootsupd.zip );
- Для установки корневых сертификатов Windows, достаточно запустить файл rootsupd.exe. Но мы попробуем более внимательно рассмотреть его содержимое, распаковав его с помощью команды: rootsupd.exe /c /t:C:\PS\rootsupd
- Сертификаты содержатся в SST файлах: authroots.sst, delroot.sst и т.п. Для удаления/установки сертификатов можно воспользоваться командами:
updroots.exe authroots.sst
updroots.exe -d delroots.sst
Но, как вы видите, дата создания этих файлов 4 апреля 2013 (почти за год до окончания официальной поддержки Windows XP). Таким образом, с этого времени утилита не обновлялась и не может быть использована для установки актуальных сертификатов. Однако нам чуть позже понадобится файл updroots.exe.
Certutil: получение корневых сертификатов через Windows Update
Утилита управления и работы с сертификатами Certutil (появилась в Windows 10), позволяет скачать с узлов Windows Update и сохранить в SST файл актуальный список корневых сертификатов.
Для генерации SST файла, на компьютере Windows 10 с доступом в Интернет, выполните с правами администратора команду:
certutil.exe -generateSSTFromWU roots.sst
В результате в целевом каталоге появится файл SST, содержащий актуальный список сертификатов. Дважды щелкните по нему для открытия. Данный файл представляет собой контейнер, содержащий доверенные корневые сертификаты.
В открывшейся mmc оснастке управления сертификатами вы можете экспортировать любой из полученных сертификатов. В моем случае, список сертификатов содержал 358 элемента. Естественно, экспортировать сертификаты и устанавливать по одному не рационально.
Для установки всех сертификатов из SST файла и добавления их в список корневых сертфикатов компьютера можно воспользоваться командами PowerShell:
$sstStore = ( Get-ChildItem -Path C:\ps\rootsupd\roots.sst )
$sstStore | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root
Также можно воспользоваться утилитой updroots.exe (она содержится в архиве rootsupd.exe, который мы распаковали в предыдущем разделе):
Запустите оснастку certmgr.msc и убедитесь, что все сертификаты были добавлены в хранилище Trusted Root Certification Authority.
Список корневых сертификатов в формате STL
Есть еще один способ получения списка сертификатов с сайта Microsoft. Для этого нужно скачать файл http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab (обновляется дважды в месяц).С помощью любого архиватора (или проводника Windows) распакуйте содержимое архива authrootstl.cab. Он содержит один файл authroot.stl.
Файл authroot.stl представляет собой контейнер со списком доверенных сертификатов в формате Certification Trust List.
Данный файл можно установить в системе с помощью контекстного меню файла STL (Install CTL).
Или с помощью утилиты certutil:
certutil -addstore -f root authroot.stl
Также вы можете импортировать сертификаты из консоли управления сертификатами (Trust Root Certification Authorities –>Certificates -> All Tasks > Import).
Укажите путь к вашему STL файлу сертификатами.
После выполнения команды, в консоли управления сертификатами (certmgr.msc) в контейнере Trusted Root Certification Authorities (Доверенные корневые сертификаты) появится новый раздел с именем Certificate Trust List (Список доверия сертификатов).
Аналогичным образом можно скачать и установить список с отозванными сертификатами, которые были исключены из программы Root Certificate Program. для этого, скачайте файл disallowedcertstl.cab (http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab), распакуйте его и добавьте в раздел Untrusted Certificates командой:
certutil -addstore -f disallowed disallowedcert.stl
Обновление корневых сертификатов в Windows с помощью GPO в изолированных средах
Если у вас возникла задача регулярного обновления корневых сертификатов в изолированном от Интернета домене Active Directory, есть несколько более сложная схема обновления локальных хранилищ сертификатов на компьютерах домена с помощью групповых политик. В изолированных сетях Windows вы можете настроить обновление корневых сертификатов на компьютерах пользователей несколькими способами.
Первый способ предполагает, что вы регулярно вручную скачиваете и копируете в вашу изолированную сеть файл с корневыми сертификатами, полученный так:
certutil.exe –generateSSTFromWU roots.sst
Затем сертификаты из данного файла можно установить через SCCM или PowerShell логон скрипт в GPO:
$sstStore = ( Get-ChildItem -Path \\dc01\SYSVOL\winitpro.ru\rootcert\roots.sst )
$sstStore | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root
Второй способ предполагает получение актуальных корневых сертификатов с помощью команды:
Certutil -syncWithWU -f \\dc01\SYSVOL\winitpro.ru\rootcert\
В указанном сетевом каталоге появится ряд файлов корневых сертификатов (CRT) и в том числе файлы (authrootstl.cab, disallowedcertstl.cab, disallowedcert.sst, thumbprint.crt).
Затем с помощью GPP нужно изменить значение параметра реестра RootDirURL в ветке HKLM\Software\Microsoft\SystemCertificates\AuthRoot\AutoUpdate. Этот параметр должен указывать на сетевую папку, из которой клиентам нужно получать новые корневые сертификаты. Перейдите в секцию редактора GPO Computer Configuration -> Preferences -> Windows Settings -> Registry. И создайте новый параметр реестра со значениями:
Action: Update
Hive: HKLM
Key path: Software\Microsoft\SystemCertificates\AuthRoot\AutoUpdate
Value name: RootDirURL
Type: REG_SZ
Value data: file://\\dc01\SYSVOL\winitpro.ru\rootcert\
Осталось назначить эту политику на компьютеры и после обновления политик проверить появление новых корневых сертификатов в хранилище.
В этой статье мы рассмотрели несколько способов обновления корневых сертификатов на ОС Windows, изолированной от Интернета.