skip to content

An application-aware firewall re-labels a live flow from permitted web traffic to a tunnel mid-session — what has it already cost you?

level: middleimportance: should knowfreq 55%

answer

  1. the verdict is revised, not fixed
  2. policy re-runs on the new label
  3. the earlier bytes are already delivered
  4. a teardown breaks a real session
  5. the label pair is the signal

basics

~20 s

Everything transferred under the first label. A re-label re-runs policy on a flow already in progress: the device can tear the session down from that moment, but the bytes that moved while it was called ordinary traffic are delivered and unrecoverable.

solid answer

~50 s

Applications shift legitimately — a session opens as something ordinary and then negotiates something else inside it, and the classifier revises its verdict on the new evidence. The device re-evaluates policy against the new label, so the matching rule can change mid-flow, and if the new label is denied the session is torn down there. Three costs. First, the transfer that already happened under the permitted label is gone. Second, a teardown can land on a benign application that merely resembles the denied one, and that is a broken business flow, not an analyst's false positive. Third, an adversary who knows re-labelling exists designs for it: keep inside the real behaviour of a permitted application, or move small amounts per session and open many. The compensating value is that the *pair* of labels — what it claimed to be, what it turned out to be — is itself worth alerting on.

go deeper

for a junior

Know that the application label on a live flow can change as more of the session is seen, and that the change causes the policy to be applied again to a connection that is already running.

for a middle

Explain the mechanics: refinement, a genuine protocol shift and deliberate shaping all cause re-labels; policy is re-evaluated; the teardown stops the remainder only. Say what the session record shows afterwards.

for a senior

Weigh the costs. Be ready to argue when a teardown is worth the risk of dropping a benign look-alike, and to design the transition itself as a reported signal rather than relying on the block.

for a principal

Own the reporting consequence: a permitted rule can carry traffic that ended up denied, so any statement about what the boundary allows must be made on label transitions, not on final labels alone.

## Why a label changes mid-flow Classification is not a one-shot decision taken at the start of a session and then frozen. Evidence keeps arriving, and some evidence only arrives later. A session may begin with an exchange that matches a generic protocol, then negotiate an upgrade, then start carrying something entirely different inside the channel it just established. The classifier is doing exactly what it should when it revises the verdict. There are three broad reasons a label moves: - **Refinement.** The device first knows only that this is an encrypted session, then reads enough handshake metadata to name the service behind it. Generic label, then specific label. - **A genuine protocol shift.** The session negotiates an upgrade or establishes a tunnel over a channel that was itself perfectly ordinary. - **Deliberate shaping.** Traffic built to be classified as a permitted application for as long as possible, then used for something else. This is the adversary this leaf exists for, and note what they are attacking: not the port number, but the *shape* the classifier is matching on. ## What the device does on the re-label Policy is re-evaluated with the new label. The rule that matched before may no longer match; a different rule now decides. If the new decision is deny, the flow is dropped and typically reset. Everything that crossed under the old decision has crossed. This matters for how you *write* the rule base. A flow can be counted against two applications in the same session, so a policy written as though each flow has one immutable label will be surprised: the allow that let the session start is not the rule that finally governed it, and reports built on the final label alone will under-report what the permitted rule actually carried. ## The three prices **Bytes already delivered.** The size of this depends entirely on when the shift happened. A tunnel established at the start of a session is caught quickly. A tunnel established on a session that has been legitimately busy for an hour is caught after that hour of cover. **Teardowns on benign traffic.** This is the cost that separates a filtering control from a monitoring one. A classifier that decides a legitimate internal application looks like a denied class does not generate an alert somebody triages later — it drops a live session in the middle of a transfer. The user experience is a corrupted upload, a stalled backup, a client that reconnects and stalls again. Somebody has to own that outcome, and at a boundary shared by several customers the person who owns it did not choose the rule. **Design pressure on the adversary, and how they answer it.** If re-labelling reliably ends the session, the counter-designs are obvious: stay inside the behaviour of a permitted application so no shift is ever detected; or accept the teardown and keep each session small, opening many, so the amount lost per detection is trivial. Both are cheaper for them than they are for you, and this is why the re-label is best understood as a *signal generator* as much as a block. ## The part worth keeping The transition itself is high-quality evidence. "This flow was labelled an ordinary permitted application and then re-labelled as a tunnel" is a much sharper statement than either label alone, because ordinary sessions do not usually do that. It is worth recording the pair and reporting on it, whether or not the policy allows the second label — including for the flows you decided to permit, where the re-label is the only trace you will keep. ## What to avoid claiming Do not claim the boundary "blocked the tunnel". It blocked the *remainder* of the tunnel. If someone asks how much moved, the answer is in the session's byte counters, and it is never zero.

  • Why not deny any flow whose label is still ambiguous, rather than waiting for a shift?
    Because ambiguity is the normal state of every flow for its first packets, and of a large share of flows permanently. Denying on ambiguity is the same policy as denying unclassified traffic, applied to everything, and it breaks far more than it stops. The interesting decision is what the unknown default says, not whether to punish the opening window.
  • How should a rule base be written given that a flow can match two applications in one session?
    Write it so both labels are considered and reported. An allow for the opening application should not be read as an approval of whatever the session became, and reporting keyed only on the final label will hide what the permitting rule actually carried. Where a shift is meaningful, alert on the transition itself rather than on either endpoint of it.
  • An adversary knows the classifier re-labels and tears down. What do they do?
    Either stay inside the genuine behaviour of a permitted application so no shift is ever observed, or accept the teardown and design for it — many short sessions, each carrying little, so the loss per detection is negligible. The second is noisy and the transition record is what catches it; the first is quiet and is not caught here at all.

saying these in an interview costs you the question

  • Says the tunnel was blocked, with no mention of what already moved
  • Assumes a flow carries one immutable application label
  • Treats a mid-session teardown as costless because the traffic was suspicious
  • Confuses a re-label with the classifier simply being wrong at the start
  • Ignores that a benign look-alike is dropped, not merely alerted on

context