Problem Statement
Explain a Man-in-the-Middle (MITM) attack and how encryption helps prevent it.
Explanation
In a MITM attack, an attacker secretly intercepts and alters communication between two parties without their knowledge. They can steal credentials or inject malicious data. Encryption protocols like SSL/TLS prevent this by ensuring both parties exchange data securely with verified identities. Always mention mutual authentication and certificate validation as key defenses during interviews.