man-in-the-middle attack
An attack where someone secretly sits between two parties, relaying and possibly altering their traffic while each thinks it talks to the other.
A successful attacker can read and alter everything the two parties exchange, including passwords and payments.
In more detail
Server authentication is the defence: TLS certificates and SSH host keys let the client detect an impostor. Accepting an unverified key or ignoring a certificate warning disables that protection.
Examples
Unauthenticated Diffie-Hellman trusts whoever answersOn-path attacks use techniques such as ARP spoofing on a local network, rogue wireless access points or DNS poisoning.Related terms
- Diffie-Hellman — A method that lets two parties agree on a shared secret key over a public network, even while an eavesdropper sees every message they exchange.
- certificate authority — A trusted party that signs certificates, so anyone who trusts it can trust the certificates it issued.
- TLS handshake — The opening exchange of a TLS connection, in which client and server agree on settings, check certificates and create shared keys.
- authentication — Establishing who a request represents, for example by checking a password, a session cookie or a signed token.
- host key — The key pair an SSH server uses to prove its identity to every client that connects.
- TLS certificate — A signed digital document that proves a server really owns a domain name and holds the key used to start encrypted TLS connections.
- trust on first use — The model where a client accepts a server's key the first time it sees it and then insists on the same key afterwards.
- TLS — The encryption that protects data travelling over a network, the S in HTTPS.
- rejectUnauthorized — The Node.js TLS option, true by default, that makes a connection fail when the server's certificate cannot be verified.
- ARP — Address Resolution Protocol: how a machine on a local network finds the hardware (MAC) address that belongs to an IP address.
- rogue access point — An unauthorised wireless access point on or near a network; an evil twin copies a real network's name to lure devices onto it.
- downgrade attack — An attack that tricks two parties into using an older, weaker protocol version or algorithm that the attacker can then break.
Taught in
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- SSH: The Protocol, And The Host Key You Accept — Linux Fundamentals & Systems Administration
- TLS & HTTPS Encryption: Certificates & SNI Contexts — Node.js Internals & Backend Services
- Adversary Tactics, Techniques & Procedures (TTP) Mapping — Security Operations & Threat Hunting (SOC)