liveBook · Manning

Replay attack

A replay attack is an attack in which previously captured valid messages, requests, or authentication data are retransmitted to produce an unauthorized effect.

How 3 Manning books explain it

Software Security for Developers

A replay attack is an attack in which a valid previously captured message or credential is retransmitted to obtain an unauthorized effect.

How it is used
Protects payments, OIDC authentication responses, magic links, and service-to-service requests from unauthorized reuse.
How deep it goes
Explains interception, repetition, tampering, nonces, timestamps, signatures, and one-time tokens without detailing cryptographic algorithms.
Examples
Uses repeated payment requests, tampered transfers, signed inventory requests, WebAuthn challenges, and reusable magic-link tokens.
What you can do after
Diagnose replay risk by checking request freshness, uniqueness, integrity, binding, and one-time credential invalidation.

Read how Software Security for Developers explains replay attack →

The Design of Web APIs, Second Edition

Request replay is the repeated submission of a previously captured API request, potentially causing an operation to occur more than once.

How it is used
Protects data integrity by preventing repeated API calls from creating duplicate operations.
How deep it goes
Explains request identifiers and business-data checks, including conflict responses and a way to confirm intentional duplicates.
Examples
Uses a retried order and a mobile money transfer with matching amount, source, and destination.
What you can do after
Apply unique request identifiers or business-level duplicate checks, and handle 409 Conflict responses.

Read how The Design of Web APIs, Second Edition explains replay attack →

Real-World Cryptography

A replay attack resends a previously valid message and its authentication data so that they may be accepted again as current.

How it is used
Protects authenticated message exchanges from accepting previously valid messages as new.
How deep it goes
Explains the threat, counter defense, key rotation, nonce sequencing, and variable-length ambiguity without implementation detail.
Examples
Uses Alice-and-Bob message exchange, Rust HMAC code, TLS records, and replayable 0-RTT application data.
What you can do after
Diagnose replay exposure, add counter or nonce sequencing, and restrict 0-RTT to safely replayable operations.

Read how Real-World Cryptography explains replay attack →

Also covered in

What to know first

Related concepts

Questions about replay attack

What is replay attack?

A replay attack is an attack in which previously captured valid messages, requests, or authentication data are retransmitted to produce an unauthorized effect.

Which Manning books explain replay attack?

Software Security for Developers, The Design of Web APIs, Second Edition and Real-World Cryptography.

What should I know before learning replay attack?

Manning books that teach replay attack usually introduce authentication, certificate authority, data integrity and encryption first.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.