skip to content

Making the Client Pay

Demanding a round trip, a retry or a puzzle before you allocate stops senders that cannot afford it and taxes everyone else. Interviewers probe the ratio, because most candidates price one side.

on this pageshow

questions

4

Under a spoofed-source flood, what does an address-validation round trip prove, and what does it cost?

level: juniorimportance: must knowfreq 60%

answer

  1. reachability, not intent
  2. the reply a spoofed sender never collects
  3. botnet addresses are genuinely real
  4. one extra round trip for everyone honest

basics

~20 s

It proves only that the source address really receives traffic: a spoofed sender never collects the reply and drops out. It proves nothing about intent, so a botnet host with a real address passes. Every honest client pays one extra round trip.

solid answer

~50 s

Before allocating anything expensive, the front door sends something to the address the packet claims and refuses to continue until it comes back. That is the whole trick behind TCP requiring an acknowledgement of a server-chosen sequence number, behind a QUIC server answering with a Retry token instead of a connection, behind a DNS server setting the truncation bit so the resolver must come back over TCP, and behind an HTTP redirect that hands out a token the client must present next time. What it proves is *return routability*: traffic sent to that address reaches whoever is talking to you. That deletes the entire spoofed and reflected share of a flood for almost nothing. It proves nothing about intent — a rented host uses its own real address and completes the trip happily. The price is one extra round trip on every honest connection setup, plus a front door that can issue the challenge without allocating.

go deeper

for a junior

Be ready to state the one fact a round trip establishes — the source address really receives traffic — and to say plainly that this is not the same as the client being trustworthy.

for a middle

Expect to name the concrete forms this takes in TCP, QUIC, DNS and HTTP, and to explain why issuing the challenge must not itself allocate per-client state.

for a senior

Show you know where validation stops helping: real-address botnets pay the toll, and a saturated uplink means the challenge is never issued at all. Be able to say what you would reach for next.

for a principal

Own the framing that this is a cheap first filter, not a defence, and be able to explain to a non-specialist why removing the spoofed share can leave the observed attack volume unchanged.

## The claim a source address makes Every IP packet carries a source address and nothing in IP verifies it. Where an upstream network does not filter outbound traffic to the prefixes it actually owns (BCP38-style ingress filtering, or uRPF on the access edge), a host can put any address it likes in that field. Spoofing costs the attacker nothing per packet, and it buys two things: the flood is unattributable, and any state you allocate on arrival is allocated for a client that does not exist. The one thing the spoofer gives up is the return path — whatever you send back goes to the address they forged, not to them. An address-validation round trip is built entirely on that giveaway. ## What the round trip is Before committing anything expensive — a connection table entry, a session, a worker thread, a buffer, a database lookup — send something to the claimed address and require it back. The forms differ by protocol and all do the same job: - TCP's own handshake: the server picks a sequence number and will not treat the connection as established until the client acknowledges it. Only somebody receiving traffic at that address can. - QUIC's Retry: the server refuses to allocate a connection, replies with an opaque token, and requires the client to re-send its Initial carrying that token. - DNS answering over UDP with the truncation bit set, forcing the resolver to retry over TCP, which has a handshake in it. - An HTTP redirect that sets a token the client must present on the next request. ## What it proves, precisely Exactly one fact: the source address is *return-routable* — traffic sent there arrives at the party you are talking to. That is worth a great deal. It removes spoofed traffic, it removes reflected traffic whose apparent source is somebody else's victim, and it turns the survivors into a finite set of real addresses you can count, group by network, and block. It also raises the attacker's unit cost from a packet to a host that must hold state. ## What it does not prove It says nothing about identity, intent, or whether a human is present. A botnet of real devices, or rented capacity in somebody's cloud account, uses genuine addresses and passes every validation you can devise; the toll is simply paid. It also does nothing at all before the packet reaches you — if the uplink upstream of the front door is saturated, no challenge is ever issued, because no request ever arrives. ## The price the defender pays - **A round trip on every honest client.** On a protocol designed to establish quickly this is a real regression, and it lands hardest on the users furthest away. - **Issuance must itself be stateless.** If validating an address costs you a table row per unvalidated client, you have moved the flood from the connection queue into the validation table and gained nothing. - **Anti-amplification.** Anything you send to an address you have not validated may be going to somebody else's victim. QUIC caps a server at three times the bytes received from an unvalidated address for exactly this reason, and the same discipline applies to any UDP-borne challenge: never answer an unproven address with substantially more than it sent you, or your defence becomes someone else's reflector. - **Client compatibility.** A redirect-plus-token challenge assumes a client that follows redirects and keeps the token. Plenty of legitimate machine clients do neither. ## How it is actually used As the first and cheapest gate in a stack, not as the answer. Validation strips the free traffic — the spoofed and reflected share, which for many floods is most of it — and leaves a smaller, attributable population for the more expensive controls to judge. The engineer who describes it as proof of legitimacy has the direction of the claim wrong, and that error shows up later as blocking decisions made on evidence that never supported them.

  • Which parts of a flood does an address-validation round trip actually remove?
    The spoofed share and the reflected share — anything whose source address is forged or belongs to somebody else's victim simply never comes back. It removes nothing from a botnet using its own addresses, and nothing at all from a volumetric flood that saturates the link before your front door ever answers.
  • Why must the challenge you send back be small?
    Because you are sending it to an address you have not verified, so it may be landing on somebody else's victim. If your reply is much larger than the request that triggered it, you have built an amplifier. QUIC codifies this as a hard cap of three times the bytes received from an unvalidated address.
  • The flood was spoofed, you enabled validation, and volume upstream is unchanged. What happened?
    The validation only helps traffic that reaches you. If the flood is filling the transit link, packets are dropped before the front door sees them, so nothing you do at the front door changes the volume. That is a capacity or upstream-absorption problem, not a challenge-tuning problem.

It is a callback number. Ringing it back proves someone answers at that number; it proves nothing about who they are or why they called.

saying these in an interview costs you the question

  • Says a completed round trip proves the client is legitimate
  • Assumes a botnet cannot complete an address validation
  • Thinks it helps once the uplink is already saturated
  • Forgets the added latency every honest client pays
  • Answers an unvalidated address with a much larger reply

context

open as a page

You turn on a browser challenge for all traffic at the front door during a flood — who breaks, and how should you have sequenced it?

level: seniorimportance: must knowfreq 54%

basics

~20 s

Everything that is not an interactive browser breaks: partner server-to-server calls, the payments provider's callback, embedded and no-JavaScript clients, and old mobile builds. Sequence it as observe-only first, exempt the known machine paths before enforcing, then enforce narrowly and keep a way back.

open as a page

You add a client-side CPU puzzle to price out a botnet flood — who ends up paying more, you or the attacker?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Usually you. Puzzle difficulty is capped by your weakest legitimate device, so the toll stays small, and a botnet pays it in parallel on hardware and electricity that are not the attacker's. You add latency for every real user and barely dent a funded flood.

open as a page

A front door records every challenge token it issues; under a spoofed flood, why does that fail and what does the fix cost?

level: middleimportance: nice to knowfreq 30%

basics

~20 s

Recording issued tokens re-creates the per-client state the challenge existed to avoid, so the flood fills that table instead of the connection queue. Make the token self-validating — a keyed hash over the source address and a timestamp — and verify it by recomputing rather than looking it up.

open as a page