The foreign hackers had stolen data from Russian military firms and hacked cameras to spy on troops.