Washington(CNN) The US Treasury Department has imposed fresh sanctions on five Russian entities and three individuals, saying that they worked with Moscow's military and intelligence services in an effort to conduct cyberattacks against the US.

The latest step by the Trump administration comes in response to "Russia's malign and destabilizing cyber activities" against the US and its allies, including the NotPetya cyberattack and cyber intrusions of the US energy grid, Treasury said, and includes a firm that's controlled by Russia's Federal Security Service or FSB.

"The United States is engaged in an ongoing effort to counter malicious actors working at the behest of the Russian Federation and its military and intelligence units to increase Russia's offensive cyber capabilities," Treasury Secretary Steven Mnuchin said in a statement Monday.

Mixed messages

The sanctions come as President Donald Trump sends radically different signals about Russia's place in the world order, underscoring the administration's contradictory messages on Russia.

Just days before Treasury announced the new sanctions, Trump insisted that Russia be returned to the international group of advanced economic nations that met in Canada this weekend.

Even as officials in the US and European countries cite Russia for interference in their elections and its annexation of Crimea, insisting it remain expelled from the G7 until it returns the territory to Ukraine, Trump has repeatedly stressed the need for stronger relations with Moscow.

Monday's action also targets the Russian government's underwater capabilities. Treasury said that Russia has been active in tracking undersea communication cables, which carry the bulk of the world's telecommunications data.

Undersea cables

"The entities designated today have directly contributed to improving Russia's cyber and underwater capabilities through their work with the FSB and therefore jeopardize the safety and security of the United States and our allies," said Treasury Secretary Steven T. Mnuchin.

The firms designated in Monday's announcement have directly contributed to improving Russia's cyber capabilities through their work with the FSB, which has compromised the security of the US and its allies, Mnuchin said. They include Digital Security, ERPScan and Embedi.

One of the designated entities in controlled by and has provided material and technological support to the FSB, while two others have provided the FSB with material and technological support. Treasury's Office of Foreign Assets Control, or OFAC, is also designating several entities and individuals for being owned or controlled by, or acting for or on behalf of, the three entities that have enabled the FSB.

"The United States is committed to aggressively targeting any entity or individual working at the direction of the FSB whose work threatens the United States and will continue to utilize our sanctions authorities... to counter the constantly evolving threats emanating from Russia," Mnuchin said.