skip to content

Your Suricata rules read $EXTERNAL_NET -> $HOME_NET, but every employee is now a tunnel client in one address pool. Which attacker traffic is never evaluated, and what does fixing it cost?

level: seniorimportance: should knowfreq 34%

answer

  1. the variables encode a building you no longer have
  2. home-to-home never selects the group
  3. peer-to-peer is the path that matters here
  4. any/any deletes the cheap filter
  5. drops are a silent detection gap

basics

~20 s

Client-to-client traffic inside the pool is home-to-home, so it never matches an external-to-home rule at all: a compromised laptop attacking a colleague over the tunnel is invisible. Widening both variables to any restores coverage and removes the cheap pre-filter, so payload evaluation runs on everything and the sensor starts dropping packets.

solid answer

~50 s

With `$EXTERNAL_NET` defined as `!$HOME_NET` and every endpoint inside the pool, peer traffic is home-to-home and never selects the external-to-home rule groups. The whole inbound-attack rule set is silently idle for the one attack path an officeless estate actually has - one compromised client reaching another across the hub. The reflex fix is to set both variables to `any`, which removes the header's ability to eliminate anything: every packet becomes a candidate in every group, the multi-pattern pre-filter becomes the only cheap filter left, and CPU per packet rises until the sensor drops traffic - a detection gap that produces no alert. The real answer is to rebuild meaningful variables rather than delete them: carve the pool so service ranges and the client range are distinct sets, express direction with `flow:to_server` and service ports rather than address topology, and put a capacity number and drop counters behind any widening before it ships.

go deeper

for a junior

Know what $HOME_NET and $EXTERNAL_NET are, that the second is usually defined as everything the first is not, and that the arrow in a rule states a direction of attack.

for a middle

Explain why a home-to-home packet is not merely a non-match but is never considered by an external-to-home rule, and what changes when both variables become any.

for a senior

Diagnose both failures together and propose an address plan plus flow-based direction, and name the counters you would watch to prove the sensor still inspects what it claims to.

for a principal

Be ready to argue for spending on an address plan and sensor capacity in an estate with no offices, where the alternative is a rule set whose coverage claim is unverifiable.

## The estate that breaks the assumption The address variables in a signature encode a building. `$HOME_NET` is the estate; `$EXTERNAL_NET`, usually `!$HOME_NET`, is the rest of the world; a rule written `$EXTERNAL_NET any -> $HOME_NET any` asserts that the attack comes from outside and lands inside. Almost every public rule is written that way. An officeless company breaks it. There is no campus, no server VLAN, no perimeter interface. Every employee is a tunnel client, all clients draw from one pool, and the only aggregation point where a sensor can sit is the hub's inside interface. Whatever the pool is, it is `$HOME_NET`, and now two different things collapse into it. ## Failure one: the traffic that is never evaluated When client A attacks client B across the tunnel, the packet is pool-to-pool. It is home-to-home. It does not select any external-to-home rule group, so those rules are not merely failing to match - they are not candidates. There is no alert, no near-miss, nothing in a rule-profiling report. The sensor is inspecting the traffic and the rule set is looking the other way. This matters more here than in a campus estate, because in an officeless company lateral movement between endpoints is not one path among many. It is close to the only path, and it is the path that runs straight through the hub where the sensor sits. A smaller variant of the same failure: a rule written `$HOME_NET -> $EXTERNAL_NET` to catch outbound command-and-control still works, because the destination genuinely is outside. It is the inbound half of the rule set that has gone quiet. ## Failure two: the fix that costs capacity The reflex is to set `$EXTERNAL_NET: any` and `$HOME_NET: any`. Now every rule is a candidate for every packet. The consequences are mechanical: - Grouping stops discriminating, so the number of rules a packet is considered against goes up sharply. - The multi-pattern pre-filter is now the only cheap filter left in the chain. Its quality suddenly matters: rules whose selected fast pattern is short or common now force full evaluation constantly, whereas before the header had already excluded them. - CPU per packet rises. When it exceeds what the sensor has, packets are dropped before inspection. Dropped packets are the dangerous part, because they are a detection gap that produces no alert. The rule set looks broader than it was, the coverage claim goes up, and the actual inspected fraction of traffic goes down. Nobody notices unless someone is watching capture and drop counters. ## What a competent answer proposes instead **Rebuild the variables, do not delete them.** Even without a building, an address plan can carry meaning: assign the internal service estate a distinct range from the client pool, so `$HOME_NET` for a server-facing rule and the client pool are separate sets and the direction assertion is true again. That is address planning done for the sensor's benefit, and it is legitimate to spend on. **Express direction with what still discriminates.** Where addresses no longer separate roles, service ports and `flow:established,to_server` still do. A rule written around the service and the flow direction survives an address plan that says nothing. **Write the peer-to-peer rules that are now the relevant ones.** The inbound rule set was written for a shape you do not have. Client-to-client scanning, service ports where no client should ever listen, and administrative protocols between endpoints are the signatures that fit this estate. **Widen with a measurement, not a hope.** If a group of rules genuinely must run with broad headers, ship it with a before-and-after on CPU per packet and on drop counters, and a stated capacity ceiling. "We widened the address variables" without those numbers is how a sensor quietly stops inspecting a third of the traffic. ## The interview signal The weak answer is "set them to any and move on". The next weakest is "the rules still work, they just alert more" - they do not still work, because the group was never selected. The strong answer names both failures in the same breath: the coverage that vanished because the topology no longer matches the assertion, and the capacity that vanishes if you fix it by deleting the assertion. Then it proposes an address plan and a measurement, because those are the two things that let a rule set stay both correct and affordable.

  • How would you prove the inbound rules really are idle rather than merely quiet?
    Replay or generate the matching payload between two clients in the pool and confirm nothing fires, then repeat it from an address outside the pool and confirm the same payload does fire. That separates the two candidate explanations - the group was never selected, versus the pattern never appeared - and it is a test you can keep and re-run after any variable change.
  • What do you watch after widening the address variables?
    Capture and drop counters on the sensor, CPU per packet, and rule-profiling output showing which rules now consume the most time. A rise in drops is the number that matters, because dropped traffic is uninspected traffic and it generates no alert to tell you coverage fell.
  • Does the multi-pattern pre-filter save you once the headers are broad?
    Partly, and only if the fast patterns are good. It is one pass over the payload for a whole rule group, so it is far cheaper than evaluating each rule. But rules whose selected pattern is short or ubiquitous now hit constantly and force full evaluation, so a weak fast pattern that was harmless behind a narrow header becomes a per-packet cost.

saying these in an interview costs you the question

  • Sets both variables to any without mentioning capacity
  • Says the rules still fire, just more noisily
  • Assumes home-to-home traffic is covered by inbound rules
  • Ignores drop counters as a coverage measure
  • Treats an address plan as unnecessary without offices

context