Seven mistakes analysts make on a long DNP3 capture

4 min read188 courses on OnlySecurity

These are the mistakes that show up most when people first work through hunt-style captures. None needs an exploit to cause. Each one is a method failure.

  1. Reading the capture top to bottom. In a capture of hours, the packet list is a poor instrument. Whatever happens in the first screen of packets becomes the story, and the rest gets skimmed. Start with duration, packet count and a rate over time, and only then open packets.
  2. Skipping the baseline. Without a picture of normal polling, every unusual number looks suspicious or every number looks fine. Choose a stretch that looks quiet, record its poll interval, the function codes in use and the set of addresses, and write them down before anything else.
  3. Choosing a window size by accident. A one second bucket on a four hour capture gives fourteen thousand rows nobody reads. A one hour bucket averages a ninety second event away. Match the bucket to the polling cycle and to the shortest event you care about, and try two sizes before concluding anything. The interval is the last number in the option, for example -z io,stat,300 for five minute buckets (checked on 4.2.0).
  4. Trusting the filename. A run called “replay” invites you to find replay. Hide the name, classify from traffic, and compare afterwards. If your result differs, find out why before you decide the label is wrong or you are.
  5. Counting function codes and stopping. Counts say what was asked, not who asked, in what order, or how often relative to the poll cycle. A master that sends the same request a hundred times at the usual rate is normal. A master that sends it a hundred times in a second is not. Pair counts with a source address and a time axis. The field to extract is dnp3.al.func, and the sender’s link address is dnp3.src (both checked on 4.2.0), so tshark -r file -Y dnp3 -T fields -e dnp3.src -e dnp3.al.func | sort | uniq -c gives the pairing.
  6. Taking one vantage point as the whole truth. A capture from one place is internally consistent even when something upstream altered it. Where two views of one exchange exist, compare them. Where only one exists, say what you cannot prove.
  7. Reporting a feeling instead of a result. “There is something odd around the second hour” is a lead. A result names the window, the baseline it deviates from, the family it matches, the evidence for the match, what else it could be, and what was not checked.

Two habits prevent most of the list. The first is a run log: file name, SHA-256, duration, vantage point, baseline summary and the decision with one line of reasoning. The second is writing down what you expect to see before you look, then noting the surprises. Surprises are where the learning is, and they disappear if you only record outcomes.

A worked example of the log in use, with invented numbers. A learner opens a four hour capture and notes: polling every two seconds, one master, two outstations, three function codes in regular use. They take hourly counts and see nothing. They take five minute counts and one bucket in the third hour carries about four times the usual requests. That bucket is a lead. They slice it out, compare its source addresses with the baseline set, and find the same addresses at a much higher rate, which points toward a flood and away from a masquerade. They log what they did not check, such as whether the other outstation was affected. The result is small and bounded, and a second reader can repeat it, which is the real test of a hunt.

None of this requires running anything against a device. It is reading, counting and comparing. If a capture is being analysed because something real happened, the findings should go to the people who own the network, with the file hash and the log, and not be acted on by replaying anything.

For structured practice on this topic, see the OnlySecurity course DNP3 Threat Hunting: Triage and Hunt Sets.

More from this author