T1120 IBM QRadar · QRadar

Detect Peripheral Device Discovery in IBM QRadar

Adversaries may attempt to gather information about attached peripheral devices and components connected to a computer system. Peripheral devices could include auxiliary resources that support a variety of functionalities such as keyboards, printers, cameras, smart card readers, or removable storage. The information may be used to enhance their awareness of the system and network environment or may be used for further actions — ransomware families identify removable drives for encryption and printers for ransom note delivery, RATs enumerate cameras and Bluetooth devices for surveillance capability profiling, and APT groups map USB storage history to understand data exfiltration opportunities.

MITRE ATT&CK

Tactic
Discovery
Technique
T1120 Peripheral Device Discovery
Canonical reference
https://attack.mitre.org/techniques/T1120/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
  logsourcename(logsourceid) AS log_source,
  username,
  sourceip,
  QIDNAME(qid) AS event_name,
  "Command" AS command_line,
  "ParentImage" AS parent_image,
  CASE
    WHEN LOWER("Command") MATCHES '.*(?:usbhub|usbcontroller|win32_diskdrive|usbstor|win32_usbhub).*' THEN 'USB_Device'
    WHEN LOWER("Command") MATCHES '.*(?:printer|win32_printer|printerconfiguration).*' THEN 'Printer'
    WHEN LOWER("Command") MATCHES '.*(?:logicaldisk|win32_logicaldisk|fsinfo drives|driveinfo|get-volume|get-disk|physicalmedia).*' THEN 'Drive_Enumeration'
    WHEN LOWER("Command") MATCHES '.*(?:pnpdevice|pnpentity|cdromdrive|win32_sounddevice).*' THEN 'PnP_Device'
    WHEN LOWER("Command") MATCHES '.*(?:usbstor|enum.usb).*' THEN 'USB_Registry_Enum'
    ELSE 'General_Peripheral'
  END AS enumeration_type
FROM events
WHERE
  LOGSOURCETYPEID(logsourceid) IN (12, 13, 232)
  AND (
    ("CommandLine" IMATCHES '.*wmic\.exe.*' AND (
      "CommandLine" IMATCHES '.*(logicaldisk|diskdrive|USBHub|USBController|PhysicalMedia|CDROMDrive|Win32_USB|PnPEntity|printer).*'
    ))
    OR ("CommandLine" IMATCHES '.*(powershell\.exe|pwsh\.exe).*' AND (
      "CommandLine" IMATCHES '.*(Win32_DiskDrive|Win32_USBHub|Win32_USBController|Get-PnpDevice|Win32_LogicalDisk|Win32_Printer|Win32_CDROMDrive|Win32_PnPEntity|DriveInfo|Get-Volume|Get-Disk).*'
    ))
    OR ("CommandLine" IMATCHES '.*fsutil\.exe.*fsinfo drives.*')
    OR ("CommandLine" IMATCHES '.*reg\.exe.*(USBSTOR|Enum\\USB).*')
  )
  AND STARTSWITH(CATEGORYNAME(category), 'Process')
ORDER BY devicetime DESC
LAST 24 HOURS
medium severity medium confidence

Detects peripheral device discovery commands executed on Windows hosts. Monitors for wmic, PowerShell WMI class queries, fsutil drive enumeration, and reg.exe USB registry reads that indicate an adversary profiling connected hardware for surveillance or exfiltration preparation.

Data Sources

IBM QRadar with Windows Event Log DSMQRadar with Sysmon DSMMicrosoft Windows Security Event Log

Required Tables

events

False Positives & Tuning

  • Automated hardware inventory scripts run by enterprise management platforms like Microsoft SCCM or Tanium during scheduled collection windows
  • Help desk technicians remotely diagnosing printer or USB connectivity issues using WMI-based tools
  • Software installers that enumerate available drives and PnP devices during setup or compatibility checks
Download portable Sigma rule (.yml)

Other platforms for T1120


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1USB Hub and Disk Enumeration via WMIC

    Expected signal: Sysmon Event ID 1: Two Process Create events with Image=wmic.exe. First CommandLine contains 'Win32_USBHub' and 'DeviceID,Name,Description'. Second CommandLine contains 'Win32_DiskDrive' and 'MediaType' and 'Removable Media'. Security Event ID 4688 (if command line auditing enabled) for both executions. Microsoft-Windows-WMI-Activity/Operational shows the WMI namespace queries.

  2. Test 2Removable Drive Discovery via PowerShell WMI and PnP

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Win32_LogicalDisk', 'DriveType', 'eq 2', and 'Get-PnpDevice'. PowerShell ScriptBlock Log Event ID 4104 with full deobfuscated script content showing the WMI query with DriveType filter. Console output lists all removable drives with DeviceID and volume names.

  3. Test 3Printer Enumeration via WMIC for Ransom Note Targeting

    Expected signal: Sysmon Event ID 1: Process Create with Image=wmic.exe, CommandLine containing 'printer' and 'PortName,DriverName'. Security Event ID 4688 with full command line. Microsoft-Windows-WMI-Activity/Operational Event ID 5857 showing the Win32_Printer provider loaded. Output lists all configured printers with network vs local status.

  4. Test 4Drive Letter Enumeration via fsutil LOLBin

    Expected signal: Sysmon Event ID 1: Process Create with Image=fsutil.exe, CommandLine='fsutil fsinfo drives'. Security Event ID 4688 if command line auditing is enabled. Output format: 'Drives: C:\ D:\ E:\' — presence of multiple drives beyond C:\ indicates attached removable or additional storage.

  5. Test 5USB Device History Extraction from Registry

    Expected signal: Sysmon Event ID 1: Process Create for reg.exe with CommandLine containing 'USBSTOR'. Sysmon Event ID 12 or 13: RegistryEvent for HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR registry key queries (if registry monitoring is configured for this path). Security Event ID 4663 if object access auditing is enabled on the USBSTOR registry key. Output contains all USB device classes with vendor IDs, product IDs, and serial numbers.

Unlock Pro Content

Get the full detection package for T1120 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections