implementing-web-application-logging-with-modsecurity
하는 일
이 기능은 웹 애플리케이션의 활동을 기록하도록 ModSecurity라는 보안 시스템을 설정하는 데 도움을 줍니다. 인터넷 트래픽을 관리하는 교통경찰처럼, 누가 무엇에 접근하려 하는지 기록하고 의심스러운 활동이 있는지 확인합니다.
사용하는 경우
- ✓웹사이트의 새 보안 시스템을 설치할 때.
- ✓웹사이트에 대한 공격 시도를 조사해야 할 때.
- ✓불필요한 차단을 피하도록 보안 규칙을 세밀하게 조정할 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-web-application-logging-with-modsecurity/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 웹사이트에 대한 SQL 인젝션 공격 시도를 기록하도록 ModSecurity를 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
ModSecurity는 웹사이트로 들어오는 요청을 감시합니다. OWASP CRS라는 규칙 세트를 사용해 악의적인 활동을 식별하고, 나중에 분석할 수 있도록 로그 파일에 기록합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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"]
자주 묻는 질문
ModSecurity란 무엇인가요?
웹사이트를 흔한 공격으로부터 보호하는 웹 애플리케이션 방화벽(WAF) 역할을 하는 프로그램입니다.
OWASP CRS란 무엇인가요?
ModSecurity가 SQL 인젝션이나 XSS 같은 위협을 탐지하고 차단하는 데 사용하는 사전 정의된 보안 규칙 세트입니다.
오탐(false positive)이란 무엇인가요?
보안 시스템이 정상적인 작업을 공격으로 잘못 판단해 차단하는 경우입니다. 규칙을 조정하면 이를 막는 데 도움이 됩니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 35k
- 순위
- #8139
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.