Here are some best practices against an active attack:
Use a random session key. Users can generate session IDs with limited validity, for example, for one transaction only. Using random session keys can prevent malicious users from resending messages with modifications.
One-time passwords help authenticate agreements, transactions, and sessions between two communication participants. The practice ensures password expiration so attackers cannot use it even if they successfully obtain it.
The Kerberos authentication protocol, which is used in Microsoft Windows Active Directory, allows nodes to transmit data over insufficiently secured networks to prove any user’s identity.