Silicon Valley insiders will likely play a bigger role than ever in ensuring the security of presidential campaigns in 2020, joining established D.C. consulting firms and other bipartisan groups trying to lock down campaign communications and neutralize misinformation.

Former Facebook chief security officer Alex Stamos has already given some advice to 2020 Democratic presidential campaigns, he told CNBC via email: Lock down your campaign staff's identities and use a professional service to manage data on cloud servers. Build security from the ground up, he suggested, and don't give too many team members access to deeper technology operations.

"I fully expect U.S. adversaries to get involved in the primary, and one way to do so would be via stealing email, internal documents or spying on confidential communications," Stamos said. "I've been trying to be helpful to multiple Democratic campaigns, and right now my focus is on helping them get their campaign technology stacks set up in a secure manner."

Stamos' advice indicates presidential contenders from 2020 are largely trying to address what they knew went wrong in 2016. Inside campaigns, that includes fixing insecure email and curbing staffers who have too much access to the most sensitive information. Outside the campaigns, that means focusing on managing the proliferation of influential trolls on the internet and social media, which in 2016 was largely driven by Russia, according to the Justice Department.

"Democratic campaigns are building teams to monitor and respond to trolling online. This isn't a technical role, more like the next level of social media monitoring they already do," Stamos said. "All of the campaigns are building up their IT systems and staff and I'm hoping they will do so with security in mind."

Democratic campaigns and organizations have also sought help from security firms to prepare for potential new threats.

Companies such as CrowdStrike, which was one of the first respondents to the hacking incidents within Clinton's campaign in 2016, and FireEye have already been tapped by political committees in advance of 2020. They've been holding high-level conversations with campaign leaders, according to people familiar with the campaigns. The companies declined to say whether they were working directly with Democrats.