A person familiar with the attack said it was unclear whether the attackers had accessed lawmakers’ emails.