implementing-web-application-logging-with-modsecurity
Qué hace
Esta función te ayuda a configurar ModSecurity, un sistema de seguridad que registra la actividad de las aplicaciones web. Funciona como un control de tráfico de internet: anota quién intenta acceder a qué y si hay actividad sospechosa.
Cuándo usarla
- ✓Cuando instales un nuevo sistema de seguridad para tu sitio web.
- ✓Cuando necesites investigar intentos de ataque contra tu sitio web.
- ✓Para ajustar las reglas de seguridad y evitar bloqueos innecesarios.
Link de la skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-web-application-logging-with-modsecurity/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Configura ModSecurity para registrar los intentos de ataque por inyección SQL en mi sitio web.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
ModSecurity supervisa las peticiones que llegan a tu sitio web. Usa un conjunto de reglas (OWASP CRS) para identificar actividades maliciosas y guarda estos intentos en archivos de registro para analizarlos después.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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
- Install ModSecurity and configure SecRuleEngine in DetectionOnly mode
- Deploy OWASP CRS v4 and set paranoia level (PL1-PL4)
- Configure SecAuditEngine for relevant-only logging
- Tune false positives with SecRuleRemoveById and rule exclusions
- Switch to blocking mode (SecRuleEngine On) after tuning period
- 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"]
Preguntas frecuentes
¿Qué es ModSecurity?
ModSecurity es un programa que actúa como cortafuegos de aplicaciones web (WAF) y protege tu sitio web de ataques habituales.
¿Qué es OWASP CRS?
OWASP CRS es un conjunto de reglas de seguridad predefinidas que ModSecurity usa para detectar y bloquear amenazas como la inyección SQL y el XSS.
¿Qué son los 'falsos positivos'?
Los falsos positivos ocurren cuando el sistema de seguridad bloquea una acción legítima creyendo que es un ataque. Ajustar las reglas ayuda a evitarlo.
Detalles
Descripción original del autor
Configure ModSecurity WAF with the OWASP Core Rule Set (CRS) for web application audit logging, tuning SecRuleEngine, SecAuditEngine, and CRS paranoia levels to reduce false positives, and writing custom SecRules for application-specific threats. Use when deploying or tuning a ModSecurity WAF, analyzing audit logs for attack detection, or reducing CRS false positives.
Popularidad
- Estrellas en GitHub
- 35 mil
- Posición en el ranking
- #8139
- Licencia
- Apache-2.0
- Actualizada
- 31/8/2026
Comentarios
- …
Más skills de este repositorio
abusing-dpapi-for-credential-access
35 milDa a tu agente de IA instrucciones listas para una tarea específica, para que la haga mejor y más rápido.
abusing-shadow-credentials-for-privesc
35 milEnseña a tu agente de IA a escribir textos claros y bien estructurados.
achieving-cmmc-level-2-compliance
35 milAyuda a tu agente a preparar un entorno para el cumplimiento de CMMC Nivel 2. Implementa los requisitos de seguridad y gestiona la documentación necesaria.
acquiring-disk-image-with-dd-and-dcfldd
35 milAyuda a tu agente a crear copias exactas de discos duros. Es útil para asegurar que no se pierda ni altere información durante las investigaciones.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.