mcpField
D
detecting-t1548-abuse-elevation-control-mechanism

detecting-t1548-abuse-elevation-control-mechanism

github.com/mukul975セキュリティ35.2k37 回インストール8 週間前に更新
リポジトリ

detecting-t1548-abuse-elevation-control-mechanism について

MITRE ATT&CKのT1548を対象とする検知手順で、WindowsとLinuxのセキュリティ監視や脅威ハンティング向けです。UAC回避の兆候、権限昇格関連ログ、SplunkとKQLのクエリ例を扱います。

主な機能

  1. 01UAC関連レジストリ変更の監視
  2. 02自動昇格プロセスと親プロセスの追跡
  3. 03プロセスの整合性レベル変化の検知
  4. 04Linuxでの権限昇格悪用の調査
  5. 05クエリ例による昇格チェーンの関連付け

活用シーン

  1. 01UACプロンプトなしの管理者権限取得の調査
  2. 02Windows UAC回避活動のハンティング
  3. 03Linuxのsetuidとsudo悪用の監視
  4. 04権限昇格検知のカバレッジ評価

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill detecting-t1548-abuse-elevation-control-mechanism

インストール後、Claude Code で/detecting-t1548-abuse-elevation-control-mechanismを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

LICENSE
assets/
template.md
references/
api-reference.md
standards.md
workflows.md
scripts/
agent.py
process.py

詳細

T1548 Abuse Elevation Control Mechanism の検知

使用するタイミング

  • Windows 環境で UAC バイパスによる権限昇格をハンティングするとき
  • 脅威インテリジェンスから、活動中の脅威グループが UAC バイパスの悪用を行っていると示されたとき
  • UAC プロンプトを発生させずに攻撃者が管理者アクセスをどのように取得したかを調査するとき
  • UAC バイパス検知のカバレッジを検証するセキュリティ評価中
  • Linux システムで setuid/setgid の悪用を監視するとき

前提条件

  • コマンドラインと親プロセスのログを含む Sysmon Event ID 1
  • プロセス追跡を含む Windows セキュリティイベント ID 4688
  • UAC 関連キー (HKCU\Software\Classes) のレジストリ監査
  • Sysmon Event ID 12/13 (レジストリキー/値の変更)
  • 権限昇格の監視機能を備えた EDR

ワークフロー

  1. UAC レジストリの変更を監視する: 多くの UAC バイパスは HKCU\Software\Classes\ms-settings\shell\open\command や HKCU\Software\Classes\mscfile\shell\open\command 配下のレジストリキーを変更します。これらの変更について Sysmon Events 12/13 を追跡してください。
  2. 自動昇格プロセスの悪用を検知する: 特定の Windows バイナリは UAC プロンプトなしで自動的に昇格します (fodhelper.exe、computerdefaults.exe、eventvwr.exe)。これらが非標準の親プロセスから起動されていないかをハンティングしてください。
  3. プロセスの整合性レベルの変化を追跡する: 対応する UAC 同意イベントがないまま、プロセスが中から高の整合性レベルへ昇格していないか監視してください。
  4. 昇格プロセスによる子プロセスの生成をハンティングする: 自動昇格プロセスが想定外の子プロセス (cmd.exe、powershell.exe) を生成していないか検知してください。これは UAC バイパスの悪用を示します。
  5. Linux の権限昇格の悪用を監視する: sudo の設定ミスの悪用、setuid バイナリの悪用、ケーパビリティの操作を追跡してください。
  6. 権限昇格チェーンと相関付ける: 昇格の悪用を攻撃チェーン全体にマッピングし、昇格した権限で何が行われたかを特定してください。

主要な概念

概念説明
T1548.002Bypass User Account Control
T1548.001Setuid and Setgid (Linux)
T1548.003Sudo and Sudo Caching
T1548.004Elevated Execution with Prompt (macOS)
UAC Auto-Elevationプロンプトなしで昇格する Windows バイナリ
fodhelper.exeレジストリハイジャックによる一般的な UAC バイパスの手段
eventvwr.exeMSC ファイルハンドラーを利用した UAC バイパス
Integrity LevelWindows のプロセス信頼レベル (Low/Medium/High/System)

検知クエリ

Splunk -- レジストリ変更による UAC バイパス
index=sysmon (EventCode=12 OR EventCode=13)
| where match(TargetObject, "(?i)HKCU\\\\Software\\\\Classes\\\\(ms-settings|mscfile|exefile|Folder)\\\\shell\\\\open\\\\command")
| table _time Computer User EventCode TargetObject Details Image
Splunk -- 自動昇格プロセスの悪用
index=sysmon EventCode=1
| where match(Image, "(?i)(fodhelper|computerdefaults|eventvwr|sdclt|slui|cmstp)\.exe$")
| where NOT match(ParentImage, "(?i)(explorer|svchost|services)\.exe$")
| table _time Computer User Image CommandLine ParentImage ParentCommandLine
KQL -- UAC バイパスの検知
DeviceRegistryEvents
| where Timestamp > ago(7d)
| where RegistryKey has_any ("ms-settings\\shell\\open\\command", "mscfile\\shell\\open\\command")
| where ActionType == "RegistryValueSet"
| project Timestamp, DeviceName, RegistryKey, RegistryValueData, InitiatingProcessFileName
Sigma ルール
title: UAC Bypass via Registry Modification
status: stable
logsource:
    product: windows
    category: registry_set
detection:
    selection:
        TargetObject|contains:
            - '\ms-settings\shell\open\command'
            - '\mscfile\shell\open\command'
            - '\exefile\shell\open\command'
    condition: selection
level: high
tags:
    - attack.privilege_escalation
    - attack.t1548.002

一般的なシナリオ

  1. fodhelper.exe のレジストリハイジャック: 攻撃者が HKCU\Software\Classes\ms-settings\shell\open\command を悪意のある実行ファイルに設定し、その後 fodhelper.exe を起動します。fodhelper.exe は自動昇格してハイジャックされたコマンドを実行します。
  2. eventvwr.exe の MSC バイパス: HKCU\Software\Classes\mscfile\shell\open\command を変更し、イベントビューアーの自動昇格の動作を横取りします。
  3. sdclt.exe のバイパス: Windows バックアップユーティリティの自動昇格を利用して任意のコマンドを実行します。
  4. CMSTP.exe の INF バイパス: 悪意のある INF ファイルとともに接続マネージャー プロファイル インストーラーを使用し、/s /ni フラグで UAC をバイパスします。
  5. 自動昇格におけるDLL ハイジャック: 自動昇格する実行ファイルの検索パスに悪意のある DLL を配置します。

出力形式

Hunt ID: TH-UAC-[DATE]-[SEQ]
Host: [Hostname]
Bypass Method: [Registry hijack/DLL hijack/Token manipulation]
Auto-Elevate Binary: [fodhelper.exe/eventvwr.exe/etc.]
Registry Key Modified: [Full registry path]
Payload Executed: [Command or binary path]
User Context: [Account]
Risk Level: [Critical/High/Medium]
ATT&CK Technique: [T1548.00x]

コメント