agent security skill risk: medium
ModSecurity OWASP CRS Logging Configuration
Provides overview, prerequisites, and step-by-step instructions to configure ModSecurity WAF with OWASP CRS for web application audit logging and SIEM integration.
SKILL 4 files · 2 folders
SKILL.md
--- name: implementing-web-application-logging-with-modsecurity description: "Configure ModSecurity WAF with OWASP Core Rule Set (CRS) for web application logging, tune rules to reduce false" --- # Implementing Web Application Logging with ModSecurity ## Overview ModSecurity is an open-source WAF engine that works with Apache, Nginx, and IIS. The OWASP Core Rule Set (CRS) provides generic attack detection rules covering SQL injection, XSS, RCE, LFI, and other OWASP Top 10 attacks. ModSecurity logs full request/response data in audit logs for forensic analysis and generates alerts that feed into SIEM platforms. ## When to Use - When deploying or configuring implementing web application logging with modsecurity capabilities in your environment - When establishing security controls aligned to compliance requirements - When building or improving security architecture for this domain - When conducting security assessments that require this implementation ## Prerequisites - Web server (Apache 2.4+ or Nginx) with ModSecurity v3 module - OWASP CRS v4.x installed - Log aggregation infrastructure (ELK, Splunk, or Wazuh) ## Steps 1. Install ModSecurity and configure SecRuleEngine in DetectionOnly mode 2. Deploy OWASP CRS v4 and set paranoia level (PL1-PL4) 3. Configure SecAuditEngine for relevant-only logging 4. Tune false positives with SecRuleRemoveById and rule exclusions 5. Switch to blocking mode (SecRuleEngine On) after tuning period 6. Forward audit logs to SIEM for correlation and alerting ## Expected Output ``` ModSecurity: Warning. Pattern match "(?:union\s+select)" [file "/etc/modsecurity/crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "45"] [id "942100"] [msg "SQL Injection Attack Detected via libinjection"] [severity "CRITICAL"] ```
REQUIRED CONTEXT
- web server type and version
- ModSecurity version
- OWASP CRS version
EXPECTED OUTPUT
- Format
- markdown
- Constraints
-
- include overview, when to use, prerequisites, numbered steps, and example log output
EXAMPLES
Includes one example ModSecurity warning log entry.
CAVEATS
- Ambiguities
-
- description is truncated: "tune rules to reduce false"
QUALITY
- OVERALL
- 0.55
- CLARITY
- 0.70
- SPECIFICITY
- 0.55
- REUSABILITY
- 0.35
- COMPLETENESS
- 0.65
IMPROVEMENT SUGGESTIONS
- Complete the truncated description text in the YAML frontmatter.
- Add explicit placeholders or variables for server type, CRS version, and SIEM destination to improve reusability.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR AGENT
- MoltPass Client for AI Agent Identities agent security
- Supply Chain Dependency Risk Auditor agent security
- Supply Chain Dependency Risk Auditor agent security
- Threat Modeling Security Expert agent security
- Security Bluebook Policy Builder agent security
- Security Bluebook Policy Builder agent security
- Security Blue Book Policy Builder agent security
- Threat Modeling Security Architecture Expert agent security
- Supply Chain Dependency Risk Auditor agent security
- Threat Modeling Security Expert agent security
- SIEM Detection Rule Tuning Guide agent security
- AI File Metadata Compliance Auditor agent security
- Azure Storage Misconfiguration Audit Reporter agent security
- Implementing PAM for Database Access agent security
- AFL++ Coverage-Guided Fuzzing Procedure agent security
- Supply Chain Attack Simulation Detector agent security
- Security Audit Fix Verifier agent security
- Active Directory ACL Abuse Analyzer agent security
- Privileged Access Workstation Implementation Guide agent security
- SSRF Vulnerability Testing and Reporting Guide agent security
- Security Audit Fix Reviewer agent security
- AWS IAM Privilege Escalation Detector agent security
- SSL/TLS Security Assessment with Sslyze agent security
- GCP Penetration Testing with GCPBucketBrute agent security
- AWS CloudTrail Anomaly Detection Guide agent security