The actual "smartness" of AI doesn't matter. If the AI nanobots have a deep underground/deep sea safe space they could spread worldwide undetected(using currents or micro tunnels), then using numerical superiority attack isolated targets, spreading into roads, cities, rivers,etc. They would be unstoppable with most conventional weapons and blowing EMPs will not work underground or below the seafloor(seawater blocks radiation very well). A few SCI-FI stories the concept of `grey goo` is explored, but the actual difficulty is never in the software(trivial) - its the hardware: once a genocidal maniac/insane scientists creates a successful self-replicating nanobot the world is doomed.