Both countries have also obtained voter registration information, though such data is considered easily accessible.
Despite the Iranian and Russian actions, the officials said Americans can be confident that their vote will be counted.
The news conference was held as Democratic voters in at least four battleground states, including Florida and Pennsylvania, have received threatening emails, falsely purporting to be from the far-right group Proud Boys, that warned "we will come after you" if the recipients didn't vote for President Donald Trump.
The voter-intimidation operation apparently used email addresses obtained from state voter registration lists, which include party affiliation and home addresses and can include email addresses and phone numbers.
Those addresses were then used in an apparently widespread targeted spamming operation. The senders claimed they would know which candidate the recipient was voting for.
Federal officials have long warned about the possibility of this type of operation, as such registration lists are not difficult to obtain.
"These emails are meant to intimidate and undermine American voters' confidence in our elections," Christopher Krebs, the top election security official at the Department of Homeland Security, tweeted Tuesday night after reports of the emails first surfaced.
- AP