0

UFDs with a Phison 2251 controller are famous for being potential BadUSB devices. It's basically a (8051) microprocessor running application-specific firmware, which is stored on the big flash memory chip next to the controller.

enter image description here

Are there also any USB flash controllers in the wild which are ASICs without (externally stored) firmware? Just program data in on-chip mask ROM.

  • 3
    How would it connect to a USB bus, then? – schroeder Sep 06 '21 at 15:23
  • Like any other USB Mass Storage Device? –  Sep 06 '21 at 15:27
  • 1
    Can you provide an example? I'm not familiar with any USB device that does not have firmware in order to connect to the bus. – schroeder Sep 06 '21 at 15:53
  • The program data could be stored in on-chip mask ROM. Like some HIDs. –  Sep 06 '21 at 15:57
  • On-chip mask ROM does not require programmable bus access, though. USB is an interface. Do you have an example of a USB HID that does not have firmware? – schroeder Sep 06 '21 at 15:59
  • For example: USB mouse. –  Sep 06 '21 at 16:00
  • 1
    USB mice do not have firmware? From my experience, they do (they need to) – schroeder Sep 06 '21 at 16:02
  • Yes, they do. But their firmware (some program code) could be stored in on-chip mask ROM, which cannot be rewritten. –  Sep 06 '21 at 16:21
  • So, is your whole thing: can there be a USB device without rewritable firmware? Because that's an answered question. – schroeder Sep 06 '21 at 17:06
  • Could you name such a USB Mass Storage Device? Or USB flash controller? They are pretty hard to find. –  Sep 06 '21 at 19:13
  • 1
    Almost nothing uses mask ROMs for firmware these days. It's just too expensive to spin custom silicon, and the cost of OTP/MTP non-volatile fuse memory is almost identical to the cost of low write endurance EEPROM flash once you get above a few hundred bytes. It's way more convenient to either have the USB interface controller built into a SoC if your device needs a microcontroller or microprocessor, or have the USB interface be handled by a dedicated interface chip. All of these interfaces are at least in some way reconfigurable, and a large proportion of them contain re-writable firmware. – Polynomial Sep 08 '21 at 01:03

1 Answers1

3

USB flash controllers always have firmware, and it's fundamentally required for their operation. What really matters is whether or not the firmware can be modified through the USB bus. Unfortunately, the answer is often yes. Sometimes this is done using vendor-specific commands. Other times it is as simple as writing to a special address far past the end of the mass storage device's flash memory (assuming it's a flash drive). The simplest way to prevent this is to use a device with firmware that cannot be re-written due to the firmware write-enable pin being tied low (assuming low is disabled). This is not something that's typically advertised by the end products that use these controllers.

forest
  • 66,706
  • 20
  • 212
  • 270