337. Adversaries Disable Plug and Play Devices
Hello everyone!
Adversaries love PowerShell as they can use it to solve hundreds of tasks. Let's look at another curious example.
According to the report, the adversary leveraged PowerShell to disable Plug and Play devices, specificly a keyboard and a mouse:
Get-PnpDevice -FriendlyName 'HID Keyboard Device' | %{Disable-PnpDevice -InputObject $_ -ErrorAction SilentlyContinue -Confirm:$false}
Get-PnpDevice -Class Keyboard | %{Disable-PnpDevice -InputObject $_ -ErrorAction SilentlyContinue -Confirm:$false}
Get-PnpDevice -Class Mouse | %{Disable-PnpDevice -InputObject $_ -ErrorAction SilentlyContinue -Confirm:$false}
Write-Host "Devices disabled."
Not a very common event, so if you collect ScriptBlock, you have another detection or hunting opportunity:
event_type: "scriptexecutionwin"
AND
script_text: "Disable-PnpDevice"
See you tomorrow!

Comments
Post a Comment