Russia has countered attempts to hack into its infrastructure, says Kremlin spokesman.