“I hope I’m wrong. But I think we’ll see attacks on campaigns in which the Russians in particular have already stolen information,” said Eric Rosenbach, an intelligence veteran and cybersecurity expert at Harvard University’s Belfer Center for Science and International Affairs.

Nationally, the two major political parties stepped up security after the 2016 breach of computers at the Democratic National Committee and Hillary Clinton’s presidential campaign.

Voting machines, often described as old, insecure and lacking a paper trail, are more secure than widely understood. Four in five Americans vote on machines that incorporate paper ballots or backups. Many state voter-registration databases also have been hardened against outside attack since 2016. While it is possible to hack voting devices to rig an election, experts say, intruding into enough of them to change the outcome would be extremely difficult.

How are ballots being secured?

Election officials and the Department of Homeland Security set up a council to coordinate the response to threats, and the department offers security scans, equipment and other services to election officials nationwide. Top state election officials are gaining security clearances to see and assess threats, and in February, all 50 states and more than 1,000 localities opened a center to exchange data. Virtually every state has taken steps to lock down its election processes.

A public-private committee has also approved a new standard for voting equipment that will significantly improve security. More voting machines than ever have verifiable paper backups, and nearly all should have them by 2020, said David J. Becker, the director of the Center for Election Innovation and Research. States also are adopting more advanced auditing techniques for vote counts.

What are intelligence agencies doing?

The most important work the intelligence community has done, according to current and former officials, is to penetrate foreign networks and spy on Russian groups conducting the attacks. The agencies have also monitored networks in the United States to try to detect information campaigns as they begin.

“They are gathering intelligence,” said Michael Sussmann, a former Justice Department official who is now a partner at Perkins Coie. “They are trying to figure out what our adversaries are planning and what is being done. That includes penetrating foreign networks and other kinds of spying they do. And they are doing surveillance on U.S. networks to detect influence of all kinds.”