Hackers have targeted the voter registration systems of more than 20 states in recent months, a Homeland Security Department official said Friday.