This is far more theoretical -- an improbable -- than many are painting it to be.
There are a half dozen popular USB controllers -- dozens more that are less popular. Each have their own models. SMI, Chipsbank, Alcor, Buildwin, and so on.
They are paired with a HUGE variety of memory in a variety of configurations. Hynix, Samsung, Toshiba, Micron, and so on.
You need to have the proper controller programming tool for the chip, and the proper database of memory chips.
There is not some universal programming tool that would allow your computer to infect any USB inserted into it.