Chuyển đến nội dung
Skillpedia
Bảo mật35k · #7792

detecting-anomalous-authentication-patterns

Skill này làm gì

Công cụ này phân tích nhật ký đăng nhập của người dùng để tìm các hoạt động truy cập bất thường hoặc đáng ngờ. Nó tìm các mẫu có thể cho thấy tài khoản đã bị xâm nhập hoặc đang bị truy cập độc hại.

Khi nào nên dùng

  • ✓Khi bạn nghi ngờ tài khoản người dùng đã bị xâm nhập.
  • ✓Để kiểm tra xem người dùng có đăng nhập từ các vị trí địa lý không thể có trong thời gian ngắn không.
  • ✓Để phát hiện các cuộc tấn công hàng loạt như brute force hoặc credential stuffing.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-anomalous-authentication-patterns/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-anomalous-authentication-patterns/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra các mẫu đăng nhập bất thường trong nhật ký xác thực.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ so sánh các lần đăng nhập hiện tại với hành vi bình thường đã được ghi nhận trước đó, bằng trí tuệ nhân tạo và phân tích thống kê. Nếu một lần đăng nhập khác biệt nhiều so với bình thường (như đến từ một quốc gia khác chỉ trong vài phút), nó sẽ bị đánh dấu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Detecting Anomalous Authentication Patterns

When to Use

  • Security operations needs to identify compromised accounts from authentication log analysis
  • Implementing impossible travel detection to flag geographically inconsistent logins
  • Detecting brute force, password spraying, and credential stuffing attacks in real time
  • Building behavioral baselines for users to identify deviations indicating account compromise
  • Correlating authentication anomalies with threat intelligence for lateral movement detection
  • Investigating alerts from SIEM or IdP for suspicious sign-in activity

Do not use for static rule-based alerting on single failed logins; anomaly detection requires statistical baselines across time and entity dimensions to reduce false positives.

Prerequisites

  • Authentication log sources (Azure AD/Entra ID sign-in logs, Okta system logs, Active Directory event logs 4624/4625/4648/4768/4771)
  • SIEM platform (Splunk, Microsoft Sentinel, Elastic SIEM) with at least 90 days of baseline data
  • GeoIP database for location-based anomaly detection (MaxMind GeoLite2 or IP2Location)
  • Python 3.9+ with pandas, scikit-learn, and scipy for custom analytics
  • User identity context (department, role, typical work hours, location)

Workflow

Step 1: Collect and Normalize Authentication Logs

Aggregate authentication events from all identity sources:

import pandas as pd
import json
from datetime import datetime, timedelta
from collections import defaultdict

# Parse authentication logs from multiple sources
def normalize_auth_logs(log_source, raw_logs):
    """Normalize authentication events to a common schema."""
    normalized = []

    for event in raw_logs:
        if log_source == "azure_ad":
            normalized.append({
                "timestamp": event["createdDateTime"],
                "user": event["userPrincipalName"],
                "source_ip": event["ipAddress"],
                "location": {
                    "city": event.get("location", {}).get("city"),
                    "state": event.get("location", {}).get("state"),
                    "country": event.get("location", {}).get("countryOrRegion"),
                    "lat": event.get("location", {}).get("geoCoordinates", {}).get("latitude"),
                    "lon": event.get("location", {}).get("geoCoordinates", {}).get("longitude")
                },
                "result": "success" if event["status"]["errorCode"] == 0 else "failure",
                "failure_reason": event["status"].get("failureReason", ""),
                "app": event.get("appDisplayName", "Unknown"),
                "device": event.get("deviceDetail", {}).get("operatingSystem", "Unknown"),
                "browser": event.get("deviceDetail", {}).get("browser", "Unknown"),
                "mfa_result": event.get("authenticationDetails", [{}])[0].get("succeeded", None),
                "risk_level": event.get("riskLevelDuringSignIn", "none"),
                "client_app": event.get("clientAppUsed", "Unknown"),
                "source": "azure_ad"
            })
        elif log_source == "okta":
            normalized.append({
                "timestamp": event["published"],
                "user": event["actor"]["alternateId"],
                "source_ip": event["client"]["ipAddress"],
                "location": {
                    "city": event["client"].get("geographicalContext", {}).get("city"),
                    "state": event["client"].get("geographicalContext", {}).get("state"),
                    "country": event["client"].get("geographicalContext", {}).get("country"),
                    "lat": event["client"].get("geographicalContext", {}).get("geolocation", {}).get("lat"),
                    "lon": event["client"].get("geographicalContext", {}).get("geolocation", {}).get("lon")
                },
                "result": "success" if event["outcome"]["result"] == "SUCCESS" else "failure",
                "failure_reason": event["outcome"].get("reason", ""),
                "app": event.get("target", [{}])[0].get("displayName", "Unknown"),
                "device": event["client"].get("device", "Unknown"),
                "browser": event["client"].get("userAgent", {}).get("browser", "Unknown"),
                "source": "okta"
            })
        elif log_source == "windows_ad":
            normalized.append({
                "timestamp": event["TimeCreated"],
                "user": event["TargetUserName"],

…
Câu hỏi thường gặp

“Mẫu xác thực bất thường” là gì?

Đây là các hoạt động đăng nhập lệch khỏi hành vi bình thường dự kiến của người dùng, chẳng hạn đăng nhập từ các địa điểm rất xa nhau trong thời gian ngắn, hoặc nhiều lần thử sai liên tiếp.

Công cụ này có thể phát hiện loại tấn công nào?

Nó có thể phát hiện các cuộc tấn công như “impossible travel”, “credential stuffing”, “brute force” và “password spraying”.

Tôi có cần dữ liệu cụ thể để dùng công cụ này không?

Có, bạn cần nhật ký xác thực từ các hệ thống như Azure AD, Okta hoặc Active Directory, cùng dữ liệu lịch sử (ít nhất 90 ngày) để công cụ học hành vi bình thường.

Chi tiết

Mô tả gốc của tác giả

Detects anomalous authentication patterns using UEBA analytics, statistical baselines, and machine learning models to identify impossible travel, credential stuffing, brute force, password spraying, and compromised account behaviors across authentication logs. Activates for requests involving authentication anomaly detection, login behavior analysis, UEBA implementation, or suspicious sign-in inve

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7792
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự