skip to content

NGFW & WAF

You will learn what makes a firewall 'next-generation' — application and user awareness, deep packet inspection, TLS interception — and how WAFs like ModSecurity with the OWASP Core Rule Set defend HTTP traffic. Interviewers use it to test whether you understand layer-7 defense and the trade-offs of breaking TLS to inspect it.

on this pageshow

explore

questions

page 1 of 2

A WAF at a rented edge fronts your public site — what does it stop for an attacker who has the origin's own address?

level: juniorimportance: must knowfreq 70%

answer

  1. ask what the request must traverse
  2. the edge sees one route in
  3. the origin still answers its own address
  4. public certificate logs enumerate names
  5. state coverage as a path, not a service

basics

~20 s

An edge WAF judges only requests that arrive through the hostname it fronts. An attacker who addresses the origin directly never crosses it, so the honest claim is coverage of one path, not protection of the service.

solid answer

~50 s

A request-judging control reaches a verdict on traffic that passes through it, and nothing else. When it sits at a rented edge, traffic gets there because the public hostname resolves to the provider's addresses — but the origin still has an address of its own and still answers requests sent to it with a `Host` header for the site. That attacker is past the control entirely, and no rule, paranoia level or tuning at the edge changes it. I would treat the origin address as discoverable rather than secret: Certificate Transparency logs publish every hostname a certificate was issued for, historical DNS records outlive a migration, and a mail or status host often still points at the same infrastructure. So the sentence I give a risk owner is conditional — requests arriving via the fronted hostname are judged, requests arriving by any other route are not — plus an inventory of what the origin answers on.

code

text · 10 lines
text
# via the fronted hostname -> resolves to the edge, judged there
GET /login HTTP/1.1
Host: shop.example.com
...

# sent straight to the origin's own address, same Host header
# the edge is not on this path and never sees it
GET /login HTTP/1.1
Host: shop.example.com
...

go deeper

for a junior

Be ready to say plainly that a control only judges traffic that goes through it, and that an origin with its own reachable address is a second way in. Naming that gap out loud is what the question is testing.

for a middle

Explain how traffic gets to the edge at all — the public hostname resolving to the provider's addresses — and therefore which changes on your side create a route that skips it: a second region, an exception hostname, a new API host.

for a senior

Show the operating habit: assume the origin address is discoverable, keep an inventory of everything the origin answers on, and give the risk owner a conditional coverage statement rather than a reassuring one.

for a principal

Own the framing that coverage is bought per path, so every new public entry point is a new purchase. Be able to say who funds and reviews that inventory and what you will not claim in a customer questionnaire.

## The claim a position can actually make A WAF, or any control that reaches a verdict on one request at a time, judges the requests that traverse it. That sounds too obvious to say, and it is the assumption most often broken in this design, because the phrase everyone uses is *the site is behind a WAF* — a sentence shaped like a property of the site. It is not a property of the site. It is a property of **one path to the site**. When the control is *ahead* — at a rented edge someone else operates — traffic reaches it because the public hostname resolves to that provider's addresses. Your origin (a load balancer, a server, a container ingress) has an address of its own and it has not stopped listening. Virtual hosting means it will serve the right application to anyone who supplies the matching `Host` header. So the same request that the edge would have scored, sent straight to the origin address, arrives unjudged. ## Why the origin address is not a secret Plan on the address being known, because every route to it is cheap: - **Certificate Transparency**: every publicly trusted certificate is logged with the hostnames it covers, so subdomains nobody advertised are enumerable, and one of them frequently resolves to the origin. - **Historical DNS**: records from before the edge was adopted are archived by third parties and do not expire from anyone's memory. - **Sibling hosts**: mail, status, staging, an old admin host — often the same infrastructure, often never moved behind the edge. - **The origin talking first**: an error page, a redirect to an absolute URL, a mail header, or an outbound connection the origin makes can carry its address. - **Scanning**: the address space is small enough to sweep for a TLS certificate or a response body that matches your site. The correct posture is not *they will never find it*; it is *assume they have it, and say what that means*. ## The other paths that miss the control The direct address is only the most obvious one. In a real estate the same failure arrives as: - a **second region** or a second public address stood up during a migration and never fronted; - an **admin or internal hostname** pointed straight at the origin because the edge broke a long upload or a long-lived connection, and the exception was never revisited; - an **API host** added after the edge was adopted, by a team that did not know the edge existed; - **non-HTTP ports** the origin listens on, which a request-judging control does not look at from any position. Each of those is created by your own side, not the attacker's, which is why the inventory has to be refreshed rather than written once. ## What this costs, and who pays it The price of a position is not only latency and money. It is the obligation to state coverage honestly and keep the statement true. From the chair that has to tell a risk owner what the control does **not** stop, the deliverable is two things: a sentence — *requests arriving via the fronted hostname are judged* — and a list of every address and hostname the origin still answers on, owned by a named person and reviewed when the estate changes. That is a standing review burden, and it is uncomfortable because it converts a reassuring sentence into a conditional one. Skipping it does not remove the exposure; it removes your knowledge of the exposure. Closing the direct path is a control on the origin's side of the network — who may address the origin at all — not something the WAF can do from where it stands. That is a different surface and a different team; from here the job is to name the gap, not to pretend the edge covers it. ## Get the direction of the claim right An alert firing at the edge proves that **a** request crossed the edge and was scored. It never proves that **all** requests do. Absence of alerts is equally silent: it is consistent with a quiet week, with a rule that no longer matches, and with traffic that stopped arriving at the edge at all. Coverage is a property of the path, so every claim about it has to name the path.

  • How would an attacker find the origin's address in the first place?
    Assume it is findable. Certificate Transparency logs publish every hostname a certificate was issued for, historical DNS records survive the migration to the edge, a mail or status host often resolves to the same infrastructure, and an error page, a redirect or the origin's own outbound connections can leak it. Scanning for a matching certificate or response is cheap. Design as if the address is public.
  • Who owns closing that path, and what do you owe the risk owner if it stays open?
    It is a control on the origin's side of the network — who is allowed to address the origin — not something a WAF can do from the edge. From your chair the deliverable is written: exactly what is judged (requests via the fronted hostname), what is not, and an inventory of every address and hostname the origin still answers on, with an owner and a review trigger when the estate changes.
  • Does the same blind spot exist for a proxy you run inside your own network?
    Yes in kind — any position judges only what is routed through it. The difference is who creates the miss. With a proxy you run, the paths that bypass it come from your own routing and DNS changes, so you can find and fix them; with a rented edge ahead, the shape of the path is set by a provider's model and your origin's exposure is the part you still own.

A doorman covers the entrance he stands in. The building is only as covered as the doors that lead through him — the loading bay is not his problem, and saying the building has a doorman does not change that.

saying these in an interview costs you the question

  • Says the site is protected because DNS points at the edge
  • Assumes an attacker cannot discover the origin's address
  • Treats a WAF as a property of the application, not of a path
  • Promises a risk owner blanket coverage without naming the route
  • Thinks tuning rules at the edge can cover a path that misses it

context

open as a page

A WAF rule blocking one payload stands in for an unshipped fix — what has it changed about the bug, and what does keeping it cost?

level: juniorimportance: must knowfreq 70%

basics

~20 s

A stopgap WAF rule changes nothing about the bug. The code is still vulnerable; only requests matching that pattern, arriving through that proxy, are stopped. It costs a permanent rule nobody owns and a fix that stops feeling urgent.

open as a page

How does software learn an egress proxy exists, and why is the exception for an agent that cannot be told one useful to an implant?

level: juniorimportance: must knowfreq 65%

basics

~20 s

Software learns a proxy from an operating-system setting, a PAC file located by WPAD, or proxy environment variables. An agent with a hard-coded destination reads none of them, so you write a direct-egress exception every process on that host inherits.

open as a page

Why can a server segment hold an outbound destination allow-list when a user segment never can, and what does that give an intruder?

level: juniorimportance: must knowfreq 62%

basics

~20 s

A server segment talks to a finite, owned set of destinations that changes under change control, so it can be enumerated. A user population needs the whole internet, so no allow-list holds. Malware landing there leaves unblocked.

open as a page

A branch office's filtering DNS resolver blocks a malicious name — what has to be true for that block to apply?

level: juniorimportance: must knowfreq 62%

basics

~20 s

The endpoint has to send that query to your resolver. A filtering resolver is a control the client opts into: a host that asks a different resolver, or ships its own, is never offered the block.

open as a page

Why must an application-aware firewall pass a flow's first packets before naming the application, and what does that hand an adversary?

level: juniorimportance: must knowfreq 72%

basics

~20 s

Identifying an application needs evidence, and the evidence is the traffic itself. The device reassembles and inspects the opening bytes before it can commit to a name, so those packets have already reached the far end when a deny finally fires.

open as a page

Your inspection proxy's private root sits in every managed laptop's trust store: what can a key holder do, and what does it commit you to?

level: juniorimportance: must knowfreq 65%

basics

~20 s

A root your devices trust covers any hostname, not only the sites you inspect. Whoever holds its key can impersonate any site to your fleet, so you now run a certificate authority and must guard the key like one.

open as a page

An unmanaged client uses encrypted client hello through your border — what survives as evidence of its destination, and what does that fallback cost you?

level: juniorimportance: must knowfreq 60%

basics

~20 s

You keep the destination address and port, packet sizes, direction and timing, plus an outer name identifying a shared front rather than the real site. The true server name is gone, and TLS 1.3 encrypts the certificate too.

open as a page

What does a firewall's user-to-address mapping actually prove about who sent a packet?

level: juniorimportance: must knowfreq 70%

basics

~20 s

Only that some identity source associated that address with a user earlier, and the association has not yet expired. The packet itself carries no identity, so whoever is using that address next inherits the name.

open as a page

How does the OWASP Core Rule Set's anomaly score decide a refusal, and what room does a raised threshold give an attacker?

level: middleimportance: must knowfreq 60%

basics

~20 s

Each matching Core Rule Set rule adds points by severity (critical 5, warning 3, notice 2); the request is refused only when the total reaches the inbound threshold, 5 by default. Every point added to it is attacker headroom.

open as a page

How do you choose the timeout on a user-to-address mapping, and what breaks in each direction?

level: middleimportance: must knowfreq 62%

basics

~20 s

Set it below the shortest interval in which an address can change hands. Too long and the next holder inherits the departed user's rules and name. Too short and you evict live users into the unknown-user rule.

open as a page

One route breaks under the Core Rule Set at paranoia level 2: drop the level, raise the threshold, or exclude the rule - which gives an attacker least?

level: seniorimportance: must knowfreq 50%

basics

~20 s

A narrowly scoped exclusion, that rule on that path for that one parameter, gives an attacker least: every other rule, route and field keeps its protection. Dropping the fleet level or raising the shared threshold weakens everyone.

open as a page

In the OWASP Core Rule Set, what attacker requests does paranoia level 2 catch that PL1 lets through, and what does that cost?

level: juniorimportance: should knowfreq 45%

basics

~20 s

Every Core Rule Set rule carries a paranoia-level tag, and the configured level decides which rules run at all. PL2 adds looser-fitting rules that catch obfuscated payloads PL1 misses, and those same rules match legitimate requests too.

open as a page

A WAF rule matches the exact payload from one incident report — what does an attacker send instead, and what does widening it cost?

level: middleimportance: should knowfreq 58%

basics

~20 s

A rule built from one captured sample encodes the attacker's spelling, not the bug. The same input re-encoded, moved into a body the proxy does not parse, split across parameters or sent to another route gets through. Widening the pattern buys false positives on partner traffic you cannot test.

open as a page

Transparent redirection sends an unproxyable agent's 443 traffic to the proxy - what breaks, and what does an implant on that host still get?

level: middleimportance: should knowfreq 50%

basics

~20 s

Redirection helps only where the client tolerates interception. Pinned certificates, client-certificate authentication and non-HTTP traffic on 443 fail outright; QUIC on UDP/443 is untouched. Each failure ends in the per-device exemption an implant can use.

open as a page

After enforcing default-deny egress on a server segment, what does a border deny record prove and what can it never show?

level: middleimportance: should knowfreq 52%

basics

~20 s

A deny record proves a host tried to reach a destination the allow-list does not contain and that the packet was dropped. It does not prove malice, carries no payload, usually carries no hostname, and stays silent about everything the list already permits.

open as a page

Your resolver answers NXDOMAIN for use-application-dns.net to switch browsers off DoH — why doesn't that keep an implant in your filter?

level: middleimportance: should knowfreq 46%

basics

~20 s

Because the canary is a request that only cooperating software honours. A browser checks that name and voluntarily falls back to the system resolver; an implant with a hard-coded DNS-over-HTTPS endpoint never asks, and never sees the signal.

open as a page

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%

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.

open as a page

Your TLS decryption exemption list has grown to two hundred destinations — what has that cost, and how would an intruder use it?

level: middleimportance: should knowfreq 52%

basics

~20 s

Each entry is a permanent unread path, and the list only grows because removal means proving nothing breaks. An intruder just picks a destination already covered: the bypass verdict uses the name the client claims.

open as a page

Your rented-edge WAF degrades during an attack, and failing away to the origin removes the control — how do you decide this beforehand?

level: seniorimportance: should knowfreq 52%

basics

~20 s

Decide the posture before the incident, because during it you have a DNS TTL you cannot shrink retroactively, an attacker already engaged, and an irreversible act: publishing the origin address cannot be undone. Choose in advance between staying degraded behind the edge and a fallback position you already run.

open as a page

A WAF stopgap outlived the vendor fix it covered — what evidence would let you delete the rule, and what does producing it cost?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Only request-level evidence counts: with the rule bypassed, the fixed build must reject the archived incident sample and its variations on its own. Release notes and a quiet partner are not evidence. It costs a testable build from the vendor, an archived sample, and a window in which you carry the risk.

open as a page

A machine-tool vendor's agent needs direct egress - how do you write that exception so an implant on the same host cannot live in it?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Narrow it on every axis the filter offers - one source address, the vendor's actual destinations, one port and protocol, a schedule if the agent has one - then build the watch on flow records and handshake names, since no proxy log exists.

open as a page

Your user segment can never hold a destination allow-list - what do you still enforce at its border against an implant, and at what price?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Stop enumerating destinations and enumerate paths instead: deny direct outbound from that segment and permit only the inspected proxy path plus the few internal services it needs. You buy one choke point with identity and a record rather than denial, and you pay in capacity, failure posture and exceptions.

open as a page

You block public DoH and DoT resolvers at a branch edge — what does that list cost to hold, and where does it fail?

level: seniorimportance: should knowfreq 37%

basics

~20 s

DoT is cheap to block: it has its own port, 853. DoH hides on 443, so you hold an address list that is never complete, breaks software quietly depending on a public resolver, and never reaches a self-hosted endpoint.

open as a page

A tenant's unclassified-traffic bucket grows weekly and nobody owns an application inventory — how do you name what is in it?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Rank by volume and endpoint pair, then read host role, who owns the far end, byte direction and session shape. That narrows the candidates but never names them: a flow record carries no payload. The application's owner names it; you record it.

open as a page

You add name constraints to your private inspection root so a stolen key cannot mint certificates for banking sites: where does that assurance hold, and what does maintaining it cost?

level: seniorimportance: should knowfreq 35%

basics

~20 s

Name constraints bind the validating client, not the CA. A compliant validator rejects excluded names, and a key thief cannot strip the constraint from the copy already in your trust stores. Non-enforcing clients and unconstrained name types get nothing.

open as a page

Your inspection root's private key may have left with a departing engineer: what can they now do, and what does replacing that root cost?

level: seniorimportance: should knowfreq 45%

basics

~20 s

They can impersonate sites to any managed device, on any network, with no warning. A root cannot be revoked, since clients never check revocation for a trust anchor, so recovery means removing it from every trust store.

open as a page

A business application moved to QUIC on UDP/443, and so did a channel you did not authorise — what are your options and what does each cost?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Three options, each with a bill: deny UDP/443 and force fallback, which breaks clients that cannot; allow it unread, making that path the preferred one; or inspect QUIC, paying capacity and state broken by connection migration.

open as a page

The user-mapping feed stalls mid-shift and entries expire: what should enforcement do?

level: seniorimportance: should knowfreq 45%

basics

~10 s

Neither blanket allow nor blanket deny. Detect the stall, freeze existing mappings instead of letting them expire, and send unattributed traffic to a designed restricted policy rather than to a catch-all nobody chose.

open as a page

Six months after default-deny egress went live, exception turnaround is nine days and a department head is escalating. What do you fix?

level: principalimportance: should knowfreq 36%

basics

~20 s

Fix the queue, not the rule. A nine-day turnaround turns every deadline into an escalation, and escalations are granted by people who never read a rule base - which produces the permanent broad permit the policy existed to prevent.

open as a page

showing 1–30 of 39