"As we have said repeatedly, there can be absolutely no question of any official involvement by any Russian agency, including the FSB, in any illegal actions in cyberspace," Kremlin spokesman Dmitry Peskov told journalists.
The US Justice Department on Wednesday charged two Russian intelligence operatives and a pair of hackers over one of the largest cyber-attacks in history, which began in 2014 with the apparent twin goals of espionage and financial gain.
It was the first time Washington had filed criminal charges against Russian officials for cyber-related offences, and came amid a separate high-stakes investigation into alleged Russian cyber-meddling in the US election.
The Russian agents accused of directing the attack that targeted both US and Russian officials were identified as Dmitry Dokuchaev and Igor Sushchin, both members of the FSB, the successor agency to Russia's KGB.
The US said Dokuchaev was an officer in the FSB's Center for Information Security, known as Center 18, which is tasked with investigating hacking and is the FBI's point of contact in Moscow for cyber-crimes.
Dokuchaev, 33, was reported last year to have been arrested in Moscow by Russian authorities on treason charges linked to the US. He is accused of directing the Yahoo hacking along with his superior, the 43-year-old Sushchin.
The two officers "protected, directed, facilitated and paid criminal hackers to collect information through computer intrusions in the United States and elsewhere," acting US assistant attorney general Mary McCord told reporters.
They are accused of hiring two hackers, Alexsey Belan and Karim Baratov, to carry out the attacks, which continued until late 2016.
Baratov, described as a 22-year-old Canadian-Kazakh citizen, was reportedly arrested this week on a US warrant in Canada.
Kazakhstan on Thursday said that he had officially given up his citizenship in 2011.