Product updates

Libdetection: Introducing New Generation of Attacks Detection

In the latest version of Wallarm Node, we integrated a new attack detection engine that will work with a combination of current detects. Libdetection is a unique open-source project (https://github.com/wallarm/libdetection), that provides a signature-free payloads detection by implementing a syntax analysis and the base theory of grammars.

Libdetection uses a formal model for attack detection, which allows it to make a decision based on the type of attack. This approach allows us to implement the library without specifying precedents of attacks (without a signature of each specific attack). Here you will not find the files with fingerprints or static rules with regular expressions.

Determination of the attack — the user input (string coming to the input of the library) can be processed as a sequence of data, among which there will be at least one syntax instruction.

For example, in the string 123 union select there are one data token and two instructions (commands). And the string is considered to be an attack. But it’s not complete as there are no names of columns and tables used.

Within the library, each parser state (where line processing begins) is called a context. Contexts are formulated in such a way to reduce the number of false positives of a similar type.

The library supports a variety of contexts (the parser states) with two main groups - injection attacks and commanding attacks. This approach allows us to share all the attacks on the two groups suitable for subsequent analysis and attribution to vulnerabilities in the code.

For example, for phpMyAdmin or similar tools, a set of parameters for query parameters will take attacks such commanding as legitimate. Such attacks will consist entirely of SQL syntax for initial parsing state: ? Query = SELECT id FROM users … . At the same time the defective syntax of SQL injection attacks in these parameters can be easily blocked, for example: ? Query = 123 UNION SELECT id FROM users - a- .

For ease of understanding, you can distinguish injections and commanding attacks in the following way. In the case of injection attacks, at least one user input must be handled entirely as data. In the case of commanding attacks, any user input will contain at least one instruction.

Since the first release 5 years ago, the project continually refined to improve performance and detection quality. Nowadays, an open-source version of libdetection provides the following three syntaxes: SQL, Bash, and Path Traversal. An engine is extendable; therefore, everyone who can create re2c lexers and now about BNF is more than welcome to add HTML, JavaScript, and other grammars relevant to web attacks payloads.

Current tests demonstrate that libdetection dramatically reduces the number of false positives and bypasses against RegEx like ModSecurity CoreRuleSet. We can refer to some statistics in this article https://lab.wallarm.com/testing-modsecurity-for-false-positives-by-books-texts/.

The Wallarm team will continue to improve libdetection and spread its implementation in Wallarm Node.

Recent Posts

Stop Reviewing Your AI Agents. Start Governing Them.

Brookings and the World Economic Forum say agent governance must be continuous, scoped in advance,…

7 days ago

You Can’t Secure the AWS Accounts You Don’t Know About.

Wallarm Infrastructure Discovery Named Enterprise Cloud Security Solution of the Year. Ask an AWS security…

3 weeks ago

AI Governance on AWS: The Runtime Control Loop: AI Governance on AWS: Four Functions, One Loop, and a Deadline That Already Passed

Answer this without checking: how many AI agents are running in your environment right now?…

4 weeks ago

AI Agent Security Readiness: The Federal Standard You Should Get Ahead Of

Here's the uncomfortable part first: in August 2026, researchers found AI agents connected to Hugging…

1 month ago

Dissecting Attacks Is Only Valuable If It Informs Controls: What the Unit 42 agentic AI investigation should change in your control set, stage by stage.

The volume of published incident research involving agentic AI is increasing, and the analysis that…

2 months ago

Lessons from the OpenAI and Hugging Face Incident: When Safety Filters Disarm the Defender

In July 2026, an OpenAI model escaped its evaluation sandbox and broke into Hugging Face's…

3 months ago