It is too late to protect the 2018 midterm elections in the United States from foreign interference online, according to the former chief security officer of Facebook.

Alex Stamos made the warning less than a month after leaving the social media giant, having led the company's response to Russian meddling in the 2016 US presidential election through the platform.

"In some ways, the United States has broadcast to the world that it doesn’t take these issues seriously and that any perpetrators of information warfare against the West will get, at most, a slap on the wrist," he wrote in a column for the legal publication Lawfare.

How to stop Facebook from revealing everything about you Show all 9 1 /9 How to stop Facebook from revealing everything about you How to stop Facebook from revealing everything about you Lock your profile down If you haven’t done this already, do it now. In Settings, hit the Privacy tab. From here, you can control who gets to see your future posts and friends list. Choose from Public, Friends, Only Me and Custom in the dropdown menu. How to stop Facebook from revealing everything about you Limit old posts Annoyingly, changing this has no effect on who’s able to see your past Facebook posts. Instead, on the Privacy page, you have to click on Limit Past Posts, then select Limit Old Posts and finally hit Confirm on the pop-up. How to stop Facebook from revealing everything about you Make yourself harder to find You can stop completely random people from adding you by selecting Friends of Friends from the dropdown menu in the Who can send you friend requests? section of the Privacy page. It’s also worth limiting who can find your Facebook profile with your number and email address. At the bottom of the page is the option to prevent search engines outside of Facebook from linking to your profile. How to stop Facebook from revealing everything about you Control access to your Timeline You can limit who gets to post things on your Timeline and who gets to see posts on your Timeline too. In Settings, go to Timeline and Tagging and edit the sections you want to lock down. How to stop Facebook from revealing everything about you Block people When you block someone, they won’t be able to see things you post on your Timeline, tag you, invite you to events or groups, start conversations with you or add you as a friend. To do it, go to Settings and Blocking. Annoyingly, you have to block people on Messenger separately. You can also add friends to your Restricted list here, which means they’ll still be friends with you but will only be able to see your public posts and things you share on a mutual friend's Timeline. How to stop Facebook from revealing everything about you Review tags One of Facebook’s handiest privacy features is the ability to review posts you’re tagged in before they appear on your Timeline. They’ll still be visible on the News Feed while they’re fresh, but won’t be tied to your profile forever. In Timeline and Tagging, enable Timeline review controls. How to stop Facebook from revealing everything about you Clean up your apps You can view a list of all of the apps you’ve connected to your Facebook account by going to Settings and Apps. The list might be longer than you expected it to be. It’s worth tidying this up to ensure things you no longer use lose access to your personal information. If you don’t want to log into websites and apps with your facebook account, scroll down and turn Platform off. How to stop Facebook from revealing everything about you Change your ad preferences You can view a list of everything Facebook thinks you’re into and tinker with your ad preferences by going to Settings and Adverts. A lot more information is displayed on the desktop site than the app, so we’d recommend doing this on a computer. How to stop Facebook from revealing everything about you Download your data Facebook lets you download all of the data it has on you, including the posts you’ve shared, your messages and photos, ads you’ve clicked on and even the IP addresses that are logged when you log in or out of the site. It’s a hell of a lot of information, which you should download to ensure you never over-share on the social network again.

Mr Stamos referenced news from earlier this week from Microsoft, who warned that Russians are attacking US political groups ahead of the midterms.

According to the technology giant, a hacking group linked to the Russian government sought to undermine democracy by setting up fake websites imitating right-wing organisations.

A Kremlin spokesperson responded to the allegations by saying he did not understand the charges.

"We don't know what hackers they are talking about," Dmitry Peskov said on a conference call with reporters. "Who exactly are they talking about? We don't understand what the proof and the basis is for them drawing these kind of conclusions. Such information [proof] is lacking."

Mr Stamos also referred to revelations that Russian and Iranian groups used more than 600 Facebook accounts to spread misinformation in the US, UK, Latin America and the Middle East.

"The revelations are evidence that Russia has not been deterred and that Iran is following in its footsteps," Mr Stamos wrote. "This underlines a sobering reality: America's adversaries believe that it is still both safe and effective to attack US democracy using American technologies and the freedoms we cherish."

But while it may be too late to prevent such interference in the 2018 midterm elections, Mr Stamos claimed that it is not too late to defend against similar attempts ahead of the 2020 US presidential elections.

The former Facebook executive, who also worked on security and safety at Yahoo, outlined "four straightforward steps" that could prepare the US for attacks in 2020.

These included new laws set by Congress to address online disinformation, a reassessment of who is responsible for cyber security defence within the US government, a more rapid response to investigate attacks, and for all states to follow the lead of Colorado by building statewide election security teams.