Martin Monzon

When the labels come from an LLM

Research notes on WAF alert triage when the analyst verdicts in a security operations center are produced by language models. Work in progress, October 2026.

The problem

A web application firewall (WAF) sends a large number of alerts to a security operations center (SOC). Many of these alerts are false positives: legitimate requests that match an attack rule. Analysts cannot examine every alert, so real attacks can stay hidden in the queue.

A model can sort the queue, but a supervised model needs reliable labels. The usual source of labels is the analysts' own verdicts: this alert was an attack, that one was not. My thesis started from that assumption. The assumption did not hold.

What I observed

In the production SOC that I studied, analysts now give much of the alert investigation to LLMs. The verdict in the ticket is often the output of a model, accepted by a person. This has three consequences for anyone who wants to learn from those verdicts.

This is not a criticism of the analysts. Alert volume is high and the tools are useful. The problem is structural: as AI systems take part in security work, the ground truth that we use to train and evaluate the next system is produced, in part, by the previous one.

The label loop An alert goes to an LLM, which gives a verdict. The verdict is stored as a label. The label trains the next triage model, which then sorts new alerts. Independent ground truth from people does not enter the loop. WAF alert LLM verdict Stored label Triage model independent ground truth does not enter the loop
The label loop. Each step is useful by itself. Together, the steps remove the independent signal that training and evaluation depend on.

The approach: weak supervision

If no single source of labels is reliable, one option is to combine several imperfect sources and model their agreement and their errors. This is weak supervision, in the line of data programming and Snorkel. In my thesis the sources include:

The method only works if the sources are reasonably independent. Vendor fields that are calculated from each other, for example a severity rating derived from the same rule matches, must not count as separate votes. Otherwise the combination gives the same error more weight, not less.

To measure the method honestly, I evaluate it on public labeled datasets of web attacks, where the ground truth does not come from an LLM. Production data is used only offline, and never in public outputs.

The lab

The demonstrator is a small, realistic stack: Nginx with ModSecurity and the OWASP Core Rule Set in front of a test web application, a triage model after the WAF, and a Wazuh SIEM that collects all events. Two dashboards read the same index: one sorted by the WAF's own signals, one sorted by the model. Labeled attack traffic and normal traffic are replayed against the stack.

Lab architecture. A legitimate client sends benign traffic and an attacker sends CICIDS web attacks to Nginx with ModSecurity, which runs the OWASP Core Rule Set in detection-only mode. Requests that the WAF does not flag go to the web application, which uses a SQL database. Flagged requests go to an ML classifier for alert triage. Predicted true positives are blocked with HTTP 403. Predicted false positives are quarantined for review and can be released to the application. The WAF audit log, the classifier's predictions and the application logs go to a Wazuh SIEM, which feeds dashboard A, a baseline with WAF alerts only, and dashboard B, with ML-prioritized alerts.
Lab architecture: ML triage of ModSecurity alerts, with Wazuh SIEM telemetry and baseline versus ML-prioritized dashboards.

The lab already gave three design lessons.

A dataset lesson

Popular intrusion-detection datasets in CSV form contain network flow statistics, not HTTP request content. A WAF examines request content, so these files alone cannot feed it. Engelen and colleagues showed that a widely used benchmark also contains labeling and flow-extraction errors that change the measured performance of detectors. The same lesson applies here as in production: when the labels are wrong, the evaluation is wrong.

Open questions

Status

This is my engineering thesis at Universidad Católica “Nuestra Señora de la Asunción” in Paraguay, with a planned defense in March 2027. With my advisors, I plan to submit a paper on this work to CLEI. Numerical results will follow when the experiments are complete. I will not publish results that I have not measured.

Back to the home page