本文へスキップ
Skillpedia
セキュリティ35k · #7792

detecting-anomalous-authentication-patterns

できること

このツールは、ユーザーのログイン記録を分析して、普段と異なる不審なアクセス活動を見つけます。アカウントが乗っ取られている、または悪意を持ってアクセスされている可能性があるパターンを探します。

使う場面

  • ✓ユーザーアカウントが乗っ取られたと疑われるとき。
  • ✓ユーザーが地理的に移動不可能な場所からログインしていないかを確認したいとき。
  • ✓ブルートフォース攻撃やクレデンシャルスタッフィングのような大規模な攻撃を検出したいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-anomalous-authentication-patterns/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“認証ログで異常なログインパターンがないか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

人工知能と統計分析を使い、現在のログインを過去に記録された通常の動作と比較します。普段とあまりにも違うログイン(数分以内に別の国からアクセスされたなど)があると、フラグが立てられます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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"],

…
よくある質問

「異常な認証パターン」とは何ですか?

ユーザーの通常の動作から外れたログイン活動のことです。短時間で非常に離れた場所からのログインや、連続した多数のログイン失敗などが該当します。

このツールはどのような攻撃を検出できますか?

「インポッシブルトラベル」「クレデンシャルスタッフィング」「ブルートフォース」「パスワードスプレー」などの攻撃を検出できます。

このツールを使うには特定のデータが必要ですか?

はい。Azure AD、Okta、Active Directoryなどのシステムの認証ログが必要です。また、通常の動作を学習するために、過去のデータ(最低90日分)も必要です。

詳細

作者による元の説明

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

人気

GitHubのスター
35k
ランキング
#7792
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル