There isn't a clear dividing line. What you have are criminal organisations who may get protection and shelter from governments in exchange for making attacks which are incidentally beneficial to that government.
hackers dont traditionally think that way..