analyzing-web-server-logs-for-intrusion

解析 Apache 和 Nginx 访问日志,检测 SQL 注入(SQL Injection)尝试、本地文件包含(Local File Inclusion)、 目录遍历(Directory Traversal)、Web 扫描器指纹及暴力破解(Brute Force)模式。 使用基于正则表达式的模式匹配对照 OWASP 攻击签名、GeoIP 富化进行来源溯源, 以及针对请求频率和响应大小异常值的统计异常检测。

9 stars

Best use case

analyzing-web-server-logs-for-intrusion is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

解析 Apache 和 Nginx 访问日志,检测 SQL 注入(SQL Injection)尝试、本地文件包含(Local File Inclusion)、 目录遍历(Directory Traversal)、Web 扫描器指纹及暴力破解(Brute Force)模式。 使用基于正则表达式的模式匹配对照 OWASP 攻击签名、GeoIP 富化进行来源溯源, 以及针对请求频率和响应大小异常值的统计异常检测。

Teams using analyzing-web-server-logs-for-intrusion should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analyzing-web-server-logs-for-intrusion/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/analyzing-web-server-logs-for-intrusion/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analyzing-web-server-logs-for-intrusion/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analyzing-web-server-logs-for-intrusion Compares

Feature / Agentanalyzing-web-server-logs-for-intrusionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

解析 Apache 和 Nginx 访问日志,检测 SQL 注入(SQL Injection)尝试、本地文件包含(Local File Inclusion)、 目录遍历(Directory Traversal)、Web 扫描器指纹及暴力破解(Brute Force)模式。 使用基于正则表达式的模式匹配对照 OWASP 攻击签名、GeoIP 富化进行来源溯源, 以及针对请求频率和响应大小异常值的统计异常检测。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## 操作说明

1. 安装依赖:`pip install geoip2 user-agents`
2. 以 Combined Log Format(Apache)或 Nginx 默认格式收集 Web 服务器访问日志。
3. 解析每条日志条目,提取:IP、时间戳、方法、URI、状态码、响应大小、user-agent、referer。
4. 应用检测规则:
   - SQL 注入:`UNION SELECT`、`OR 1=1`、`' OR '`、十六进制编码模式
   - LFI/路径遍历:`../`、`/etc/passwd`、`/proc/self`、`php://filter`
   - XSS:`<script>`、`javascript:`、`onerror=`、`onload=`
   - 扫描器签名:nikto、sqlmap、dirbuster、gobuster、wfuzz user-agents
   - 暴力破解:同一 IP 在 5 分钟内向登录端点发送超过 50 次 POST 请求
5. 用 GeoIP 数据富化,生成按优先级排序的发现报告。

```bash
python scripts/agent.py --log-file /var/log/nginx/access.log --geoip-db GeoLite2-City.mmdb --output web_intrusion_report.json
```

## 示例

### 在 URI 中检测 SQL 注入(SQLi)
```
192.168.1.100 - - [15/Jan/2024:10:30:45 +0000] "GET /products?id=1' UNION SELECT username,password FROM users-- HTTP/1.1" 200 4532
```

### 扫描器 User-Agent 检测
```
Nikto/2.1.6, sqlmap/1.7, DirBuster-1.0-RC1, gobuster/3.1.0
```

Related Skills

securing-serverless-functions

9
from killvxk/cybersecurity-skills-zh

本技能涵盖 AWS Lambda、Azure Functions 和 Google Cloud Functions 等无服务器计算平台的安全加固,涉及最小权限 IAM 角色、依赖漏洞扫描、密钥管理集成、输入验证、函数 URL 认证以及运行时监控,以防范注入攻击、凭证窃取和供应链攻击。

securing-historian-server-in-ot-environment

9
from killvxk/cybersecurity-skills-zh

本技能涵盖在OT环境中加固和保护过程历史数据服务器(OSIsoft PI、Honeywell PHD、GE Proficy、AVEVA Historian)。涉及跨Purdue模型各层级的网络部署、历史数据服务器接口的访问控制、通过数据二极管或PI-to-PI连接器在DMZ中进行数据复制、历史数据查询中的SQL注入防护,以及用于安全分析、法规报告和过程优化的过程数据完整性保护。

performing-serverless-function-security-review

9
from killvxk/cybersecurity-skills-zh

对 AWS Lambda、Azure Functions 和 GCP Cloud Functions 中的无服务器函数(Serverless Function)执行安全审查,识别过度宽松的执行角色(Execution Role)、不安全的环境变量、注入漏洞和缺失的运行时保护措施。

performing-physical-intrusion-assessment

9
from killvxk/cybersecurity-skills-zh

通过尾随、门禁卡克隆、锁具绕过和流氓设备部署,执行授权的物理渗透测试,以评估设施安全控制措施的有效性。

implementing-taxii-server-with-opentaxii

9
from killvxk/cybersecurity-skills-zh

部署和配置 OpenTAXII 服务器,使用 TAXII 2.1 协议共享和消费 STIX 格式的网络威胁情报,实现组织间的自动化指标交换。

implementing-network-intrusion-prevention-with-suricata

9
from killvxk/cybersecurity-skills-zh

使用自定义规则、Emerging Threats 规则集和内联流量检测部署和配置 Suricata 作为网络入侵防御系统,实现实时威胁阻断。

implementing-delinea-secret-server-for-pam

9
from killvxk/cybersecurity-skills-zh

为特权访问管理(PAM)实施 Delinea Secret Server,包括 密钥库配置、基于角色的访问策略、自动密码轮换、 会话录制,以及与 Active Directory 和云平台的集成。 适用于 PAM 部署、特权凭据保管、 密钥服务器管理或密码轮换自动化相关请求。

hunting-for-webshells-in-web-servers

9
from killvxk/cybersecurity-skills-zh

通过扫描高熵值文件、可疑的 PHP/JSP/ASP 模式(eval、base64_decode、system、passthru)、 Web 根目录中近期修改的文件以及异常文件大小,检测植入 Web 服务器的 Webshell(网页后门)。 使用香农熵(Shannon entropy)计算标记混淆载荷,并通过正则表达式模式匹配已知 Webshell 特征。

hunting-for-lolbins-execution-in-endpoint-logs

9
from killvxk/cybersecurity-skills-zh

通过分析终端进程创建日志,识别合法 Windows 系统二进制文件(LOLBin)被用于恶意目的的可疑执行模式,狩猎攻击者的 LOLBin 滥用行为。

extracting-windows-event-logs-artifacts

9
from killvxk/cybersecurity-skills-zh

使用 Chainsaw、Hayabusa 和 EvtxECmd 提取、解析和分析 Windows 事件日志(EVTX),以检测横向移动、持久化和权限提升。

exploiting-server-side-request-forgery

9
from killvxk/cybersecurity-skills-zh

在授权渗透测试中识别并利用 SSRF 漏洞,访问内部服务、云元数据及受限网络资源。

detecting-sql-injection-via-waf-logs

9
from killvxk/cybersecurity-skills-zh

分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。