hak5 / bashbunny-payloads

The Official Bash Bunny Payload Repository
https://bashbunny.com
2.6k stars 1.46k forks source link

Backslash is showing as hash in using DuckyScript #31

Closed TechKno closed 7 years ago

TechKno commented 7 years ago

I have a file called ducky.txt which contain's STRING \

When I call it using:

ATTACKMODE HID STORAGE

LANGUAGE='uk'

LED R QUACK switch1/ducky.txt

This would then output a "#" I've also tried setting the language to US but the outcome is the same.

WatskeBart commented 7 years ago

Take a look at this payload and see how the slash needs to be escaped because of bash. So you need to insert a double slash \\

TechKno commented 7 years ago

I've tried doing a double backslash \ I still get a double hash ##

The only thing I can see different is because I haven't included source bunny_helpers.sh Could this be the cause?

WatskeBart commented 7 years ago

Try to add this after the ATTACKMODE line:

QUACK SET_LANGUAGE en

See this thread for more info: https://forums.hak5.org/index.php?/topic/40267-set_language-option/

robemmerson commented 7 years ago

It sounds like you're using a non-US keyboard layout, I am in the UK and had the same issue. I needed to take the language files from 'payloads/library/DuckyInstall/DuckToolkit-1.0.1.tar.gz' (in folder 'ducktoolkit/languages') and copy them into '/root/tools/languages'. Don't forget to 'sync' after copying if you're doing this is arming mode over the serial connection with the USB mounted.

I then used 'QUACK SET_LANGUAGE gb' as a line in my script before executing any other QUACK commands and it worked successfully.

PS: If you notice this still didn't work, then make sure you check the files sizes and that you ran the 'sync' command after copying the data. I didn't the first time and they were all 0kb which is why it wasn't working!

sebkinne commented 7 years ago

This looks to be locale related and can therefore be closed. Please set your keyboard language with "DUCKY_LANG "