Windows platform binary table

Windows Platform Binary Table (WPBT) — неодолимая Crapware? Обзор и описание технологии

Некоторые пользователи заметили, что Microsoft добавила в Windows 8 новую функцию, которая позволяет производителям заражать прошивку UEFI crapware. Windows продолжит установку предустановленного ПО производителя, даже при условии чистой установки Windows.

Эта функция продолжила развитие и была представлена в Windows 10, таким образом Microsoft дала в руки производителей ПК мощный инструмент. Теперь желание собирать компьютер самому еще более подстегивается желанием избавиться от предустановленного мусорного ПО.

WPBT 101

Начиная с Windows 8, производитель ПК может включать в прошивку UEFI исполняемое приложение *.exe Windows. Приложение хранится в секции «Windows Platform Binary Table» (WPBT) секции UEFI. При загрузке Windows ищет в этой секции прошивки приложение поставщика компьютера, копирует его на системный диск и запускает его. В самой Windows нет механизмов и инструментов для отключения этой функции. Приложение поставщика будет выполнено без вопросов.

Lenovo LSE и дыры в безопасности

Нельзя написать о WPBT не упомянув о истории с Lenovo, которая поставляет различные ПК со встроенной «Lenovo Service Engine» (LSE). Полный список ПК с вшитой LSE доступен по ссылке.

Когда программа автоматически запускается в Windows 8, Lenovo Service Engine загружает программу OneKey Optimizer и отправляет некоторое количество данных обратно в Lenovo. Lenovo устанавливает в систему Windows сервис, разработанный для загрузки и обновления ПО из Интернет, делая невозможным его удаление.

Lenovo пошло далее, достав своим crapware и Windows 7. Прошивка UEFI проверяет файл C:\Windows\system32\autochk.exe и перезаписывает его собственной версией от Lenovo. Эта программа запускается при загрузке системы для проверки файловой системы в Windows, этот трюк позволяет Lenovo запустить свое ПО в Windows без участия конечного пользователя. Это демонстрирует несовершенство системы WPBT — производители ПК не должны модифицировать системные файлы Windows.

Microsoft и Lenovo открыли серьезную дыру в системе безопасности, которая может использоваться злоумышленниками для получения несанкционированного доступа к компьютеру. Поэтому Lenovo прекратило поставки новых ПК с Lenovo Service Engine и выпустило обновления, позволяющие отключать автоматическое исполнение кода UEFI.

Lenovo отличилась снова: bloatware оказалось встроенным в BIOS ноутбуков компании

Компания Lenovo снова оказалась в центре скандала, связанного с модификацией операционной системы на ноутбуках, которые производит и продаёт эта компания. В прошлый раз выяснилось, что их OEM-операционка включала установленную рекламную программу Superfish, отличившуюся навязчивым поведением и полным пренебрежением к безопасности. На этот раз всё гораздо хуже – пользователя не спасёт даже полная переустановка операционной системы с нуля.

После установки чистой системы Windows перед первым её запуском, специальная программа, хранящаяся в BIOS, заменяет системный файл autochk.exe, служащий для проверки целостности файловой системы и исправления ошибок, на свой загрузчик. Он создаёт системные службы, которые скачивают нужные программы с серверов Lenovo. Так эта система работает с Windows 7. В случае Windows 8 всё происходит ещё проще.

Дело в том, что ОС Windows, начиная с восьмёрки, поддерживает т.н. Windows Platform Binary Table (WPBT) – таблицу, формат которой был разработан компанией в виде расширения таблиц ACPI (Advanced Configuration and Power Interface). Система работает так: в BIOS компьютера может храниться бинарный исполняемый файл. Если система при загрузке находит там этот файл, она копирует его на диск и выполняет.

Читайте также:  Файлы для загрузки efi windows

К сожалению, компания Microsoft с высоты своего положения имеет все возможности для того, чтобы продавить производителей железа на поддержку такой системы – чем она и не преминула воспользоваться. А сделано всё это, разумеется, на благо пользователей. Компания Microsoft, не щадя себя, заботится о безопасности пользователей операционных систем Windows. Поэтому, таким образом она решила организовать помощь в розыске украденных компьютеров.

Допустим, у вас украли ноутбук. Если даже вы поставите на него специальную программу, помогающую отслеживать его, то злоумышленнику ничто не мешает отформатировать его накопитель. Однако если такая программа будет интегрирована в BIOS, то установка чистой системы на компьютер не остановит её выполнение (за исключением случаев, когда вор окажется поклонником Linux).

Всё было бы хорошо, если бы производители и продавцы ноутбуков не стремились заработать любой ценой. Мало того, что установленные по умолчанию системы разбухают от всяческого bloatware (эта недобрая традиция успешно перекинулась и на смартфоны). Так теперь существует способ, при котором от него просто нельзя избавиться.

Итак, в случае установки Windows 8 хранящийся в BIOS файл «wpbbin.exe» копируется в C:\windows\system32 и выполняется. Заканчивается это всё той же установкой фирменных служб от Lenovo, LenovoUpdate.exe и LenovoCheck.exe, скачивающих свои файлы с серверов компании.

Эту замечательную систему компания назвала «Lenovo Service Engine». Она не только отсылает на сервер компании информацию о технических характеристиках вашего компьютера, но и устанавливает софт «OneKey Optimizer» (ОКО), судя по всему, попадающий в категорию «crapware». Согласно заверениям компании, он «очищает систему от ненужных файлов» и «оптимизирует работу компьютера». Чем он на самом деле занимается – пока мало кому известно, но судя по большинству программ, которые прикрываются такими обещаниями, вряд ли это что-то хорошее.

Мало того, что программы непонятного назначения, от которых невозможно избавиться, занимаются подменой системных файлов – они скачивают этот «оптимизатор» ОКО по незащищённому протоколу HTTP. Вряд ли нужно объяснять, чем это чревато (см. «атака MitM»).

Как оказалось, об этой тревожной ситуации специалист по безопасности Роэл Шувенберг (Roel Schouwenberg) сообщил в Lenovo и Microsoft ещё в апреле. Теперь Lenovo утверждает, что все компьютеры, начиная с июня, лишены этой замечательной функции. Также она выпустила патчи и инструкции для того, чтобы отключить эту функцию в тех компьютерах, в которых она присутствует, и списки компьютеров, подверженных этой проблеме (настольные / лэптопы). Интересно, что теперь компания называет функцию, которую сама же и интегрировала, «уязвимостью».

Ответом Microsoft на эти вопросы стало расширение инструкции по использованию WPBT, в которой она объясняет всем производителям софта и железа, что программы, пользующиеся этой возможностью, «должны быть написаны с прицелом на безопасность, иначе их можно будет расценивать, как malware».

К сожалению, в наше время часто, покупая умное электронное устройство, человек не оказывается его полноправным владельцем – он безо всякого предупреждения может оказаться в ситуации, когда его компьютер или смартфон снабжён абсолютно ненужными ему программами, которые в лучшем случае отъедают системные ресурсы, а в худшем – нарушают безопасность работы с данными. Сложно сказать, каким образом можно восстановить справедливость в таких случаях – судебными исками, бойкотами продукции определённых компаний, или другими действиями. Ясно только, что делать это необходимо.

File Table

The File Table contains a complete list of source files with their various attributes, ordered by a unique, non-localized, identifier. Files can be stored on the source media as individual files or compressed within a cabinet file. For more information, see Using Cabinets and Compressed Sources.

Читайте также:  Windows from usb winsetupfromusb

The File Table has the following columns.

Column Type Key Nullable
File Identifier Y N
Component_ Identifier N N
FileName Filename N N
FileSize DoubleInteger N N
Version Version N Y
Language Language N Y
Attributes Integer N Y
Sequence Integer N N

Columns

A non-localized token that uniquely identifies the file. This field is insensitive to case. Do not assign identifiers to different files that differ only by their case.

The external key into the first column of the Component Table. This field identifies the Component that controls the file.

The file name used for installation. The name may be localized.

Because some web servers can be case sensitive, FileName should match the case of the source files exactly to ensure support of Internet downloads.

The size of the file in bytes. This must be a non-negative number.

This field is the version string for a versioned file. This field is blank for non-versioned files. The file version entered into this field must be identical to the version of the file included with the installation package.

The Version field can also be set to contain the primary key of another record in the File table. The referenced file then determines the versioning logic for this file. For more information, see Companion Files. Note that if this file is the key path for its component, it must not be specified as a companion file.

A list of decimal language IDs separated by commas.

Font files should not be authored with a language ID, as fonts do not have an embedded language ID resource. Thus this column should be left null for font files.

The integer that contains bit flags that represent file attributes.

The following table shows the definition of the bit field.

Constant Hexadecimal Decimal Description
msidbFileAttributesReadOnly 0x000001 1 Read-Only
msidbFileAttributesHidden 0x000002 2 Hidden
msidbFileAttributesSystem 0x000004 4 System
msidbFileAttributesVital 0x000200 512 The file is vital for the accurate operation of the component to which it belongs. If the installation of a file with the msidbFileAttributesVital attribute fails, the installation stops and is rolled back. In this case, the Installer displays a dialog box without an Ignore button. If this attribute is not set, and the installation of the file fails, the Installer displays a dialog box with an Ignore button. In this case, the user can choose to ignore the failure to install the file and continue.
msidbFileAttributesChecksum 0x000400 1024 The file contains a valid checksum. A checksum is required to repair a file that has become corrupted.
msidbFileAttributesPatchAdded 0x001000 4096 This bit must only be added by a patch and if the file is being added by the patch.
msidbFileAttributesNoncompressed 0x002000 8192 The file’s source type is uncompressed. If set, ignore the Word Count Summary Property. If neither msidbFileAttributesNoncompressed or msidbFileAttributesCompressed are set, the compression state of the file is specified by the Word Count Summary Property. Do not set both msidbFileAttributesNoncompressed and msidbFileAttributesCompressed.
msidbFileAttributesCompressed 0x004000 16384 The file’s source type is compressed. If set, ignore the Word Count Summary Property. If neither msidbFileAttributesNoncompressed or msidbFileAttributesCompressed are set, the compression state of the file is specified by the Word Count Summary Property. Do not set both msidbFileAttributesNoncompressed and msidbFileAttributesCompressed.

If the msidbFileAttributesVital bit within the Attributes column is set, and if the component to which the file belongs is selected for installation, then the installer must be able to install this file for the installation to be completed successfully. If the installer is unable to install the file for some reason (for example, if the source file cannot be located within the source image), then an error dialog box will appear with the options «Retry» or «Cancel». For a file that does not have msidbFileAttributesVital set, the options in case of an install error will be «Abort», «Retry», and «Ignore» (that is, the user will have the option to complete the install successfully without installing that file).

The msidbFileAttributesChecksum bit within the Attributes column should be set for every executable file in the installation that has a valid checksum stored in the Portable Executable (PE) file header. Only those files that have this bit set will ever be verified for valid checksum during a reinstall. For more information, see the REINSTALLMODE.

Sequence position of this file on the media images. This order must correspond to the order of the files in the cabinet if the files are compressed. The integers in this field must be equal or greater than 1.

The sequence numbers in the Sequence column are used to specify both the order of installation for files and the source media upon which the file is located (in conjunction with the Media Table). For example, suppose a file has a sequence number of 92. To determine the source disk this file resides on, look in the Media table for the entry with the smallest Last Sequence value that is larger than 92.

Although compressed files are assigned internal sequence numbers within cabinets, those absolute numbers do not need to match the sequence numbers within the File table. It is, however, important that the sequence of files in the File table be identical to the sequence of the files within the cabinets.

For files that are not compressed, the sequence numbers need not be unique. For instance, if all your files are uncompressed, and all reside on one disk, you could give all the files the same sequence number.

The maximum limit is 32767 files. To create a Windows Installer package with more files, see Authoring a Large Package.

Remarks

The InstallFiles and RemoveFiles actions in the sequence tables process the information in this table. For information about using sequence tables, see Using a Sequence Table.

The table is initially generated from the file list, but if cabinet compression is used, the table is regenerated from the output of the compression engine. For more information, see Cabinet Files.

To move an existing file on the user’s computer during the installation use the MoveFiles Action and MoveFile Table. To install a file to multiple locations use the DuplicateFiles Action and the DuplicateFile Table.

The following table summarizes the possible combinations of values in the Version column and the Language column. For more information, see File Versioning Rules.

Читайте также:  Внешний диск не инициализируется mac os
Оцените статью