Detect Hardware Additions in CrowdStrike LogScale
Adversaries may physically introduce computer accessories, networking hardware, or other computing devices into a system or network to gain access or expand capabilities. Hardware additions range from passive network taps (Throwing Star LAN Tap) to active keystroke injection devices (USB Rubber Ducky, Bash Bunny, O.MG Cable), rogue wireless access points, DMA attack devices (PCILeech), and fully autonomous compute devices (Raspberry Pi, netbooks) providing persistent network footholds. Unlike purely software-based attacks, hardware additions require physical proximity to target systems and can bypass many software security controls by presenting as trusted peripherals. The DarkVishnya threat group is documented connecting Bash Bunny, Raspberry Pi, and inexpensive netbooks directly to victim organization networks to establish persistent access and conduct internal reconnaissance. Detection relies primarily on monitoring for unexpected device class connections via Windows Plug and Play audit events, correlating new HID device connections with subsequent automated keystroke injection patterns, and identifying new network interfaces with unknown MAC addresses appearing on internal segments.
MITRE ATT&CK
- Tactic
- Initial Access
- Technique
- T1200 Hardware Additions
- Canonical reference
- https://attack.mitre.org/techniques/T1200/
LogScale Detection Query
// T1200 Hardware Additions — Suspicious USB/HID/Network Device via PnP Event 6416
// Requires: Windows Security Event log forwarding to Falcon LogScale
#event_simpleName="/" OR #event_simpleName=*
| EventCode = "6416"
| ChannelName = "Security"
// Parse hardware metadata from EventData XML
| regex(field="EventData", regex="Name=\\\"ClassName\\\">(?P<ClassName>[^<]+)<")
| regex(field="EventData", regex="Name=\\\"DeviceId\\\">(?P<DeviceId>[^<]+)<")
| regex(field="EventData", regex="Name=\\\"HardwareIds\\\">(?P<HardwareIds>[^<]+)<")
| regex(field="EventData", regex="Name=\\\"SubjectUserName\\\">(?P<SubjectUserName>[^<]+)<")
| regex(field="EventData", regex="Name=\\\"SubjectDomainName\\\">(?P<SubjectDomain>[^<]+)<")
// Score known pentest VIDs
| IsKnownPentestVID := if(match(field="HardwareIds", regex="(?i)(VID_2B04|VID_16D0|VID_2E8A|VID_2341|VID_1B4F|VID_221A|VID_04D8)"), then=1, else=0)
// Identify legitimate vendors
| IsLegitimateVendor := if(match(field="HardwareIds", regex="(?i)(VID_045E|VID_046D|VID_05AC|VID_413C|VID_03F0|VID_17EF|VID_047D|VID_046A|VID_1B1C|VID_1532|VID_1038|VID_04B3|VID_04CA|VID_0461)"), then=1, else=0)
// Classify device type
| IsHIDDevice := if(match(field="ClassName", regex="(?i)hidclass"), then=1, else=0)
| IsNetworkDevice := if(match(field="ClassName", regex="(?i)(^net$|wlan|bluetooth|net service)"), then=1, else=0)
// Flag suspicious device types
| IsSuspiciousHID := if(IsHIDDevice = 1 AND IsLegitimateVendor = 0, then=1, else=0)
| IsUSBNetDevice := if(
IsNetworkDevice = 1 AND IsLegitimateVendor = 0
AND (match(field="DeviceId", regex="(?i)USB") OR match(field="HardwareIds", regex="(?i)USB")),
then=1, else=0)
// Compute suspicion score
| SuspicionScore := (IsKnownPentestVID * 3) + IsSuspiciousHID + IsUSBNetDevice
// Filter to actionable alerts only
| SuspicionScore > 0
// Assign risk reason
| RiskReason := case {
IsKnownPentestVID = 1 => "Known pentest/attack hardware VID detected" ;
IsSuspiciousHID = 1 => "Unknown vendor HID device — possible keystroke injector" ;
IsUSBNetDevice = 1 => "Unknown USB network adapter — possible LAN tap" ;
* => "Suspicious device class connection"
}
| table(["@timestamp", ComputerName, SubjectUserName, SubjectDomain, EventCode, ClassName, DeviceId, HardwareIds, IsHIDDevice, IsNetworkDevice, IsKnownPentestVID, SuspicionScore, RiskReason])
| sort(SuspicionScore, order=desc) CrowdStrike LogScale (Humio) query detecting T1200 Hardware Additions via Windows Security Event 6416 forwarded through the Falcon sensor's event log collection. Parses device class, hardware IDs, and vendor IDs from raw EventData XML, scores suspicion across three vectors: known pentest hardware VIDs (Hak5, Digispark, Pi Pico, Arduino, ZTEX DMA), unknown HID class devices that may be keystroke injectors, and unknown USB network adapters potentially used as LAN taps or rogue network implants.
Data Sources
Required Tables
False Positives & Tuning
- USB-to-serial or USB-to-UART adapters used by developers and IT for console access to network equipment appearing as unknown HID or network class devices
- Specialty gaming peripherals (stream decks, macro keypads, foot pedals) from boutique vendors presenting as HID devices with unknown VIDs
- VMs or containers using USB passthrough where the hypervisor presents virtual USB devices with non-standard vendor IDs to the guest OS
Other platforms for T1200
Testing Methodology
Validate this detection against 4 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.
- Test 1Install Microsoft Loopback Network Adapter via devcon
Expected signal: Windows Security Event ID 6416: ClassName=Net, ClassId={4d36e972-e325-11ce-bfc1-08002be10318}, DeviceId=ROOT\NET\0001 or similar, HardwareIds=*MSLOOP. Windows System Event IDs 20001 and 20003 in System log for driver installation. Entry in C:\Windows\INF\setupapi.dev.log with timestamp and INF path.
- Test 2Enumerate Connected HID Devices via PowerShell
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe and CommandLine containing 'Get-PnpDevice' and 'HIDClass'. Security Event ID 4688 (if command line auditing enabled). PowerShell ScriptBlock Log Event ID 4104 with the full device enumeration script.
- Test 3Query USB Device Connection History via Registry
Expected signal: Sysmon Event ID 1: Process Create for reg.exe with CommandLine containing 'HKLM\SYSTEM\CurrentControlSet\Enum\USB'. Sysmon Event ID 1 also for findstr.exe. Security Event ID 4688 (if enabled) for both processes. Registry access events may be logged depending on SACL configuration.
- Test 4Simulate Keystroke Injection via PowerShell SendKeys
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe initiated by the calling process, plus any processes spawned by the injected keystrokes. If Sysmon monitors for the parent process chain, keystrokes injected into an Explorer window will show explorer.exe as parent. PowerShell ScriptBlock Log Event ID 4104 for both the outer and any inner PowerShell sessions.
References (9)
- https://attack.mitre.org/techniques/T1200/
- https://securelist.com/darkvishnya/89169/
- https://ossmann.blogspot.com/2011/02/throwing-star-lan-tap.html
- https://arstechnica.com/information-technology/2012/03/the-pwn-plug-is-a-little-white-box-that-can-hack-your-network/
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-6416
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/advanced-security-audit-policy-settings
- https://learn.microsoft.com/en-us/windows-hardware/drivers/install/devcon-command-syntax
- https://github.com/hak5/bashbunny-payloads
- https://docs.microsoft.com/en-us/windows/win32/devio/device-management-events
Unlock Pro Content
Get the full detection package for T1200 including response playbook, investigation guide, and atomic red team tests.