Skip to content
Skillv1.0.0

analyzing-web-server-logs-for-intrusion

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 ag

by Josepassinato(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from Josepassinato/Security (customizations/skills/anthropic-cybersec/skills/analyzing-web-server-logs-for-intrusion/SKILL.md). Install upstream with npx skills add Josepassinato/Security --skill analyzing-web-server-logs-for-intrusion. Copyright stays with the author (Apache-2.0).

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

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/josepassinato-security-analyzing-web-server-logs-for-intrusion/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

josepassinato-security-analyzing-web-server-logs-for-intrusion.ocm.jsonjson
{
  "ocm": "1",
  "id": "josepassinato-security-analyzing-web-server-logs-for-intrusion",
  "kind": "skill",
  "name": "analyzing-web-server-logs-for-intrusion",
  "description": "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.",
  "publisher": "Josepassinato",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "data_analysis"
    ],
    "tags": [
      "skill-md",
      "analyzing",
      "web",
      "server",
      "logs",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/Josepassinato/Security",
      "path": "customizations/skills/anthropic-cybersec/skills/analyzing-web-server-logs-for-intrusion/SKILL.md",
      "ref": "065c0e0cfebb3f98d3c07cba0211e1b3d0e3b11b",
      "url": "https://github.com/Josepassinato/Security/blob/065c0e0cfebb3f98d3c07cba0211e1b3d0e3b11b/customizations/skills/anthropic-cybersec/skills/analyzing-web-server-logs-for-intrusion/SKILL.md",
      "key": "Josepassinato/Security/customizations/skills/anthropic-cybersec/skills/analyzing-web-server-logs-for-intrusion/SKILL.md"
    },
    "license": "Apache-2.0"
  },
  "instructions": "# Analyzing Web Server Logs for Intrusion\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing web server logs for intrusion\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Familiarity with security operations concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testi",
  "cost": {
    "context_tokens": 444
  }
}

Fetch it by URL: GET /api/v1/registry/josepassinato-security-analyzing-web-server-logs-for-intrusion/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.