Chuyển đến nội dung
Skillpedia
Bảo mật35k · #8139

implementing-web-application-logging-with-modsecurity

Skill này làm gì

Tính năng này giúp thiết lập hệ thống bảo mật ModSecurity để ghi nhật ký hoạt động trên ứng dụng web. Nó hoạt động như một người gác giao thông internet, ghi lại ai cố truy cập gì và có hoạt động đáng ngờ hay không.

Khi nào nên dùng

  • ✓Khi cài đặt hệ thống bảo mật mới cho trang web của bạn.
  • ✓Khi cần điều tra các lần cố tấn công trang web của bạn.
  • ✓Để tinh chỉnh quy tắc bảo mật và tránh chặn không cần thiết.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-web-application-logging-with-modsecurity/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-web-application-logging-with-modsecurity/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thiết lập ModSecurity để ghi nhật ký các lần cố tấn công SQL Injection vào trang web của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

ModSecurity theo dõi các yêu cầu gửi đến trang web của bạn. Nó dùng một bộ quy tắc (OWASP CRS) để nhận diện hoạt động độc hại và ghi các lần cố này vào tệp nhật ký để phân tích sau.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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"]
Câu hỏi thường gặp

ModSecurity là gì?

ModSecurity là chương trình hoạt động như tường lửa ứng dụng web (WAF), bảo vệ trang web khỏi các cuộc tấn công phổ biến.

OWASP CRS là gì?

OWASP CRS là bộ quy tắc bảo mật có sẵn mà ModSecurity dùng để phát hiện và chặn các mối đe dọa như SQL injection và XSS.

“False positives” là gì?

Đó là khi hệ thống bảo mật chặn một hành động hợp lệ vì nhầm nó là tấn công. Điều chỉnh quy tắc giúp tránh việc này.

Chi tiết

Mô tả gốc của tác giả

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.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8139
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự