The military budget of North Korea is estimated to be around $10 billion USD. It has a million active troops, 6,600 tanks, 700 MLRS, 460 fighters, and so on.
The country is perilously poor. Many people starve. But the means are there for an operation like this, especially if sponsoring foreign groups, if the motivations allow.
And to counter the growing narrative that the NK thing came out of nowhere as a convenient excuse -- the country was very offended by this movie six months+ ago, long before the hack, to the point of threatening military retaliation if it was released. Engaging in or hiring hacking groups to put the pain to Sony seems entirely within the realm of the possible, though threatening actual terrorism is a bridge too far, and overplayed their hands if they were involved with that.