5

As far as you may know, about four month ago, a new malware-like program found that was infected USB device's firmwares. (Take a look here)

I want to know, how it is possible to read and modify firmware of these devices? How does the firmware works? Is the any application or devices to work with firmwares?

I think when the chip powered, the firmware automatically send its type, company and such this information to its server(computer) on data lines(D+ and D-). And the computer using that information use the device. Is it true?

Note that this question was outdated and doesn't help me.

1

1 Answer 1

3

You can modify the firmware of these flash drives quite easily with the many thousands of leaked tools.

OEMs like Patriot, PNY, and other companies don't make the flash drives they sell. They just order a massive amount of vanilla flash drives and plastic cases and put em together.

Then they plug them into huge usb hubs connected to a windows xp machine, and with those leaked (to us) tools, write their brand and whatever marketing name they pick into the flash drive's eeprom.

Now with the correctly matched tool, to the exact model of the microcontroller on the flash drive, and if you want to mess with the NAND you'll also need some other file that has to do with the physical layout of the NAND, you can change the firmware of the flash drive.

  1. Things like it's displayed name upon plugging into a computer.
  2. USB VID and PID
  3. serial number
  4. Maximum reported, and actual power draw
  5. LED behavior (always on, blink speed, blink only on data read/write, always off)
  6. Capacity reported
  7. Executing NAND badblock scans
  8. Adding virtual cdrom based on an iso image
  9. Adding firmware encrypted password protection
  10. Adding second, third, and fourth LUNs ("physical" disks reported to OS)
  11. Permanent read-only partitions
  12. Type of device reported to the OS (SCSI, SATA, flash drive, CDROM, others...)
  13. Percentages of capacity to reserve for wear-leveling
  14. Read/Write speed cap/uncap (uncapping can massively speed up some drives, but sometimes is unstable... think overclocking your flash drive...)
  15. Removing that pesky "read-only flag" that makes OEMs so much money when people think they must replace their flash drive...
  16. Many many other things that understanding chinese would be of great use to figure out...

It would be technically illegal for me to provide those tools (I think?) so I'll leave it to the reader to find them. They're not hard to find.

2
  • Does an attacker need physical access to modify these types of drives?
    – Rideboards
    Oct 21, 2021 at 4:31
  • Not necessarily, however the drive would need to be attached to a system that the attacker controlled long enough to modify the firmware.
    – Hydranix
    Oct 27, 2021 at 1:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.