The Department of Defense and US intelligence community reportedly have a secret plan for a cyberattack on Russia if Moscow directly interferes with the midterms next week.

US military hackers have been given permission to access Russian networks for the attack, The Center for Public Integrity reported on Friday.

For the plan to go ahead, Russia would have to assert "malign influence" on the elections, such as tampering with voter registration and vote recording.

Russia is accused of spreading far-right propaganda on Facebook in an attempt to influence the midterms.

The US has prepared to launch a cyberattack on Russia if the country directly interferes with the midterm elections next week, according to a report from the Center for Public Integrity.

The Department of Defense and US intelligence community secretly planned an offensive cyberattack on Russia if it is found to electronically interfere with the elections on November 6, the report said.

It cites unnamed current and former senior US officials who know about the plan.

Details of what the plan would involve, or how it would work, are scant. But the report claimed that US military hackers have been given the necessary permission to access Russian networks to carry out an attack.

To trigger the attack, Russia would have to directly interfere with the midterm elections, the report said. This would include actions like attempting to tamper with voter registration or vote tallies.

In other words, Russia would have to unleash something more than "malign influence" on the elections, such as "trying to sway peoples' opinion or the way people might vote," an unnamed senior administration told reporters on a call Wednesday, as cited by the CPI.

The report suggests the US is further integrating cyberwarfare with its regular military strategies, and its intelligence community is growing increasingly concerned with offensive cyberattacks on the US.

The Pentagon building pictured in 2010. Mariordo Camila Ferreira and Mario Duran/Wikipedia (CC BY-SA 3.0)

Russia has allegedly attempted to spread far-right propaganda on Facebook in an attempt to influence the midterms already.

Earlier this year, a Russian woman was accused of orchestrating a $35 million scheme to create thousands of fake social media and email accounts, in order to post divisive left- and right-wing memes and talking points on Facebook and Twitter.

Read more: 'It's like playing whack-a-mole': A string of recent revelations paints a stark picture of Russia's ongoing campaign to meddle in the 2018 midterms

The alleged plan was organized under an executive order signed by President Donald Trump earlier this year, which eases the rules on the deployment of digital weapons for national security.

It was designed to allow Defense Secretary James Mattis and Director of National Intelligence Dan Coats to approve retaliatory strikes without the approval of other government authorities, the CPI said. Most of the powers outlined in the executive order remain classified.

John Bolton, Trump's national security adviser, told reporters in September: "For any nation that’s taking cyberactivity against the United States, they should expect ... we will respond offensively as well as defensively."