USB and Removable Media Control in Production Environments

How is USB use controlled in a production environment? A use case inventory, a scanning station, approved encrypted media, device restrictions on Windows HMIs and a vendor service procedure.
Technical summary
Technology
Windows Group Policy, Device Installation Restrictions, Removable Storage Access, auditpol, PowerShell
Topic
Controlling the flow of removable media in OT
Level
Intermediate
Prerequisites
  • An inventory of HMIs and engineering workstations
  • Knowledge of Windows local/domain group policy
  • Access to maintenance and vendor processes
In this article8 sections

However strict segmentation is, files are carried on the production floor: recipe transfers, machine software updates, PLC project files, a service technician’s diagnostic tool. Most of this flow runs on USB sticks and stays entirely outside network controls. The firewall doesn’t see the stick. In this guide we explain how to make USB manageable instead of banning it: use cases, the scanning station and approved media model, technical restrictions on Windows-based HMIs and a vendor visit procedure.

Why removable media is the main infection route in OT

On an isolated or well-segmented OT network, few paths to the outside world remain. Removable media tends to be the least controlled of these paths:

  • Uncontrolled source: The USB stick may have been used on a technician’s laptop, an office computer or at home.
  • Weak target: HMIs and engineering workstations often run outdated Windows versions; antivirus signatures are updated late or not at all.
  • Low visibility: Network sensors and firewalls don’t see files coming from USB; the incident is noticed only when its effects appear on the network.
  • Not just storage: 4G modems, network adapters and keyboard-emulating devices connected via USB can bypass storage restrictions.

The Stuxnet case is cited as the best-known example showing that an air-gapped facility can be reached through removable media. The more commonly seen picture is much more ordinary: non-targeted malware infects an HMI via a stick brought from the office and spreads to other Windows machines in the same cell.

An inventory of use cases

If you start control design with the decision “let’s shut off USB”, the rule gets broken at the first maintenance shutdown. A recipe needs to be loaded on the night shift, nobody can reach anyone, the port is opened and stays that way. List the real needs first. Questions to ask for each scenario: which file is carried, from whom, to which device, how often, and is there an alternative path?

Scenario Typical content Alternative path
Recipe / parameter transfer CSV, vendor-specific recipe file A file transfer service through the OT DMZ
PLC project backup Engineering software project archive A central project repository (inside OT)
Machine software update OEM update package Approved media that has passed through the scanning station
Service diagnostics Log files, screenshots Export only, to approved media
Quality and production reports PDF, Excel Network transfer via the historian or MES

The table gives two results: the scenarios where USB is really needed narrow down, and a controlled network transfer path is planned for the rest. The network path must be secure too; the transfer service in the OT DMZ is subject to the same scanning and recording rules. An uncontrolled shared folder is no better than USB.

The scanning station (kiosk) approach

A scanning station is a separate computer where media coming from outside is checked before entering OT. A station that works has:

  • A separate location and network: The station isn’t connected to the OT network. Restricted internet or an IT connection is used for signature updates.
  • Multiple scanning engines: Scanning with different engines instead of a single antivirus product widens detection coverage.
  • A file type allowlist: Files outside the extensions in the scenario inventory (executables, scripts, Office files with macros) are rejected by default; an exception is opened with approval.
  • Transfer to clean media: Scanned files are copied not from the incoming stick but to approved media issued by the station. The incoming stick is never plugged into an OT device.
  • Records: For every operation, the person, date, file names and hashes are kept.

The station itself needs maintenance too. A kiosk gathering dust in a corner, with signatures not updated for months, is a common sight; on paper there’s a control, in reality there isn’t. A scanning station catches known malware, but on its own it isn’t a sufficient industrial cybersecurity control against targeted or new malware. Restrictions on the target system and file type restrictions are applied together.

The approved and encrypted media model

In the approved media model, only registered, preferably hardware-encrypted sticks provided by the organization are plugged into OT devices. The elements of the model:

  1. Each stick is registered by serial number and assigned to a person or a line.
  2. Sticks aren’t used outside OT; using separate sticks for “into OT” and “out of OT” also reduces the risk of reverse infection.
  3. When a hardware-encrypted stick is lost, data doesn’t leak; project files and recipes are valuable intellectual property.
  4. On target devices, only the hardware IDs of these sticks are allowed (see the technical section below).

An allowlist based on hardware ID (VID/PID) isn’t a strong control on its own; these IDs can be spoofed. Still, it prevents a random stick from being plugged in, and combined with physical control and procedure it forms a meaningful layer. A single layer isn’t enough.

Device restrictions on HMIs and engineering workstations

On Windows-based HMIs and engineering workstations, two families of group policies are used. The first is Device Installation Restrictions, which prevents a device driver from being installed; the second is the Removable Storage Access settings, which limit access to installed storage classes.

Policy (Computer Configuration › Administrative Templates › System) Effect
Device Installation › Device Installation Restrictions › Prevent installation of devices not described by other policy settings Prevents new devices not on the allowlist from being installed
… › Allow installation of devices that match any of these device IDs Allows the hardware IDs of approved sticks and required peripherals
Removable Storage Access › Removable Disks: Deny write access Blocks writing to removable disks
Removable Storage Access › All Removable Storage classes: Deny all access Blocks access to all removable storage classes

The points where we commonly get stuck in practice:

  • In allowlist mode, if peripherals such as keyboards, mice, touchscreens and license dongles are forgotten, the device becomes unusable when one of them is replaced. The operator panel won’t accept a mouse at midnight. On the first rollout, extract the IDs of existing peripherals with Get-PnpDevice.
  • By default, installation restrictions affect only new installations. In the “Prevent installation of devices that match any of these device IDs” policy, which blocks by ID, the “Also apply to matching devices that are already installed” option is checked separately to apply it to devices already installed as well.
  • A USB stick creates more than one device node in Windows (the USB controller side, the USBSTOR disk, the volume). Adding only the USB\VID_xxxx&PID_yyyy ID to the allowlist may not be enough; plug the approved stick into a test system and check all the resulting IDs with Get-PnpDevice.
  • On HMIs not joined to the domain, local group policy or the registry is used. In a managed environment, a registry change can be overwritten by group policy; choose a single method.
  • The HMI vendor’s compatibility with these restrictions (for example, using a USB dongle for licensing) should be verified in advance.

Example commands (administrator PowerShell) that apply the write block and disable AutoRun on an HMI not joined to the domain, and enable auditing of USB insertion events:

# Block writing to removable disks (Removable Disks: Deny write access)
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices\{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}'
New-Item -Path $k -Force | Out-Null
New-ItemProperty -Path $k -Name Deny_Write -PropertyType DWord -Value 1 -Force

# Disable AutoRun/AutoPlay on all drive types
$e = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'
New-Item -Path $e -Force | Out-Null
New-ItemProperty -Path $e -Name NoDriveTypeAutoRun -PropertyType DWord -Value 255 -Force

# Audit external device recognition events (Security log, event 6416)
auditpol /set /subcategory:"Plug and Play Events" /success:enable

# Existing disk drives and hardware IDs
Get-PnpDevice -Class DiskDrive | Select-Object Status, FriendlyName, InstanceId

# Recent external device events
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=6416} -MaxEvents 20

After the changes, it may be necessary to restart the device or refresh policies. Try the settings on a test HMI or in a maintenance window first; the first attempt isn’t made on a live operator panel. On systems managed with Intune or another MDM, the same settings are defined in Microsoft’s DeviceInstallation Policy CSP documentation. Hardening steps for engineering workstations beyond USB are covered in the engineering workstation security guide.

A procedure for vendor service visits

When the machine builder’s technician arrives with their own computer and stick, removable media risk is at its highest. The shutdown is ongoing, everyone is in a hurry, and control steps are the first thing skipped. The procedure should be shared before the visit and tied to the contract:

  1. Advance notice: The vendor sends the list of software and files they’ll bring before the visit.
  2. Entry check: All media brought in passes through the scanning station; files are transferred to approved media.
  3. Technician computer: If possible, a clean service computer provided by the organization is used. If the technician’s own computer is to be used, it’s connected to a separate service segment; up-to-date protection software and evidence of a scan are requested.
  4. Escort and records: Work is done accompanied by maintenance staff; what was loaded onto which device is recorded.
  5. Exit: Logs to be taken out are copied to an approved exit stick; a backup of the changed PLC program and configuration is taken.

When remote service is needed, the same principles apply to the network connection; details are in the machine builder remote access guide.

Checklist and monitoring

  • USB use cases have been listed; those that can be done over the network have been moved to the network.
  • A scanning station has been set up, its signatures are up to date, a file type allowlist is defined and an operation log is kept.
  • Approved sticks are registered by serial number and assigned; entry and exit sticks are separate.
  • Device installation restrictions and AutoRun disabling have been applied on HMIs and engineering workstations.
  • External device events (6416) are collected in the central log system; there’s an alarm for unapproved devices.
  • The vendor procedure has been added to contracts and explained to the maintenance team.
  • Unused ports are physically locked.

The most valuable monitoring signal is an attempt to plug in a device not on the approved list. Compare these events periodically with maintenance records; every attempt without an explanation is a question mark. Floor staff knowing the reasons behind the rules affects compliance more than technical controls do; the topic should be supported by an operator and maintenance team awareness program. For adapting the controls to the OT environment, the OT/ICS and industrial cybersecurity service can be consulted.

Frequently asked questions

Is it possible to ban USB use in OT completely?

In most plants it isn’t; recipe transfers, machine updates and service work require removable media. The realistic way is to narrow the use cases and make the remaining ones controlled through a scanning station and approved media.

Does a scanning station always catch malware?

No. A scanning station catches most known malware, but on its own it isn’t enough against new or targeted malware. It should be used together with file type restrictions, device restrictions on the target system and event monitoring.

How is USB restricted on HMIs not joined to the domain?

Local group policy or the corresponding registry keys are used. Removable Storage Access settings block write access or all access, and Device Installation Restrictions allow only approved devices to be installed. Settings are tried on a test system first.

How are USB insertion events monitored?

When the Plug and Play Events subcategory is enabled in the advanced audit policy, event 6416 is written to the Windows security log. These events are collected in the central log system and compared with the approved device list.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Cybersecurity

Firewall, VPN, endpoint security and threat prevention. We reduce the attack surface and measure and report the risks.

Knowledge Center

Other articles