A code connected to Russian cyber-hackers has been found on an American electricity company's computer, in further evidence of "predatory" steps taken by Moscow against the US, officials said on Saturday.

The discovery came as Russian diplomats and their families prepared to return to Moscow ahead of a New Year's Day expulsion deadline set by President Barack Obama.

The malicious software, or malware, found in the Burlington Electric Department system in Vermont was linked to the Russian hacking operation dubbed Grizzly Steppe by US officials and raised fears about the vulnerability of America's electricity grid to cyber attacks.

"This attack shows how rampant Russian hacking is. It's systemic, relentless, predatory," said Peter Welch, a Vermont Democratic congressman. "They will hack everywhere, even Vermont, in pursuit of opportunities to disrupt our country."