This scenario describes a classic active attack where the adversary sits between two communicating parties.
1. Defining the Man-in-the-Middle (MITM) Attack:
In an MITM attack, the attacker secretly relays and possibly alters the communication between two parties who believe they are directly communicating with each other. The specific action of "intercepting, replacing with a fake, and forwarding" is the hallmark of this attack.
2. Distinguishing from Other Attacks:
• Replay Attack: The attacker captures a valid session/message and sends it again later without changing it.
• Masquerade Attack: One entity pretends to be a different entity (often the first step of an MITM).
• Denial of Service (DoS): The goal is to make a service unavailable, not necessarily to forge messages.
3. Conclusion:
Because the attacker is actively modifying the data in transit between two parties, "Man in the middle" is the most comprehensive classification for this behavior.