Skip to content
Skillpedia
Analysis & spreadsheets35k · #5501

analyzing-web-server-logs-for-intrusion

Helps your agent find intrusion attempts in web server logs. It looks for known attack patterns and unusual activity to identify threats.

What it does

This tool analyzes your web server logs (like Apache or Nginx) to find attack attempts, such as SQL injection, unauthorized file access, or password guessing. It helps identify who is trying to hack your site and how.

When to use it

  • ✓When you suspect your website has been attacked.
  • ✓To check if your security system is working.
  • ✓When investigating suspicious activity in server logs.

Example of what to ask your AI

“Analyze my web server logs for attacks.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-web-server-logs-for-intrusion/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool reads server logs, looks for known attack patterns using rules (like 'UNION SELECT' for SQL injection), and checks for too many access attempts from the same location. It also adds location information for the attacks.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-web-server-logs-for-intrusion

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/analyzing-web-server-logs-for-intrusion/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

What are 'web server logs'?

These are files that record all activity happening on your website, such as who visited, which pages they accessed, and when.

What is 'SQL injection'?

It's a type of attack where an attacker tries to insert malicious SQL commands into form fields to access or modify your database data.

What is 'GeoIP enrichment'?

It's adding information about the geographic location (country, city) where an attack is coming from, based on the attacker's IP address.

Details

Original description by the author

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

Popularity

GitHub stars
35k
Ranking position
#5501
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills