다음을 통해 공유


공격 표면 감소 규칙 데모

적용 대상:

공격 표면 감소 규칙은 일반적으로 맬웨어 및 악성 앱에서 컴퓨터를 감염시키는 데 사용되는 특정 동작을 대상으로 합니다.

  • 파일을 다운로드하거나 실행하려는 Office 앱 또는 웹 메일에 사용되는 실행 파일 및 스크립트
  • 난독 제거되거나 의심스러운 스크립트
  • 일상적인 작업 중에 시작되지 않는 앱이 수행하는 동작

시나리오 요구 사항 및 설정

  • Windows 11, Windows 10 1709 빌드 16273 이상
  • Windows Server 2022, Windows Server 2019, Windows Server 2016 또는 통합 MDE 클라이언트를 사용하여 R2를 Windows Server 2012.
  • Microsoft Defender 바이러스 백신
  • Microsoft 365 앱(Office; Office 규칙 및 샘플에 필요)
  • 공격 표면 감소 PowerShell 스크립트 다운로드

PowerShell 명령

Add-MpPreference -AttackSurfaceReductionRules_Ids BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids D4F940AB-401B-4EfC-AADC-AD5F3C50688A -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 3B576869-A4EC-4529-8536-B80A7769E899 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids D3E037E1-3EB8-44C8-A917-57927947596D -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids D1E49AAC-8F56-4280-B9BA-993A6D77406C -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids C1DB55AB-C21A-4637-BB3F-A12568109D35 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 01443614-CD74-433A-B99E-2ECDC07BFC25 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 56a863a9-875e-4185-98a7-b882c64b5ce5 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids e6db77e5-3df2-4cf1-b95a-636979351e5b -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids a8f5898e-1dc8-49a9-9878-85004b8a61e6 -AttackSurfaceReductionRules_Actions Enabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 26190899-1602-49E8-8B27-EB1D0A1CE869 -AttackSurfaceReductionRules_Actions AuditMode
Add-MpPreference -AttackSurfaceReductionRules_Ids 7674BA52-37EB-4A4F-A9A1-F0F9A1619A2C -AttackSurfaceReductionRules_Actions AuditMode

규칙 상태

상태 모드 숫자 값
사용 안 함 = 끄기 0
사용 = 블록 모드 1
감사 = 감사 모드 2

구성 확인


Get-MpPreference

파일 테스트

참고 - 일부 테스트 파일에는 여러 익스플로잇이 포함되고 여러 규칙이 트리거됩니다.

규칙 이름 규칙 GUID
전자 메일 클라이언트 및 웹 메일에서 실행 파일 콘텐츠 차단 BE9BA2D9-53EA-4CDC-84E5-9B1EE46550
Office 애플리케이션에서 자식 프로세스를 만들지 못하도록 차단 D4F940AB-401B-4EFC-AADC-AD5F3C50688A
Office 애플리케이션이 실행 파일 콘텐츠를 만들지 못하도록 차단 3B576869-A4EC-4529-8536-B80A7769E899
Office 애플리케이션이 다른 프로세스에 삽입되지 않도록 차단 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84
JavaScript 및 VBScript를 방해하여 실행 파일 시작 D3E037E1-3EB8-44C8-A917-57927947596D
잠재적으로 난독 처리된 스크립트의 실행 차단 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC
Office의 매크로 코드에서 Win32 가져오기 차단 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B
{PSExec & WMI 명령에서 시작된 프로세스 만들기 차단 D1E49AAC-8F56-4280-B9BA-993A6D77406C
이동식 USB 미디어 내에서 신뢰할 수 없거나 서명되지 않은 실행 파일의 실행 차단 B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4
공격적인 랜섬웨어 방지 C1DB55AB-C21A-4637-BB3F-A12568109D35
실행 파일이 보급률, 연령 또는 신뢰할 수 있는 목록 조건을 충족하지 않는 한 실행 파일의 실행 차단 01443614-CD74-433A-B99E-2ECDC07BFC25
Adobe Reader가 자식 프로세스를 만들지 못하도록 차단 7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c
악용된 취약한 서명된 드라이버의 남용 차단 56a863a9-875e-4185-98a7-b882c64b5ce5
Windows 로컬 보안 기관 하위 시스템에서 자격 증명 도용 차단(lsass.exe) 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2
WMI 이벤트 구독을 통한 지속성 차단 e6db77e5-3df2-4cf1-b95a-636979351e5b
서버에 대한 Webshell 만들기 차단 a8f5898e-1dc8-49a9-9878-85004b8a61e6

시나리오

설정

설치 스크립트를 다운로드하고 실행합니다. 스크립트를 실행하기 전에 이 PowerShell 명령을 사용하여 실행 정책을 무제한으로 설정합니다.

Set-ExecutionPolicy Unrestricted

대신 다음 수동 단계를 수행할 수 있습니다.

  1. c: 명명된 demo, "c:\demo" 아래의 폴더를 Create
  2. 클린 파일을 c:\demo에 저장합니다.
  3. PowerShell 명령을 사용하여 모든 규칙을 사용하도록 설정합니다.

시나리오 1: 공격 표면 감소는 여러 취약성이 있는 테스트 파일을 차단합니다.

  1. PowerShell 명령을 사용하여 블록 모드에서 모든 규칙 사용(모두 붙여넣기 복사 가능)
  2. 테스트 파일/문서를 다운로드하여 열고, 메시지가 표시되면 편집 및 콘텐츠를 사용하도록 설정합니다.

시나리오 1 예상 결과

"작업 차단됨" 알림이 즉시 표시됩니다.

시나리오 2: ASR 규칙은 해당 취약성으로 테스트 파일을 차단합니다.

  1. 이전 단계의 PowerShell 명령을 사용하여 테스트할 규칙을 구성합니다.

    예: Add-MpPreference -AttackSurfaceReductionRules_Ids D4F940AB-401B-4EfC-AADC-AD5F3C50688A -AttackSurfaceReductionRules_Actions Enabled

  2. 테스트하려는 규칙에 대한 테스트 파일/문서를 다운로드하여 열고, 메시지가 표시되면 편집 및 콘텐츠를 사용하도록 설정합니다.

    예: Office 애플리케이션이 자식 프로세스 D4F940AB-401B-4EFC-AADC-AD5F3C50688A 만들지 못하도록 차단

시나리오 2 예상 결과

"작업 차단됨" 알림이 즉시 표시됩니다.

시나리오 3(Windows 10 이상): ASR 규칙은 서명되지 않은 USB 콘텐츠가 실행되지 않도록 차단합니다.

  1. USB 보호(B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4)에 대한 규칙을 구성합니다.
Add-MpPreference -AttackSurfaceReductionRules_Ids B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4 -AttackSurfaceReductionRules_Actions Enabled
  1. 파일을 다운로드하고 USB 스틱에 넣고 실행하여 이동식 USB 미디어 내에서 신뢰할 수 없거나 서명되지 않은 실행 파일의 실행을 차단합니다.

시나리오 3 예상 결과

"작업 차단됨" 알림이 즉시 표시됩니다.

시나리오 4: 공격 표면 감소 없이 발생하는 일

  1. 정리 섹션에서 PowerShell 명령을 사용하여 모든 공격 표면 감소 규칙을 끕니다.

  2. 테스트 파일/문서를 다운로드하고 메시지가 표시되면 편집 및 콘텐츠를 사용하도록 설정합니다.

시나리오 4 예상 결과

  • c:\demo의 파일은 암호화되며 경고 메시지가 표시됩니다.
  • 테스트 파일을 다시 실행하여 파일 암호 해독

정리

클린 스크립트 다운로드 및 실행

또는 다음 수동 단계를 수행할 수 있습니다.

Add-MpPreference -AttackSurfaceReductionRules_Ids BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids D4F940AB-401B-4EfC-AADC-AD5F3C50688A -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 3B576869-A4EC-4529-8536-B80A7769E899 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids D3E037E1-3EB8-44C8-A917-57927947596D -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids D1E49AAC-8F56-4280-B9BA-993A6D77406C -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids C1DB55AB-C21A-4637-BB3F-A12568109D35 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 01443614-CD74-433A-B99E-2ECDC07BFC25 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 56a863a9-875e-4185-98a7-b882c64b5ce5 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids e6db77e5-3df2-4cf1-b95a-636979351e5b -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids a8f5898e-1dc8-49a9-9878-85004b8a61e6 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 26190899-1602-49E8-8B27-EB1D0A1CE869 -AttackSurfaceReductionRules_Actions Disabled
Add-MpPreference -AttackSurfaceReductionRules_Ids 7674BA52-37EB-4A4F-A9A1-F0F9A1619A2C -AttackSurfaceReductionRules_Actions Disabled

암호화/암호 해독 파일을 실행하여 c:\demo 암호화 정리

참고 항목

공격 표면 감소 규칙 배포 가이드

공격 표면 감소 규칙 참조

엔드포인트용 Microsoft Defender - 데모 시나리오

더 자세히 알아보고 싶으신가요? 기술 커뮤니티: 엔드포인트용 Microsoft Defender Tech Community의 Microsoft 보안 커뮤니티와 Engage.