Dev.to Security 🔐 Cybersecurity 👁 2 📖 6 min read

Run a Home Network Monitor for 24 Hours Before You Write One Alert

A one-day baseline for telling a real change from the usual noise, without recording everyone’s life. At 2:13 a.m., a smart plug opens a connection. The dashboard marks the destination as new and paints it red. Your ph

A one-day baseline for telling a real change from the usual noise, without recording everyone’s life.

At 2:13 a.m., a smart plug opens a connection. The dashboard marks the destination as new and paints it red. Your phone buzzes. You put down whatever you were doing to investigate a light switch.

What did the monitor actually learn? One device connected to an address the monitor hadn’t seen. That’s useful. It’s also a long way from “someone got into the house.”

Most home networks make a ridiculous amount of noise when they’re working correctly. TVs check for updates. Phones drop off Wi-Fi and come back. Backups throw a fit for fifteen minutes and then go quiet. The point of a baseline is to find out which part of that noise you would want to hear about twice.

Give the monitor a day before you write an alert. One day is not enough to learn everything your network does. It is enough to find out whether your sensor is looking at the right part of it and whether your first alert would make you throw your phone across the room.

Decide what the sensor can actually see

Pick one lab segment, or two or three devices you own, and write down a question. Mine for this exercise would be: Can I tell when the backup box is running outside its usual window? Specific beats ambitious here. “Tell me if I’m hacked” isn’t a question a single sensor can answer.

Monitor only devices and traffic you’re authorized to observe. On a shared home network, don’t quietly include roommates just because you own the router. Use an isolated test segment or get informed consent and make the boundaries clear. Leave guests and work-managed devices out of the exercise.

A Raspberry Pi plugged into an ordinary switch port doesn’t automatically see all the traffic passing between other ports. It usually sees traffic addressed to it, plus relevant broadcast or multicast traffic, not every other device’s unicast traffic. You can start with logs from a router or resolver you administer. If you need passive connection records, use a monitoring point that actually receives a copy of the relevant traffic, such as a mirror port on a managed switch you control. Document which links and directions you mirror. A sensor looking at internet-bound traffic can miss two devices talking on the same local switch. One placed outside your router may see multiple devices as one address because of NAT.

Write your blind spots down before the graphs convince you they don’t exist.

Keep enough to answer the question

For each source, record what its numbers mean. A connection log can show timing, endpoints, protocol, and byte counts when the sensor can measure them. A DNS log shows names looked up through the resolver or visible to the sensor. Cached results and encrypted DNS can leave no useful name in a passive DNS log; a lookup by itself isn’t proof a connection followed. The Zeek connection-log guide and DNS-log guide are good references for drawing those distinctions.

For a first pass, keep time, a local alias for the device, the protocol, and the quantities you need for your question. If that question is about backup timing, you can usually work with totals per time window and the expected backup peer. No packet payloads or browsing histories required. If there’s a reason to keep fine-grained records for troubleshooting, restrict access, set a deletion date, and roll up what you need before deleting them. For this exercise I’d keep a few days of detailed records at most, and keep the summary only as long as it helps.

Turn on health statistics if the tool offers them. Suricata, for example, can emit statistics in its EVE event log. A rising capture-drop counter or an unexpected gap tells you that low counts could be missing data. Zero recorded connections is not the same as zero connections.

Log the boring stuff while it happens

Start your 24 hours while somebody is actually using the devices in scope. Agree on one time zone. Write down when the monitor starts, when you perform a known action, and when you finish. For the backup box, let the scheduled job run if it’s already configured. If you deliberately run a manual backup to test visibility, label it as a test rather than treating it as part of the usual schedule.

If you know you restarted the router at 8:05 p.m., write it down at 8:05 p.m. By tomorrow morning you will remember that it happened “at some point” and swear it couldn’t possibly explain the gap. Check that the clock on the monitor agrees with the clock on the box you’re troubleshooting. Note any reboot, mirror-port change, or interruption to the log feed.

Here’s a synthetic summary, not traffic from my house or a measurement of any product:

Time (local)       Device       Observation                         Context
18:05–18:10        backup-box   Known peer; short burst             Manual test
01:00–01:27        backup-box   Known peer; sustained transfer      Scheduled job
03:40–03:45        backup-box   No reliable data                    Sensor gap
07:30–07:35        backup-box   Small burst; same peer              Unexplained

The 1 a.m. row matters because you can match it to the job schedule. The gap matters because you can’t honestly say what the box did during it. The 7:30 row is an open question, not an incident. Compare it with the backup job’s log. Did a retry resume? Is that the same device identity or a recycled DHCP address? Or is there simply not enough evidence yet?

This is the first job of a good baseline: giving your observations names other than “normal” and “terrifying.”

Write one alert you’d actually act on

Take the best-understood behavior and write a condition narrowly enough that you know your next move. For this example:

If the backup box moves backup-sized volumes outside its scheduled window for two consecutive five-minute windows, and the monitor has reliable coverage, record one observation. Check the backup job’s log before escalating.

“Backup-sized” isn’t a universal number. Your first day may give you a sense of the difference between routine chatter and a transfer, but it doesn’t give you enough history to pick a statistically meaningful threshold. Run your first rule as a line in a log or a dashboard badge instead of a push notification. Count how often it fires for a bad reason. Document the expected exceptions, such as a manual restore or a delayed job. If the rule doesn’t lead to a reasonable action other than “look at more dashboard,” leave it in the log.

Do a small rehearsal before you rely on the rule. Reuse the manual transfer you labeled earlier and check that it appears in the expected time bucket. Then compare that with the monitor’s gap: a gap should say “coverage missing,” not “backup box silent.” If the rule can’t tell those two cases apart, fix the observation first.

Also write down what the rule won’t catch. A slow trickle can stay under a volume threshold. A scheduled transfer might be wrong even if it happens on time. The rule checks for one behavior on one portion of the network. It doesn’t certify the rest.

Keep the parts you’d want during an outage

Add a weekday, a weekend day, the next big update, and whatever backup schedule actually runs at your place. You don’t need to retain all the underlying records to improve the baseline. Keep the handful of observations you’ve verified, the known gaps, and a list of changes to the setup. Revise the baseline when you replace the router or move the sensor, not when an unexplained line makes the graph look untidy.

Disclosure: AI assisted in drafting and editing this article.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.