Actually they do get caught out from time to time. Germany got caught out doing some cyber-espionnage a while back and it's an open secret in France that we've got a big economic intelligence programme going on.
It's still mainly defensive or neutral work, however, because the strategic vision that our governments (and if it comes to that most of the IT guys as well) have is a defensive one. There are some technical problems (an offensive strategy depends on numbers, and it'd have to be kept discreet for
PR/legality reasons: contradictory imperatives in other words), but they're not insurmountable (you could get away with running an offensive inforwars programme by saying that it would only be used in times of war, no one would like it but you wouldn't be breaking and rules really), the real problem is this vision that we have of our webspace as a sort of citadel that must be defended against outsiders.
The Chinese vision of it is far more aggressive, not just in terms of DOS attacks but also in terms of misinformation, which seems to be (depite all the hype that the honkers get) their main focus.