本文へスキップ
Skillpedia
セキュリティ35k · #8139

implementing-web-application-logging-with-modsecurity

できること

この機能は、ModSecurityというセキュリティシステムを設定し、Webアプリケーションの動作をログに記録するためのものです。インターネットの通信を見張る交通整理役のように、誰がどこにアクセスしようとしたか、不審な動きがないかを記録します。

使う場面

  • ✓Webサイトに新しいセキュリティシステムを導入するとき。
  • ✓Webサイトへの攻撃の試みを調査する必要があるとき。
  • ✓不必要なブロックを避けるために、セキュリティルールを微調整したいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-web-application-logging-with-modsecurity/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ModSecurityを設定して、私のWebサイトに対するSQLインジェクション攻撃の試みをログに記録してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

ModSecurityは、Webサイトに届くリクエストを監視します。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

  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"]
よくある質問

ModSecurityとは何ですか?

ModSecurityは、Webアプリケーションファイアウォール(WAF)として動作するプログラムで、一般的な攻撃からWebサイトを守ります。

OWASP CRSとは何ですか?

OWASP CRSは、ModSecurityがSQLインジェクションやXSSなどの脅威を検出して遮断するために使う、あらかじめ用意されたセキュリティルールのセットです。

「誤検知(フォルスポジティブ)」とは何ですか?

正当な動作を攻撃とみなして、セキュリティシステムが誤ってブロックしてしまうことです。ルールを調整することで防ぐことができます。

詳細

作者による元の説明

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

人気

GitHubのスター
35k
ランキング
#8139
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル