Search the Community
Showing results for tags 'duckyscript'.
Found 3 results
So ive been trying to run ducky script in a bash bunny payload but as soon as it hits the ducky script it stops. LED SETUP GET SWITCH_POSITION ATTACKMODE HID LED ATTACK RUN WIN notepad.exe QUACK DELAY 300 QUACK STRING (\___/) QUACK ENTER QUACK DELAY 300 QUACK STRING (='.'=) QUACK ENTER QUACK DELAY 300 QUACK STRING (")_(") QUACK DELAY 300 I cant figure out the problem
Hello all, As part of a script I am writing I am trying to change directories using the find feature of the drive letter and the $SWITCH_POSITION variable. I tried using Set-Location in Powershell but could not get it to work with the variables needed to find the drive letter and the switch position. I came up with the below and it works in Powershell but not in Ducky Script on the Bash Bunny. I am sure it is because I am missing escapes for special characters (possible) but after hours of trying I could not get it to work. I am at the experts mercy here in the Hak5 Forums :) The payload.txt has: Q STRING $driveLetter = (gwmi win32_volume -f 'label=''BashBunny''').Name Q ENTER Q STRING $absPath = $driveLetter+'payloads\'+$SWITCH_POSITION+'\' Q ENTER Q STRING cd $absPath Q ENTER If I run in PowerShell it works: PS C:\Users\NightStalker> $driveLetter = (gwmi win32_volume -f 'label=''BashBunny''').Name PS C:\Users\NightStalker> $absPath = $driveLetter+'payloads\'+$SWITCH_POSITION+'\' PS C:\Users\NightStalker> cd $absPath PS G:\payloads\switch1> I am open to other suggestions with the same effect. I appreciate the help in advance. On a side note can you pass variables from the payload.txt to other Powershell scripts the payload calls? If so that would solve my issue as well. :) Thanks, NightStalker