configuring-windows-defender-advanced-settings について
Windows 管理者やセキュリティチーム向けに、Microsoft Defender の高度な保護設定と、PowerShell や企業ポリシーによる展開方法を案内します。ASR、コントロールされたフォルダーアクセス、ネットワーク・エクスプロイト保護、監視を扱います。
主な機能
- 01ASR ルールの設定
- 02コントロールされたフォルダーアクセスの有効化
- 03ネットワーク・エクスプロイト保護の設定
- 04クラウド保護とスキャンの設定
- 05Intune による展開と監視
活用シーン
- 01Windows エンドポイントの Defender 保護強化
- 02監査モードでの ASR ルール評価
- 03企業ポリシーによる Defender 設定の展開
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ mukul975/ anthropic-cybersecurity-skills --skill configuring-windows-defender-advanced-settingsインストール後、Claude Code で/configuring-windows-defender-advanced-settingsを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
LICENSEassets/template.mdreferences/api-reference.mdstandards.mdworkflows.mdscripts/agent.pyprocess.py詳細
Windows Defender の詳細設定を構成する
使用するタイミング
次の場合にこのスキルを使用します。
- 保護を強化するために、既定の設定を超えて Microsoft Defender for Endpoint(MDE)を構成する場合
- 一般的な攻撃手法をブロックするために、攻撃対象領域の縮小(ASR)ルールを実装する場合
- ランサムウェア対策として、コントロールされたフォルダーアクセスを有効にする場合
- ネットワーク保護機能とエクスプロイト保護機能を構成する場合
- エンタープライズ規模で、Intune、SCCM、またはグループ ポリシーを使用して Defender の設定を展開する場合
サードパーティの EDR(CrowdStrike、SentinelOne)の展開、または Microsoft Defender for Cloud(Azure ワークロード保護)には、このスキルを使用しないでください。
前提条件
- Microsoft Defender Antivirus が有効になっている Windows 10/11 Enterprise
- Microsoft 365 E5 または Microsoft Defender for Endpoint Plan 2 ライセンス(MDE の全機能を利用する場合)
- エンタープライズでのポリシー展開に使用する Microsoft Intune または SCCM
- Microsoft 365 Defender ポータルへのアクセス権(security.microsoft.com)
- サードパーティの AV がアクティブモードで実行されていないエンドポイント(Defender はパッシブモードになります)
ワークフロー
ステップ 1:攻撃対象領域の縮小(ASR)ルールを構成する
ASR ルールは、マルウェアや攻撃者がよく利用する特定の挙動をブロックします。
# Enable ASR rules via PowerShell (or deploy via Intune/GPO)
# Mode: 0=Disabled, 1=Block, 2=Audit, 6=Warn
# Block executable content from email client and webmail
Set-MpPreference -AttackSurfaceReductionRules_Ids BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 `
-AttackSurfaceReductionRules_Actions 1
# Block all Office applications from creating child processes
Set-MpPreference -AttackSurfaceReductionRules_Ids D4F940AB-401B-4EFC-AADC-AD5F3C50688A `
-AttackSurfaceReductionRules_Actions 1
# Block Office applications from creating executable content
Set-MpPreference -AttackSurfaceReductionRules_Ids 3B576869-A4EC-4529-8536-B80A7769E899 `
-AttackSurfaceReductionRules_Actions 1
# Block Office applications from injecting code into other processes
Set-MpPreference -AttackSurfaceReductionRules_Ids 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84 `
-AttackSurfaceReductionRules_Actions 1
# Block JavaScript or VBScript from launching downloaded executable content
Set-MpPreference -AttackSurfaceReductionRules_Ids D3E037E1-3EB8-44C8-A917-57927947596D `
-AttackSurfaceReductionRules_Actions 1
# Block execution of potentially obfuscated scripts
Set-MpPreference -AttackSurfaceReductionRules_Ids 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC `
-AttackSurfaceReductionRules_Actions 1
# Block Win32 API calls from Office macros
Set-MpPreference -AttackSurfaceReductionRules_Ids 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B `
-AttackSurfaceReductionRules_Actions 1
# Block credential stealing from Windows LSASS
Set-MpPreference -AttackSurfaceReductionRules_Ids 9E6C4E1F-7D60-472F-BA1A-A39EF669E4B2 `
-AttackSurfaceReductionRules_Actions 1
# Block process creations from PSExec and WMI commands
Set-MpPreference -AttackSurfaceReductionRules_Ids D1E49AAC-8F56-4280-B9BA-993A6D77406C `
-AttackSurfaceReductionRules_Actions 1
# Block untrusted and unsigned processes from USB
Set-MpPreference -AttackSurfaceReductionRules_Ids B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4 `
-AttackSurfaceReductionRules_Actions 1
# Block persistence through WMI event subscription
Set-MpPreference -AttackSurfaceReductionRules_Ids E6DB77E5-3DF2-4CF1-B95A-636979351E5B `
-AttackSurfaceReductionRules_Actions 1
# Block abuse of exploited vulnerable signed drivers
Set-MpPreference -AttackSurfaceReductionRules_Ids 56A863A9-875E-4185-98A7-B882C64B5CE5 `
-AttackSurfaceReductionRules_Actions 1
ステップ 2:コントロールされたフォルダーアクセスを構成する(ランサムウェア対策)
# Enable Controlled Folder Access
Set-MpPreference -EnableControlledFolderAccess Enabled
# Default protected folders: Documents, Pictures, Videos, Music, Desktop, Favorites
# Add custom protected folders
Add-MpPreference -ControlledFolderAccessProtectedFolders "C:\CriticalData"
Add-MpPreference -ControlledFolderAccessProtectedFolders "D:\SharedDrives"
# Allow specific applications to access protected folders
Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\CustomApp\app.exe"
Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Backup\backup.exe"
# Set to Audit mode first to identify legitimate applications that need access
Set-MpPreference -EnableControlledFolderAccess AuditMode
# Event ID 1124 in Microsoft-Windows-Windows Defender/Operational log
ステップ 3:ネットワーク保護を構成する
# Enable Network Protection (blocks connections to malicious domains/IPs)
Set-MpPreference -EnableNetworkProtection Enabled
# Network Protection leverages Microsoft SmartScreen intelligence
# Blocks: phishing sites, exploit hosting domains, C2 domains, malware download URLs
# Set to Audit mode first:
Set-MpPreference -EnableNetworkProtection AuditMode
# Event Log: Microsoft-Windows-Windows Defender/Operational, Event ID 1125
# Configure Web Content Filtering (requires MDE P2 license)
# Managed via Microsoft 365 Defender portal:
# Settings → Endpoints → Web content filtering → Add policy
# Categories to block: Malware, Phishing, Adult content, High bandwidth
ステップ 4:エクスプロイト保護を構成する
# Export current exploit protection settings
Get-ProcessMitigation -RegistryConfigFilePath "C:\Defender\current_mitigations.xml"
# Configure system-level mitigations
Set-ProcessMitigation -System -Enable DEP, SEHOP, ForceRelocateImages, BottomUp
# Configure per-application mitigations
# Example: Harden Microsoft Office against exploitation
Set-ProcessMitigation -Name "WINWORD.EXE" `
-Enable DEP, SEHOP, ForceRelocateImages, CFG, StrictHandle
Set-ProcessMitigation -Name "EXCEL.EXE" `
-Enable DEP, SEHOP, ForceRelocateImages, CFG, StrictHandle
Set-ProcessMitigation -Name "POWERPNT.EXE" `
-Enable DEP, SEHOP, ForceRelocateImages, CFG, StrictHandle
# Import exploit protection configuration from XML template
Set-ProcessMitigation -PolicyFilePath "C:\Defender\exploit_protection_template.xml"
ステップ 5:クラウド提供の保護を構成する
# Enable cloud-delivered protection (real-time threat intelligence)
Set-MpPreference -MAPSReporting Advanced
Set-MpPreference -SubmitSamplesConsent SendAllSamples
# Enable Block at First Sight (BAFS)
# Requires: Cloud protection enabled + sample submission enabled
Set-MpPreference -DisableBlockAtFirstSeen $false
# Set cloud block timeout to maximum (60 seconds)
Set-MpPreference -CloudBlockLevel High
Set-MpPreference -CloudExtendedTimeout 50
# Enable potentially unwanted application (PUA) protection
Set-MpPreference -PUAProtection Enabled
ステップ 6:スキャンと更新の設定を構成する
# Configure real-time protection
Set-MpPreference -DisableRealtimeMonitoring $false
Set-MpPreference -DisableBehaviorMonitoring $false
Set-MpPreference -DisableIOAVProtection $false
Set-MpPreference -DisableScriptScanning $false
# Configure scheduled scan
Set-MpPreference -ScanScheduleQuickScanTime 12:00:00
Set-MpPreference -ScanParameters QuickScan
Set-MpPreference -ScanScheduleDay 0 # Every day
Set-MpPreference -RemediationScheduleDay 0
# Configure signature updates
Set-MpPreference -SignatureUpdateInterval 1 # Check every hour
Set-MpPreference -SignatureFallbackOrder "MicrosoftUpdateServer|MMPC"
# Enable tamper protection (prevents unauthorized changes to Defender settings)
# Managed via Microsoft 365 Defender portal:
# Settings → Endpoints → Advanced features → Tamper Protection: On
ステップ 7:Intune 経由で展開する(エンタープライズ)
Intune Deployment Path:
1. Endpoint Security → Attack Surface Reduction → Create Profile
- Platform: Windows 10 and later
- Profile: Attack surface reduction rules
- Configure each ASR rule to Block or Audit
2. Endpoint Security → Antivirus → Create Profile
- Microsoft Defender Antivirus
- Configure: Cloud protection, PUA, real-time protection
3. Endpoint Security → Antivirus → Create Profile
- Microsoft Defender Antivirus Exclusions
- Add path/process/extension exclusions for LOB apps
4. Devices → Configuration profiles → Create profile
- Endpoint protection → Microsoft Defender Exploit Guard
- Configure: Controlled Folder Access, Network Protection
ステップ 8:Microsoft 365 Defender ポータルで監視する
Dashboard monitoring:
1. security.microsoft.com → Reports → Endpoints
- Device health: Protection status across fleet
- ASR rule detections: Which rules are triggering
- Vulnerable devices: Missing security updates
2. Threat analytics:
- Active threat campaigns and Defender coverage
- Recommended security actions
3. Advanced hunting (KQL):
DeviceEvents
| where ActionType startswith "Asr"
| summarize Count=count() by ActionType, FileName
| sort by Count desc
DeviceEvents
| where ActionType == "ControlledFolderAccessViolationBlocked"
| project Timestamp, DeviceName, FileName, FolderPath
主な概念
| 用語 | 定義 |
|---|---|
| ASR ルール | エンドポイントレベルでリスクの高い特定の挙動をブロックする、攻撃対象領域の縮小ルールです |
| コントロールされたフォルダーアクセス | 保護されたフォルダー内のファイルを、許可されていないアプリケーションが変更できないようにするランサムウェア対策機能です |
| ネットワーク保護 | SmartScreen のインテリジェンスを使用して、評価の低いドメインや既知の悪意あるドメインへの送信接続をブロックします |
| エクスプロイト保護 | エクスプロイトを防ぐための、システム全体およびアプリケーションごとのメモリ軽減策(DEP、ASLR、CFG)です |
| BAFS(Block at First Sight) | 実行を許可する前に、不審なファイルをクラウド分析のために保留するクラウドベースのゼロデイ保護機能です |
| 改ざん防止 | ローカル管理者による場合も含め、Defender のセキュリティ設定が許可なく変更されるのを防ぎます |
ツールとシステム
- Microsoft 365 Defender ポータル:一元管理とレポート作成を行う security.microsoft.com
- Microsoft Intune:Defender ポリシーの展開に使用するクラウドベースのエンドポイント管理サービス
- PowerShell(Set-MpPreference):Defender 設定のローカル構成
- WDAC(Windows Defender Application Control):補完的なアプリケーション制御テクノロジー
- Microsoft Defender for Endpoint API:自動化とカスタム統合に使用する REST API
よくある落とし穴
- すべての ASR ルールを直ちにブロックモードで有効にする:正規のソフトウェア(Office マクロや管理者用スクリプト)に対して、一部の ASR ルールが誤検知を引き起こす場合があります。必ず最初に監査モードで展開し、2~4 週間監視してください。
- コントロールされたフォルダーアクセスの除外を構成しない:バックアップソフトウェア、データベースアプリケーション、開発ツールが、保護されたフォルダーへの書き込みをブロックされる場合があります。事前に除外を追加してください。
- 改ざん防止を無視する:改ざん防止がないと、マルウェアや内部関係者が PowerShell やレジストリの編集を通じて Defender を無効化できます。M365 Defender ポータルから改ざん防止を有効にしてください。
- サードパーティの AV と Defender を併用する:サードパーティの AV が存在すると、Defender はパッシブモードになります。使用する AV ソリューションを確認し、Defender を適切に構成してください(サードパーティの AV を継続使用する場合は EDR のみのモード)。
- クラウド接続の要件を忘れる:クラウド提供の保護と BAFS を利用するには、エンドポイントが Microsoft のクラウドサービスに接続できる必要があります。プロキシやファイアウォールのルールで、Defender のクラウドトラフィックが許可されていることを確認してください。
コメント
Markdown 対応