Language Keyboard

My keyboard is set to Spanish.
I can’t send any character correctly

In the original USB Duck I found that you can change the keyboard encoding
https://github.com/hak5darren/USB-Rubber-Ducky/tree/master/Encoder/resources

Is there any way to do it with Flipper?

2 Likes

Not at the moment, but this is possible to add in the future

5 Likes

Having the same issue but for UK keyboard. It’s converting \ to #. I presume there’s currently no fix for this?

Try using “ALTSTRING”. It works even if non-US keyboard layout is selected.

ALTSTRING just gives me numbers for some reason :confused:

This is what I get when running the Windows Demo with a UK keyboard layout.

Hello World!
Hello World!
Hello World!
784104105115321081051101013211997115321121141051101163211711510511010332651081164378117109112971003210511011211711632109101116104111100463273116321191111141071153210111810111032105102321101111104585833210710112198111971141003210897121111117116321051153211510110810199116101100
============================================================

              _.-------.._                    -,
          .-@```@--..,,_/ /`-,               -,  # 
       .:@          /:/  /'#  #     ,_...,  `. ~  ~
      /       ,----/:/  /`# _#¬`_-@`     _;
     '      / /`@@@'# # #.¬`_-'      ,-@'/ 
    ~      ~ ~  0    ~ ~ .-'      ,/`  /
   ~    ,..# #     ,.-@`       ,/`    /
  ;    :    `/`@@#`           ,/--==,/-----,
  ~    `-...~        -.___-Z:_______J...---;
  :         `                           _-'
 _L_  _     ___  ___  ___  ___  ____--@`
~ __~~ ~   ~_ _~~ _ #~ _ #~ __~~ _ # 
~ _~ ~ ~__  ~ ~ ~  _/~  _/~ _~ ~   / 
~_~  ~____~~___~~_~  ~_~  ~___~~_~_# 

Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script format
More information about script synax can be found here:
https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript

It’s fixed in the latest dev build so update to that if you can’t wait for the next release.

4 Likes

I had the same issue. I made a quick and dirty tool to translate the payloads, or single strings. More keyboard layouts can be added. There are some issues, but it seems to work for simple things.

APN201 Payload translator

1 Like

Isn’t it easier to change the language of the computer? I ask in my ignorance.

2 Likes

That would defeat the purpose in most cases. BadUSB is often used for example in pentesting, where you use it to run a script quickly, stealthy and automatically. Going in control panel adding an US keyboard before executing the payload (and then removing it afterwards) does not really work - unless you are just using the payloads on your own pc.

You are right, I am checking it in my own scripts with my rubber ducky. I hadn’t had any problems since I run them on my own computer but if I change the language it’s problematic. Of course, everything is even more difficult if you run Github scripts, especially in my country, since everything is in English, so you have to change many instructions.

I tried the BadUSB demo_windows on a win7 system and it was foiled by use of dvorak as default keyboard layout.

Though people marked it as Solved, two months later with release 0.67.2 it still happens. Was it applied from dev (if really fixed) to release at some time?

I’ve managed to use ALTSTRING successfully in scripts in 0.67.2 to work around different keyboard layouts.

Then something doesn’t add up…

As I was saying, release 0.67.2 and same result for the demo file as cansi22:

Hello World!
Hello World!
Hello World!
•̐̐򿛨
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡

              ?.'''''''..?                    ',
          .'¨ººº¨''..,,?- -º',               ',  ç 
       .Ѩ         -Ñ-  -´ç  ç     ,?...,  º. Ç  Ç
      -       ,''''-Ñ-  -ºç ?窺?'¨º     ?ñ
     ´     - -º¨¨¨´ç ç ç.ªº?'´     ,'¨´- 
    Ç      Ç Ç  0    Ç Ç .'´     ,-º  -
   Ç    ,..ç ç     ,.'¨º       ,-º    -
  ñ    Ñ    º-º¨¨çº           ,-''¡¡,-''''',
  Ç    º'...Ç        '.???'ZÑ???????J...'''ñ
  Ñ         º                           ?'
 ?L?  ?     ???  ???  ???  ???  ????''¨º
Ç ??ÇÇ Ç   Ç? ?ÇÇ ? çÇ ? çÇ ??ÇÇ ? ç 
Ç ?Ç Ç Ç??  Ç Ç Ç  ?-Ç  ?-Ç ?Ç Ç   - 
Ç?Ç  Ç????ÇÇ???ÇÇ?Ç  Ç?Ç  Ç???ÇÇ?Ç?ç 

Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script format
More information about script synax can be found hereÑ
httpsÑ--github.com-hak5darren-USB'Rubber'Ducky-wiki-Duckyscript
´

The:
ALTSTRING This line was print using Alt+Numpad input method. It works even if non-US keyboard layout is selected
does not even appear.

I used my own script with ALTSTRING in it previously but have just run the demo_windows one now:

Hello World!
Hello World!
Hello World!
•This line was print using Alt+Numpad input method. It works even if non-US keyboard layout is selected
============================================================

              _.-------.._                    -,
          .-@```@--..,,_/ /`-,               -,  # 
       .:@          /:/  /'#  #     ,_...,  `. ~  ~
      /       ,----/:/  /`# _#¬`_-@`     _;
     '      / /`@@@'# # #.¬`_-'      ,-@'/ 
    ~      ~ ~  0    ~ ~ .-'      ,/`  /
   ~    ,..# #     ,.-@`       ,/`    /
  ;    :    `/`@@#`           ,/--==,/-----,
  ~    `-...~        -.___-Z:_______J...---;
  :         `                           _-'
 _L_  _     ___  ___  ___  ___  ____--@`
~ __~~ ~   ~_ _~~ _ #~ _ #~ __~~ _ # 
~ _~ ~ ~__  ~ ~ ~  _/~  _/~ _~ ~   / 
~_~  ~____~~___~~_~  ~_~  ~___~~_~_# 

Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script format
More information about script synax can be found here:
https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript

ALTCHAR is working for you as you got the bullet point outputted. Are you sure you don’t have some funny file format applied to the script you are using? Mine has UTF-8 encoding with a line feed without a carriage return at the end of each line.

I have not tried it with a Spanish keyboard just an English-UK one.

It is the script that comes with the firmware. If I download it with qFlipper and open it with Notepad++, it says UTF-8 and Unix (LF). I forgot to mention that now I’m running it on Windows 11.

So the thing is that ALTSTRING is not working for my scenario, plus lets say the ‘expected behaviour’ of STRING depending on the keyboard layout.

Also notice an unexpected ´ character as last line after the URL is typed.

If I change my system’s keyboard layout to UK, I get this:

Hello World!
Hello World!
Hello World!
•̐򿛨
============================================================

              _.-------.._                    -,
          .-"```"--..,,_/ /`-,               -,  \ 
       .:"         /:/  /'\  \     ,_...,  `. |  |
      /       ,----/:/  /`\ _\~`_-"`     _;
     '     / /`"""'\ \ \.~`_-'     ,-"'/ 
    |      | |  0    | | .-'     ,/` /
   |    ,..\ \     ,.-"`       ,/`   /
  ;    :    `/`""\`          ,/--==,/-----,
  |    `-...|        -.___-Z:_______J...---;
  :         `                          _-
 _L_  _     ___  ___  ___  ___  ____--"`
| __|| |   |_ _|| _ \| _ \| __|| _ \ 
| _| | |__  | | |  _/|  _/| _| |   / 
|_|  |____||___||_|  |_|  |___||_|_\ 

Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script format
More information about script synax can be found here:
https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript
'

No ALTSTRING plus the weird final ´ line (as with ES layout), though all the rest is fine in this case.

If I switch it to US, everything is OK but the ALTSTRING:

Hello World!
Hello World!
Hello World!
•̐򿛨
============================================================

              _.-------.._                    -,
          .-"```"--..,,_/ /`-,               -,  \ 
       .:"          /:/  /'\  \     ,_...,  `. |  |
      /       ,----/:/  /`\ _\~`_-"`     _;
     '      / /`"""'\ \ \.~`_-'      ,-"'/ 
    |      | |  0    | | .-'      ,/`  /
   |    ,..\ \     ,.-"`       ,/`    /
  ;    :    `/`""\`           ,/--==,/-----,
  |    `-...|        -.___-Z:_______J...---;
  :         `                           _-'
 _L_  _     ___  ___  ___  ___  ____--"`
| __|| |   |_ _|| _ \| _ \| __|| _ \ 
| _| | |__  | | |  _/|  _/| _| |   / 
|_|  |____||___||_|  |_|  |___||_|_\ 

Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script format
More information about script synax can be found here:
https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript

Very strange, when ALTSTRING had an issue previously it just output the number representation so your use case is definitely different. I wouldn’t expect Windows 11 to work any differently but it could be a slight timing issue if it doesn’t recognise the alt key being depressed before receiving the numeric codes. I don’t think there is a way to disable the use of Alt codes in Windows otherwise I would suggest checking those settings. Are you able to use Alt codes in a text editor?

1 Like

Funny: Windows 11 Notepad, first Alt code works, next ones behave strange (and stop working).
Then that must be the reason.
For example this is the output from issuing ALT+65 several times:

Aᦥ򠒵

It seems that the problem with Windows 11 Notepad and Alt codes exists since years ago, and it is unlikely Microsoft is going to fix it.

Thank you tensor for your support.

Now I wonder about that ’ character after the last ENTER… :thinking:

1 Like

I had the same problem, I use a script to convert US keys to in my case German keyboard layout.
This should be easy to adapt to other languages, maybe this helps you out:

https://ghcif.de/flipperzero/badusb/ducky_lang.py

1 Like