ElijahLord
-
Posts
3 -
Joined
-
Last visited
Posts posted by ElijahLord
-
-
i should probably mention that my ultimate goal is to execute an exe in the switch1 directory on the bash bunny without prior knowledge of the drive letter
-
I'm trying to run the script below to get the drive letter of the Bash Bunny then change directories to it but i keep having issues with the apostrophes and dollar signs
# test LED B ATTACKMODE HID STORAGE LED Y 300 RUN WIN powershell.exe DELAY 100 QUACK STRING "$USBDrive = Get-WmiObject Win32_Volume -Filter "DriveType='2'"|select -expand driveletter" QUACK ENTER DELAY 50 QUACK STRING "cd $USBDrive/payloads/switch1" QUACK ENTER
i added quotation marks before and after the commands i wanted to execute because usually that runs anything through QUACK containing an apostrophe without error but then when i plug the usb in these are the commands that are output
Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. PS C:\Users\Elijah> = Get-WmiObject Win32_Volume -Filter DriveType=2|select -expand driveletter = : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:2 + = Get-WmiObject Win32_Volume -Filter DriveType=2|select -expand driv ... + ~ + CategoryInfo : ObjectNotFound: (=:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Elijah> cd /payloads/switch1 cd : Cannot find path 'C:\payloads\switch1' because it does not exist. At line:1 char:1 + cd /payloads/switch1 + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\payloads\switch1:String) [Set-Location], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand PS C:\Users\Elijah>
Im not too advanced in Powershell, Bash, or even Ducky so there's probably some simple fix
bash bunny symbols
in Questions
Posted
oh i actually didnt know that. thanks i will