Their basically practicing the MAD doctrine. They know they don't have the military capacity to really resist the USA, but when they have nukes, attacking them without causing damage to the US two biggest allies (South Korea and Japan) in the region is going to be impossible.
North Korea isn't just going to attack anyone. Un might not be the smartest one, many of his advisors have an uncanny sense of pragmatism.







