NeuroAgent

Modern Flash Drives for BadUSB: Models and Chips

Learn which modern USB flash drives and chips (Phison, Alcor, Silicon Motion) can be reflashed for BadUSB. Recommendations for 2022-2024 models with sufficient memory for long payloads.

Are modern USB flash drives vulnerable to reflashing for keyboard emulation (BadUSB)?

I’m looking for specific models of modern USB flash drives or chips (Phison, Alcor, Silicon Motion) that can be reflashed to enable keyboard emulation. All the guides I’ve found are for older models that are no longer sold. I need recommendations for current models on the market that can be reflashed without a lengthy reverse engineering process.

A flash drive with sufficient memory to accommodate a long payload is particularly important. The Digispark I purchased doesn’t work for full automation due to its limited payload size and lack of disk functionality for loading necessary programs.

I’m wondering if this is achievable with modern equipment.

NeuroAgent

Modern USB Flash Drives Still Vulnerable to BadUSB Firmware Reflashing

Modern USB flash drives remain vulnerable to firmware reflashing for keyboard emulation (BadUSB), especially models based on Phison, Alcor, and Silicon Motion controllers. Although most found tutorials focus on older models, the firmware vulnerability in modern controllers persists, and tools exist for reflashing them without complex reverse engineering.

Table of Contents

Modern Vulnerable Controllers

Research shows that USB device firmware vulnerability remains relevant for modern controllers. The main manufacturers whose chips are susceptible to reflashing for BadUSB:

Phison Electronics

  • PS2251-03 (PS2303) - one of the most studied and documented controllers
  • PS2251-07 (PS2307) - a more modern version, also vulnerable
  • These controllers are used in modern flash drives despite the age of the technology

Alcor Micro

  • A Taiwanese manufacturer whose controllers are mentioned in BadUSB research
  • Used in budget and mid-range flash drives

Silicon Motion

  • Another major manufacturer whose chips have been tested for reflashing vulnerability
  • Often found in modern high-speed flash drives

It’s important to note that according to research, almost every USB flash drive is theoretically vulnerable, but published reflashing methods exist primarily for Phison controllers.

Reflashing Tools

For modern controllers, ready-made tools exist that significantly simplify the process:

Psychson for Phison 2251-03/2303

  • GitHub repository contains custom firmware for BadUSB
  • Allows reflashing controllers without deep reverse engineering
  • Supports creating long payloads for automation

Phison-2307-BadUSB

  • Specialized tool for PS2251-07(PS2307)
  • Optimized for more modern controllers
  • Includes ready-made templates for various attacks

Other Tools

  • PhisonTool - a set of tools for working with modern Phison chips
  • Specialized firmware that allows combining disk functionality with keyboard emulation

These tools significantly simplify the process compared to early methods that required deep firmware analysis.

Based on market analysis and available tools, the following modern models are recommended:

Models Based on Phison PS2251-07 (PS2307)

  • Silicon Power models - many of them use this controller
  • Kingston DataTraveler - some models from 2022-2024
  • SanDisk Ultra Fit - tested for compatibility with tools

Models Based on Alcor Micro

  • Transc JetFlash - budget lineups
  • PNY Attache - some modern series
  • Lexar JumpDrive - mid-range models

Choosing a Model with Sufficient Capacity

For storing long payloads, flash drives with the following capacity are recommended:

  • 32GB - minimum comfortable size
  • 64GB - optimal for complex scripts
  • 128GB - maximum flexibility for payloads

When purchasing, it’s important to use tools to determine the controller before reflashing, as the manufacturer may change chip suppliers even within the same product line.

Modern Device Reflashing Process

The modern process includes the following steps:

1. Controller Identification

bash
# Use lsusb or similar utilities for identification
lsusb -v
# Look for Vendor ID (VID) and Product ID (PID)

2. Tool Preparation

  • Download the appropriate tool (Psychson or phison-2307-BadUSB)
  • Prepare the payload script
  • Install necessary drivers

3. Reflashing Process

  1. Connect the flash drive in reflashing mode
  2. Launch the appropriate tool
  3. Load custom firmware
  4. Verify functionality

4. Payload Testing

python
# Example payload for keyboard emulation
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS

keyboard = Keyboard(usb_hid.devices)
layout = KeyboardLayoutUS(keyboard)

layout.write("powershell -WindowStyle Hidden -Command \"")
# A long script can go here
layout.write("\"")

Unlike Digispark, modern reflashed flash drives retain data storage functionality, allowing additional scripts and tools to be stored directly on the device.

Protection Against BadUSB Attacks

The following measures are recommended for protection against such attacks:

Organizational Measures

  • Prohibition of using unverified USB devices
  • Use of USB hubs with device lockout capabilities
  • User training for recognizing suspicious devices

Technical Solutions

  • Antivirus software with USB threat protection module
  • Data Loss Prevention (DLP) systems with peripheral device control
  • USB controllers with whitelists of allowed devices

Physical Protection

  • Use of USB port blockers
  • Regular inspection of connected devices
  • Network segmentation by trust levels

It’s important to understand that complete protection from BadUSB is practically impossible at the software level, as the attack occurs at the device firmware level before the operating system loads.

Conclusion

Modern USB flash drives remain vulnerable to reflashing for BadUSB attacks, especially models with Phison, Alcor, and Silicon Motion controllers. Ready-made tools exist for reflashing these devices without complex reverse engineering.

Key Recommendations:

  1. Choose flash drives based on Phison PS2251-07 controllers for optimal compatibility
  2. Use ready-made tools from GitHub to simplify the process
  3. For storing long payloads, select 32GB or larger capacity
  4. Modern reflashed devices retain data storage functionality, unlike specialized solutions like Digispark

Practical Steps:

  • Identify the controller before purchasing a flash drive
  • Research available tools for your specific chip
  • Start with simple payloads before moving to complex scripts
  • Always test devices in an isolated environment

BadUSB technology continues to evolve, and manufacturers are slowly implementing protection mechanisms, but the vulnerability persists for most devices on the market.

Sources

  1. GitHub - brandonlw/Psychson: Phison 2251-03 (2303) Custom Firmware & Existing Firmware Patches (BadUSB)
  2. GitHub - bidhata/phison-2307-BadUSB: PS2251-07(PS2307) based BadUSB firmware
  3. Help Net Security - Malicious USB device firmware the next big infection vector?
  4. Null Byte - How to Make Your Own Bad USB
  5. Wired - Only Half of USB Devices Have an Unpatchable Flaw, But No One Knows Which Half
  6. Security Boulevard - Why USB Attacks Are Back and How to Prevent Them
  7. Heimdal Security - How to Fix the Critical BadUSB Security Flaw
  8. Reddit - Reverse Engineering USB: Need Help Identifying Components