North Korea is not even close to being as poor as the reputation bestowed upon it by the US establishment.
If it were, space rockets and nukes would simply have been out of the question (as they were in the 90s). You don't tend to find the best rocket scientists living in mud huts.
It's still hardly a rich country but industrially they're surprisingly profligate and while their famous famine weighs heavily upon them (esp. in the form of stunted heights) it was 25 years ago. About the only thing there is still a massive, visceral shortage of is oil (because embargoes).