#4014·falco

Add DNS events based on observed network traffic

Author: PercivalllCreated Sep 22, 2026Updated Sep 22, 2026
Labelskind/feature

Motivation

Several issues have raised problems with the current DNS resolver-based matching:

A practical use case is matching DNS queries against large lists of malicious domains from threat intelligence feeds. With the current approach, Falco needs to resolve those domains and maintain their IP mappings, even if no monitored process ever queries them. Shared IPs can also cause unrelated connections to match.

At scale, large domain lists deployed across many Falco instances could generate substantial DNS traffic and put pressure on DNS servers. Maintaining and refreshing the cache adds processing and memory overhead, along with dependencies on DNS availability and handling for slow, failed, or changing responses.

Matching observed DNS queries directly against domain IoCs would avoid resolving the entire intelligence feed and more closely reflect the behavior we want to detect.

Feature

Add dedicated DNS events containing the query name, query type, and process context.

My initial thought is to reuse the LKM and modern eBPF network I/O capture paths, parse DNS messages in libsinsp, and generate these events in userspace.

Existing resolver-based behavior would remain available while suitable rules are gradually migrated. Querying a domain and connecting to its IP are different behaviors, so this would not directly replace every existing rule.

Alternatives

Parsing DNS directly in LKM/eBPF is another option. Keeping parsing in userspace would allow both drivers to share the implementation and simplify testing and maintenance.

Additional context

The DNS snaplen work in https://github.com/falcosecurity/libs/pull/2035 seems like a useful starting point.

I'd like to contribute this and would appreciate feedback on the approach. Thx!