@@ -120,7 +120,7 @@ NTSTATUS PhGetProcessMitigationPolicy(
120
120
COPY_PROCESS_MITIGATION_POLICY (PayloadRestriction , PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY );
121
121
COPY_PROCESS_MITIGATION_POLICY (ChildProcess , PROCESS_MITIGATION_CHILD_PROCESS_POLICY );
122
122
COPY_PROCESS_MITIGATION_POLICY (SideChannelIsolation , PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY ); // 19H1
123
- COPY_PROCESS_MITIGATION_POLICY (UserShadowStack , PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY ); // 20H1
123
+ COPY_PROCESS_MITIGATION_POLICY (UserShadowStack , PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY_INT ); // 20H1
124
124
125
125
return status ;
126
126
}
@@ -531,15 +531,54 @@ BOOLEAN PhDescribeProcessMitigationPolicy(
531
531
break ;
532
532
case ProcessUserShadowStackPolicy :
533
533
{
534
- PPROCESS_MITIGATION_USER_SHADOW_STACK_POLICY data = Data ;
534
+ PPROCESS_MITIGATION_USER_SHADOW_STACK_POLICY_INT data = Data ;
535
535
536
- if (data -> EnableUserShadowStack )
536
+ if (data -> EnableUserShadowStack || data -> AuditUserShadowStack )
537
537
{
538
538
if (ShortDescription )
539
- * ShortDescription = PhCreateString (L"Stack protection is enabled" );
539
+ {
540
+ PhInitializeStringBuilder (& sb , 50 );
541
+
542
+ if (data -> AuditUserShadowStack )
543
+ PhAppendStringBuilder2 (& sb , L"Audit " );
544
+
545
+ if (data -> EnableUserShadowStackStrictMode )
546
+ PhAppendStringBuilder2 (& sb , L"Strict " );
547
+
548
+ PhAppendStringBuilder2 (& sb , L"Stack protection" );
549
+
550
+ * ShortDescription = PhFinalStringBuilderString (& sb );
551
+ }
540
552
541
553
if (LongDescription )
542
- * LongDescription = PhCreateString (L"The CPU verifies function return addresses at runtime by employing a hardware-enforced shadow stack.\r\n" );
554
+ {
555
+ PhInitializeStringBuilder (& sb , 100 );
556
+
557
+ PhAppendStringBuilder2 (& sb , L"The CPU verifies function return addresses at runtime by employing a hardware-enforced shadow stack.\r\n" );
558
+
559
+ if (data -> AuditUserShadowStack )
560
+ PhAppendStringBuilder2 (& sb , L"Audit Stack protection : log ROP failures to event log.\r\n" );
561
+
562
+ if (data -> EnableUserShadowStackStrictMode )
563
+ PhAppendStringBuilder2 (& sb , L"Strict Stack protection : any detected ROP will cause the process to terminate.\r\n" );
564
+
565
+ if (data -> AuditSetContextIpValidation )
566
+ PhAppendStringBuilder2 (& sb , L"Audit Set Context IP validation : log modifications of context IP to event log.\r\n" );
567
+
568
+ if (data -> SetContextIpValidation )
569
+ PhAppendStringBuilder2 (& sb , L"Set Context IP validation : any detected modification of context IP will cause the process to terminate.\r\n" );
570
+
571
+ if (data -> AuditBlockNonCetBinaries )
572
+ PhAppendStringBuilder2 (& sb , L"Audit Block non CET binaries : log attempts to load binaries without CET support.\r\n" );
573
+
574
+ if (data -> BlockNonCetBinaries )
575
+ PhAppendStringBuilder2 (& sb , L"Block binaries without CET support\r\n" );
576
+
577
+ if (data -> BlockNonCetBinariesNonEhcont )
578
+ PhAppendStringBuilder2 (& sb , L"Block binaries without CET support or without EH continuation metadata.\r\n" );
579
+
580
+ * LongDescription = PhFinalStringBuilderString (& sb );
581
+ }
543
582
544
583
result = TRUE;
545
584
}
0 commit comments