跳到正文
Skillpedia
分析与电子表格35k · #7664

analyzing-web-server-logs-for-intrusion

它能做什么

这个工具会分析你的网站服务器日志(如 Apache 或 Nginx),找出攻击尝试,例如 SQL 注入、未授权的文件访问或密码猜测(暴力破解)。它能帮你识别是谁在尝试入侵你的网站,以及他们用了什么手段。

适用场景

  • ✓当你怀疑网站遭到攻击时。
  • ✓想检查你的安全系统是否正常工作时。
  • ✓调查服务器日志中的可疑活动时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-web-server-logs-for-intrusion/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-web-server-logs-for-intrusion/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“分析我的网站服务器日志,看看有没有攻击行为。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会读取服务器日志,使用规则匹配已知的攻击模式(例如 SQL 注入中的 'UNION SELECT'),并检查同一位置的访问次数是否过多。它还会为攻击来源补充地理位置信息。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Analyzing Web Server Logs for Intrusion

When to Use

  • When investigating security incidents that require analyzing web server logs for intrusion
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Familiarity with security operations concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

  1. Install dependencies: pip install geoip2 user-agents
  2. Collect web server access logs in Combined Log Format (Apache) or Nginx default format.
  3. Parse each log entry extracting: IP, timestamp, method, URI, status code, response size, user-agent, referer.
  4. Apply detection rules:
    • SQL injection: UNION SELECT, OR 1=1, ' OR ', hex encoding patterns
    • LFI/Path traversal: ../, /etc/passwd, /proc/self, php://filter
    • XSS: <script>, javascript:, onerror=, onload=
    • Scanner signatures: nikto, sqlmap, dirbuster, gobuster, wfuzz user-agents
    • Brute force: >50 POST requests to login endpoints from same IP in 5 minutes
  5. Enrich with GeoIP data and generate a prioritized findings report.
python scripts/agent.py --log-file /var/log/nginx/access.log --geoip-db GeoLite2-City.mmdb --output web_intrusion_report.json

Examples

Detect SQLi in URI

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

Scanner User-Agent Detection

Nikto/2.1.6, sqlmap/1.7, DirBuster-1.0-RC1, gobuster/3.1.0
常见问题

什么是网站服务器日志?

这些文件记录了网站上发生的所有活动,例如谁访问了网站、访问了哪些页面以及访问的时间。

什么是 SQL 注入?

这是一种攻击方式,攻击者试图在表单中插入恶意的 SQL 命令,从而访问或修改你的数据库数据。

什么是 GeoIP 地理信息补充?

这是根据攻击者的 IP 地址,为攻击来源补充地理位置信息(国家、城市)的功能。

详情

作者的原始描述

Parse Apache and Nginx access logs to detect SQL injection attempts, local file inclusion, directory traversal, web scanner fingerprints, and brute-force patterns. Uses regex-based pattern matching against OWASP attack signatures, GeoIP enrichment for source attribution, and statistical anomaly detection for request frequency and response size outliers.

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7664
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能