Files
bashbunny-payloads/payloads/library/remote_access/USB_Intruder/USB_Intruder/eject.ps1
Kyle Hoehn 9c527c29c4 Added USB Intruder payload (#220)
* USB Intruder

Initial upload of the USB Intruder v1.1

Tested on Windows 7 and Windows 10.

* USB Intruder

Updated Readme.

Forgot to add a line.

* Update...again...

Added link for forum comments/discussion.

* USB Intruder

USB Intruder v1.1 Commit.
2017-05-18 14:52:54 +10:00

3 lines
235 B
PowerShell

$BB = Get-WMIObject Win32_Volume | ? { $_.Label -eq 'BASHBUNNY' } | Select-Object -First 1 -ExpandProperty Driveletter
$driveEject = New-Object -comObject Shell.Application
$driveEject.Namespace(17).ParseName("$BB").InvokeVerb("Eject")