Testing & Validation · Study deck

Testing with Traffic Analysis

Traffic-analysis testing uses captured network evidence to check how an IoT system communicates under controlled conditions, and monitoring applies the same discipline continuously after release.

Test Tessa is your guide for this deck.

traffic-analysismonitoring-evidencenetwork-testing
Test Tessa, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • start from a question before capturing traffic, not the other way around
  • run a capture review loop against a baseline
  • separate a real anomaly from a false alarm using correlation
  • Explain: A long packet recording shows thousands of lines, but nobody wrote whether five retries were expected or which device should stop them.
iotclass.org

Major section

Start Simple: Ask Before You Capture

A long packet recording shows thousands of lines, but nobody wrote whether five retries were expected or which device should stop them.

  • The file is large and the evidence is weak.
  • Collect only traffic you are authorized to inspect.
  • Encrypted content may also hide detail.
  • Monitoring uses the same habit after release.
iotclass.org

Major section

Start Simple: Ask Before You Capture (continued)

An unusual burst is a clue; it is not proof of its cause until the other evidence agrees.

  • The deeper sections show how questions, baselines, scope, and repeat tests turn packet records into reviewable decisions without overstating what was observed.
  • A heartbeat that disappears is meaningful only if the expected heartbeat was named first.
  • A retry burst is a signal, not a cause, until the capture scope, baseline, device logs, and change history agree.
iotclass.org

Major section

From a Question to a Capture, Not a Pile of Files

The mistake that wastes traffic work is capturing first and asking questions later, which leaves a pile of packet files no one can interpret.

  • Traffic-analysis testing inverts that: you state the communication behavior under review, define what you expect, exercise the path that should produce it, capture, observe, and decide.

Key terms

Missing traffic
Missing traffic is evidence only when the scope and expectation make its absence meaningful.
The traffic review loop runs from a test question through capture scope and an exercise condition to observed traffic, then a decision and a retest trigger.
The traffic review loop runs from a test question through capture scope and an exercise condition to observed traffic, then a decision and a retest trigger.
iotclass.org

Major section

From a Question to a Capture, Not a Pile of Files (continued)

The experiment states a hypothesis and records exactly the conditions that test it, so the result means something.

  • Monitoring is the same loop running continuously after release — it compares live traffic against an expected baseline and surfaces the differences worth a look.
  • Monitoring runs the same loop forever against a baseline.
  • Missing traffic is evidence only when the scope and expectation make its absence meaningful.
iotclass.org

Major section

From a Question to a Capture, Not a Pile of Files (continued)

This loop connects packet collection to a falsifiable claim, keeping the chapter focused on tests rather than accumulating unexplained files.

  • If you only need the intuition, this layer is enough: phrase a communication question, state the expected behavior, exercise the boundary, capture, and decide — on systems you are authorized to operate.
  • A traffic capture is the same: a small capture tied to a clear question is strong evidence, while a huge capture with no question is a weak record.
  • Beginner Examples Read these examples as a progression from the simplest observation to the boundary that still needs evidence.
iotclass.org

Major section

From a Question to a Capture, Not a Pile of Files (continued)

Scope fixes the vantage point, interfaces, filters, and time window; the condition identifies the action or fault that should produce traffic; and the observation records what crossed that boundary.

  • The One-Minute View Question before capture Name the communication behavior and the boundary first; the question is what makes the capture mean something.
  • Absence can be evidence Missing traffic is a finding only when the scope and expected behavior make its absence meaningful.
  • A signal is not a cause An anomaly points at something to investigate; it does not by itself prove the root cause.
iotclass.org

Major section

The Review Loop, Baselines, and Monitoring Records

A traffic-analysis test is reviewable when each capture carries the same fields, and monitoring is reviewable when each signal does.

  • The loop below keeps a test from becoming a pile of files; the baseline below keeps monitoring from becoming guesswork.
  • "Does the device stop retrying after a rejected command?".
A monitoring record links the expected pattern, the observed signal, the triage action, the decision, and the retest trigger.
A monitoring record links the expected pattern, the observed signal, the triage action, the decision, and the retest trigger.
iotclass.org

Major section

The Review Loop, Baselines, and Monitoring Records (continued)

"Is the network healthy?".

  • Bounded retries, then a stop or state change.
  • The event or state that should produce the traffic.
  • But a deviation is a signal, not a cause, and it must stay bounded.
  • The test question is whether the device retries as specified and then stops or changes state.
iotclass.org

Major section

The Review Loop, Baselines, and Monitoring Records (continued)

That order connects a retry burst or missing heartbeat to a review action while preserving the distinction between evidence of change and proof of cause.

  • Worked Example: A Retry Storm and a Missing Heartbeat Suppose a candidate changes how a device handles rejected commands.
  • The useful review is not "traffic was lower"; it is whether the capture scope, expected pattern, and related state explain the absence.
  • If you can run the loop and keep a monitoring signal bounded, you can stop here.
iotclass.org

Major section

Baselines, False Alarms, and Correlation

The deeper layer is about why a monitoring signal can mislead.

  • Three mechanisms matter: how a baseline is built and why it drifts, how detection thresholds trade false alarms against missed events, and why an anomaly is correlation rather than cause.
  • IoT traffic's regularity is what makes this tractable.
  • A benign change reads as an anomaly.

Key terms

Neither error
Neither error is free, and the right balance depends on how costly a missed event is versus a wasted investigation.
iotclass.org

Major section

Baselines, False Alarms, and Correlation (continued)

A baseline that is never maintained slowly turns into a source of false alarms.

  • Baselines Are Built From Flows and They Drift Flow analysis groups packets into conversations — broadly, who talked to whom, over which ports and protocol — and summarizes their volume and timing.
  • A real change passes as a false negative.
  • Signal read as cause.
iotclass.org

Major section

Baselines, False Alarms, and Correlation (continued)

Assigning a cause from the signal alone is the most common and most expensive mistake.

  • A baseline is the expected shape of those flows: a sensor that reports on a regular interval, a gateway that syncs periodically.
  • A Signal Is Correlation, Not Cause A deviation tells you something changed, not why.
  • A bounded root-cause investigation.
iotclass.org

Major section

Baselines, False Alarms, and Correlation (continued)

Thresholds Trade False Positives Against False Negatives Turning "different from baseline" into an alert needs a threshold, and the threshold is a trade-off.

  • Neither error is free, and the right balance depends on how costly a missed event is versus a wasted investigation.
  • An anomaly is treated as the root cause.
  • Common Pitfalls Review these failure modes in the order they can weaken or invalidate the result.
iotclass.org

Major section

Summary

A capture is evidence only when tied to a question, scope, expected behavior, exercise condition, observation, and decision; "did the network stay quiet?" is not a useful question.

  • Missing traffic can be a finding, but only when the scope and expected behavior make its absence meaningful.
  • Monitoring uses flow analysis to baseline normal behavior.
  • IoT traffic's regularity makes this feasible, but baselines drift with firmware, interval, and server changes and must be maintained.
iotclass.org

Deck summary

Key takeaways

A long packet recording shows thousands of lines, but nobody wrote whether five retries were expected or which device should stop them.

  • An unusual burst is a clue; it is not proof of its cause until the other evidence agrees.
  • The mistake that wastes traffic work is capturing first and asking questions later, which leaves a pile of packet files no one can interpret.
  • The experiment states a hypothesis and records exactly the conditions that test it, so the result means something.
  • This loop connects packet collection to a falsifiable claim, keeping the chapter focused on tests rather than accumulating unexplained files.
iotclass.org

Retrieval practice

Recall check 1 of 3

Test Tessa says: answer from memory, then check your reasoning.

Q1Why is a large packet capture with no stated question a weak piece of traffic-analysis evidence?

AA capture becomes evidence only when tied to a question, scope, and expected behavior.
BLarge captures are always corrupt and cannot be analyzed
COnly the total packet count matters, and a big capture already has it
DA capture with no question still proves the network is healthy if it is large enough
Show answer

Answer: A The question and expected behavior are what let a reviewer interpret the capture, including when missing traffic is itself a finding.

iotclass.org

Retrieval practice

Recall check 2 of 3

Test Tessa says: answer from memory, then check your reasoning.

Q2A capture shows repeated retries after a rejected command, but the record never states the expected retry behavior or the response that triggered it. What is the strongest review feedback?

AApprove the candidate because the captured retries show that the rejection path was exercised on the network.
BHold the record until the test question, expected behavior, and exercise condition are stated.
CTreat the retries as proof of the root cause with no further review
DIgnore the retry sequence because traffic analysis cannot review command behavior
Show answer

Answer: B Retries are only interpretable against an expected behavior and a known trigger; without those the capture is not yet evidence.

iotclass.org

Retrieval practice

Recall check 3 of 3

Test Tessa says: answer from memory, then check your reasoning.

Q3After a firmware update, monitoring flags a device group as anomalous because its reporting pattern changed, and an operator wants to declare an incident. What is the strongest response?

ADeclare an incident because a group-wide reporting change suggests a shared firmware fault rather than random packet loss.
BDisable monitoring for that group so the alerts stop
CRecognize that a baseline is only valid for the configuration it was measured under.
DSuppress the alert until the next baseline is collected because the firmware update explains the timing of the change.
Show answer

Answer: C The deviation is a signal, and a known configuration change is a likely benign cause; confirm against intended behavior and update the baseline rather than assuming an incident.

iotclass.org

Print reference

Answers

Answer key.

  1. A · The question and expected behavior are what let a reviewer interpret the capture, including when missing traffic is itself a finding.
  2. B · Retries are only interpretable against an expected behavior and a known trigger; without those the capture is not yet evidence.
  3. C · The deviation is a signal, and a known configuration change is a likely benign cause; confirm against intended behavior and update the baseline rather than assuming an incident.
iotclass.org