That just doesn't feel very realistic to me. Weapons like that don't just appear out of nowhere. I imagine countermeasures could be developed at roughly the same pace as nanobot threats. And if not, we'll deal with it the same way we dealt with nukes. Hopefully it would go a little better this time, since we have a little apocalyptic experience to learn from.
And why is this limited to nanobots? Wouldn't it be easier to develop a million variations of existing biological viruses, rather than creating a million "species" of nanobots from scratch?