How to change the keyboard language on a BadUSB
// Disclaimer // Hacking without permission is illegal. This file is strictly
educational for learning about cyber-security in the areas of ethical
hacking and penetration testing so that we can protect ourselves against
the real hackers.
Downloading Arduino
Go to https://www.arduino.cc/en/software and download the program.
Then install it.
Run the program.
When Arduino is running go in under the following:
Type Key in the “Filter your search…”
And install Keyboard by Arduino.
BadUSB preparation
Insert your BadUSB in any port on your computer and let windows accept it.
In Arduino select the following:
LilyPad Arduino USB like this (Mine already shows it, as I already have installed it)
Select other board and port…
Now write Lily in the search bar and pick
“LilyPad Arduino USB”
Press ok and your Arduino should (if it does not, that is ok) now look like this:
Downloading the file
Now download this file:
https://ufile.io/dkqu2lmi
Password is: zsecurity.org
No, it is not a virus, or else Zsecurity will cut me off from helping people.
Now copy that file to a different folder on your computer and run it.
Accept everything Arduino Ide tells you.
Your screen should look like this:
Keyboard language change
Now comes the hard part:
Changing the language of your BadUsb.
Scroll down to where it reads:
#include <Keyboard.h>
Hover your cursor over the keyboard.h and a link will show up. (mine may be different from yours).
Mine reads:
D:\OneDrive\Dokumenter\Arduino\libraries\Keyboard\src\Keyboard.h
But yours may be different, now remove Keyboard.k, so it looks like this
D:\OneDrive\Dokumenter\Arduino\libraries\Keyboard\src\
And open it up in a window folder.
It will look like this:
Right click on Keyboard and pick edit/rediger
And this will open:
Now scroll down to where it reads:
void begin(const uint8_t *layout = KeyboardLayout_en_US);
Change the KeyboardLayout_en_US with what keyboard you want to use.
There is only a few here to pick from:
KeyboardLayout_de_DE
KeyboardLayout_en_US
KeyboardLayout_es_ES
KeyboardLayout_fr_FR
KeyboardLayout_it_IT
KeyboardLayout_pt_PT
KeyboardLayout_sv_SE
KeyboardLayout_da_DK
KeyboardLayout_hu_HU
In my case I will pick KeyboardLayout_da_DK as I am from Denmark and the line will look like this:
Now save the file and you are done.
Conclusion
BUT, it is not possible to use special characters like æ ø å and the likes, but as it is only
used on a computer with normal programming language, it won’t matter, unless you are
making folders with special characters.
Now in Arduino IDE, while having your BadUSB in, press the upload button and after that, your BadUSB is ready to go.
Have fun and stay Legal.
SK2073
Helper At Zsecurity.org
Tag:bad usb, cyber security, hacking, hardware, keyboard, language, Pentesting, security, usb