There are two possibilities:
North Korea is responsible for the SONY attack. If so, they deserve the difficulty that they are having now.
North Korea is not responsible for the SONY attack. Then they do not deserve the difficulty they are having now at least for the SONY incident.
A third party could be responsible for the SONY attack and be responsible for the attack against North Korea.
There are lots of possibilities.
Certainty only exists when only one party has the capabilities necessary to perform an act.
I suspect the US is responsible for North Korea's current difficulties. It's much more pleasurable for President Obama to deal with that than it is for him to deal with two NYPD policemen murdered over the weekend.
The timing was just a few minutes after Barack Obama's claiming that by any measure 2014 was a good year.
Police killings were way up over the whole country in 2014.