Search arXiv⌕ Search

arXiv · 2612.04641

GenWebSec: Adaptive Web Application Firewall Hardening with Co-Evolving LLM Attack and Defense Agents

Abstract

Large language models (LLMs) enable attackers to rapidly generate and adapt exploit payloads in response to defensive updates, outpacing manual web application firewall (WAF) rule maintenance. Evaluating automated defenses solely against static attack corpora leaves open whether synthesized rules remain compact and effective when attackers adapt. We present GenWebSec, an execution-grounded framework that pairs LLM attack and defense agents in a closed WAF hardening loop. Generated exploits are validated through live application execution and WAF replay; the defender then synthesizes rules individually or in groups under coverage-checked admission and strict benign false-positive bounds before renewed attack search challenges the updated defense. Across six custom SQL injection (SQLi) and cross-site scripting (XSS) targets protected by ModSecurity WAF with OWASP Core Rule Set (CRS) 4.29.0, 78.0-99.6% of application-valid payloads bypassed CRS, and every confirmed bypass also evaded Coraza and BunkerWeb WAFs under the same ruleset. On matched fixed corpora, grouped synthesis reduced median rule counts from 93.5-297 (per-payload) to 1-3 per page while blocking 99.6-100% of bypasses. Under iterative adaptive hardening, renewed search found post-update bypasses in 19 of 60 runs, yet grouped hardening converged to a median of one rule per run (range 1-4), blocked 2,420 of 2,421 in-loop bypasses, and kept mean added false positives at or below 0.28%. Frozen rules generalized across attack models (blocking 96.3-100% of attacks from a different LLM) and transferred unchanged to unseen applications (bWAPP and OWASP Juice Shop), blocking 89.4-94.9% of SQLi and 97.6-97.7% of XSS bypasses (on bWAPP) with zero added false positives on external benign traffic.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Vahid Babaey, Arun Ravindran. 2026-12-02. GenWebSec: Adaptive Web Application Firewall Hardening with Co-Evolving LLM Attack and Defense Agents. https://searcharxiv.org/abs/2612.04641

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)

Distributed Denial of Service (DDoS) attacks remain a persistent threat to the availability of Internet services, edge networks, and cyber-physical infrastructure. Although recent AI-security work has increasingly focused on foundation models, autonomous agents, and adversarial robustness, many operational defense tasks still require low-latency classification close to the network edge, where cloud-scale analysis may be too slow or expensive. This paper presents a lightweight supervised deep learning approach for DDoS detection using a convolutional neural network (CNN) trained on packet-flow representations derived from the CIC-DDoS2019 benchmark dataset. The proposed pipeline extracts packet flows from PCAP traffic, normalizes them to fixed-length representations, and classifies each flow as benign or malicious using a compact CNN architecture with convolution, dropout, pooling, and sigmoid classification layers. On a held-out test set of previously unseen flows, the model achieves 0.9883 accuracy, 0.9864 precision, 0.9784 recall, and 0.9824 F1 score, while processing the evaluated test flows in 0.28 seconds. These results suggest that compact neural models can provide useful early-warning signals for edge-oriented DDoS detection. We further discuss deployment constraints, benchmark limitations, and future directions for cross-dataset evaluation, hardware-aware profiling, and integration with mitigation pipelines.

cs.CR↗

LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution

LLMs are increasingly explored for malware analysis; however, current LLM-based malware attribution remains limited by unsupported indicators and insufficient code-level grounding for identifying malicious and vulnerable code segments. To address these limitations, this research introduces LCC-LLM, a code-centric benchmark dataset and evidence-grounded framework for malware attribution and multi-task static malware analysis. The proposed LCCD dataset contains approximately 34K PE samples processed through a large-scale reverse-engineering pipeline and represented using decompiled C code, assembly code, CFG/FCG artifacts, hexadecimal data, PE metadata, suspicious API evidence, and structural features. Beyond dataset construction, LCC-LLM integrates LangGraph-orchestrated static analysis with multi-source cybersecurity knowledge to support evidence-grounded malware reasoning. The framework employs a seven-layer retrieval-augmented generation pipeline, CoVe for IoC validation, and a multi-dimensional quality gate to improve factual reliability and analyst-oriented decision support. Curriculum-ordered instruction data is used to fine-tune DeepSeek-R1-Distill-Qwen-14B and Qwen3-Coder-30B-A3B using QLoRA. Evaluation across 43 malware-analysis task types achieves an average semantic similarity of 0.634, with the highest task-level performance in structured report generation, IoC extraction, vulnerability assessment, malware configuration extraction, and malware class detection. In a real-world case study using MalwareBazaar samples, the grounded pipeline achieves a 10/10 structured analysis pass rate, producing CFG/FCG evidence, MITRE ATT&CK mappings, detection guidance, and analyst-ready reports. These results show that code-centric representations, retrieval grounding, and verification-guided reasoning improve the reliability and operational usefulness of LLM-assisted malware attribution.

cs.CR↗

PromptPET: Prompt Obfuscation Against Profiling by AI Agents

Privacy is an important challenge when users interact with AI agents, since users share sensitive information, explicitly or implicitly, and AI agents provider can use this information for user profiling. In this paper, we aim to protect user privacy via a user-side approach that obfuscates sensitive information in a user prompt before it is sent, while preserving enough information to elicit a useful response from the chatbot. This approach faces an inherent tradeoff: what an AI agent needs to produce a personalized and detailed response is largely what it uses to profile the user. To that end, we consider, evaluate, and compare four different obfuscation actions, namely redact, abstract, replace, and a novel decoy that we introduce, which keeps the true information, hides it among plausible alternatives that the online AI agent answers separately, and retains only the answer to the true one. First, we systematically evaluate each obfuscation action independently in terms of the privacy-utility tradeoff it achieves. Second, we propose PromptPET, which follows a decision rule set to select an obfuscation action for each sensitive unit based on the unit context. The rule set is searched by an LLM-based optimizer that iteratively proposes and refines rules based on their measured privacy and utility. On real user queries, PromptPET delivers 3.3x more privacy per unit of utility cost than the strongest prior approach and reaches 1.4x higher privacy. Its advantage holds at the user level, where the provider accumulates a profile across all of a user queries.

cs.CR↗