Skip to content

Commit

Permalink
AppControl Manager 1.6.0.0 (#445)
Browse files Browse the repository at this point in the history
The file and folder scans across the application now support parallel processing.

The "Allow New Apps" page's progress ring will accurately display the progress of the selected folders' scan.

Added a new radial gauge to the Supplemental policy creation page that lets you to choose the scalability of the scan which defines how many concurrent threads it can use to complete the scan. It also has a progress bar showing you the scan progress in real time.

A new page has been added to the AppControl Manager, allowing you to merge multiple App Control policies into a single, unified policy. This feature has been custom-built exclusively for this application and it completely follows the Code Integrity schema's rules. The merging process ensures that the resulting policy is free of duplicate rules. Additionally, you have the option to deploy the merged policy immediately after the merge is complete. Read more about this feature in here.

Added link to the source code which is in this repository to the end of the About section.

Added link to the Icons8 website as credit to the end of the About section.

Now you can select multiple folders at the same time when browsing for folders in "Allow New Apps" page and the list of the selected folders will show unique folders only.

The automatic AppControlManagerSupplementalPolicy supplemental policy now also allows SignTool.exe via FilePublisher rule. This is necessary so that when the DefaultWindows base policy is deployed, SignTool.exe will be able to run to perform necessary signing operations.

The automaticAppControlManagerSupplementalPolicy is no longer displayed by default in the System Information page. You can include it in the displayed policies by checking a box if you still want to see them, just like system policies. The reason is that it will be removed automatically when its associated base policy is removed so user doesn't need to take extra action anymore. This further simplifies policy management using the AppControl Manager app. Find more information about it in here

Technical Changes
Main namespace rename.

FilePicker Dialogs now use NativeAOT and Trim compatible code.

CsWin32 no longer uses marshaling, necessary logic are implemented manually.

Implemented lots of new code analyzers related to style and security.

Switched to the new version 7 GUID generation in every part of the code.

Removed an unnecessary package CommunityToolkit.WinUI.Behaviors from the app.
  • Loading branch information
HotCakeX authored Dec 10, 2024
1 parent 852ef6d commit 953b936
Show file tree
Hide file tree
Showing 213 changed files with 13,184 additions and 2,481 deletions.
617 changes: 606 additions & 11 deletions AppControl Manager/.editorconfig

Large diffs are not rendered by default.

3,013 changes: 3,013 additions & 0 deletions AppControl Manager/Animated Icon Sources/Merge.json

Large diffs are not rendered by default.

1,119 changes: 1,119 additions & 0 deletions AppControl Manager/Animated Icons/Merge.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions AppControl Manager/App.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
x:Class="WDACConfig.App"
x:Class="AppControlManager.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WDACConfig">
xmlns:local="using:AppControlManager">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down
16 changes: 9 additions & 7 deletions AppControl Manager/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using CommunityToolkit.WinUI;
using AppControlManager.Logging;
using CommunityToolkit.WinUI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using static WDACConfig.AppSettings;


// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

// Useful info regarding App Lifecycle events: https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/applifecycle/applifecycle


namespace WDACConfig
namespace AppControlManager
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
Expand Down Expand Up @@ -56,7 +57,7 @@ public App()
#region

// Check for the SoundSetting in the local settings
bool soundSetting = AppSettings.GetSetting<bool>(SettingKeys.SoundSetting);
bool soundSetting = AppSettings.GetSetting<bool>(AppSettings.SettingKeys.SoundSetting);

if (soundSetting)
{
Expand All @@ -81,11 +82,12 @@ public App()
/// <summary>
/// Event handler for when the sound setting is changed.
/// </summary>
/// <param name="isSoundOn"></param>
private void OnSoundSettingChanged(bool isSoundOn)
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnSoundSettingChanged(object? sender, SoundSettingChangedEventArgs e)
{
// Set the global sound state based on the event
if (isSoundOn)
if (e.IsSoundOn)
{
ElementSoundPlayer.State = ElementSoundPlayerState.On;
ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.On;
Expand Down
49 changes: 32 additions & 17 deletions AppControl Manager/AppControl Manager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<!-- https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#invariantglobalization -->
<InvariantGlobalization>true</InvariantGlobalization>

<RootNamespace>WDACConfig</RootNamespace>
<RootNamespace>AppControlManager</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<Platforms>x64;arm64</Platforms>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
Expand All @@ -33,6 +33,7 @@
-->
<WindowsSdkPackageVersion>10.0.26100.56</WindowsSdkPackageVersion>


<!--
By default .NET runtimes are contained in the MSIX. This line will also include the WindowsAppSDK in the MSIX file
so that the App will be installable on any system that neither has the .NET runtime nor the latest AppSDK
Expand All @@ -43,10 +44,12 @@
-->
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>


<!-- Publish Properties -->
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>


<!-- Disabling trimming temporarily -->
<!-- There should be absolutely no trim warnings before this can be enabled
Otherwise there is no guarantee that the app will work as expected at all times -->
Expand All @@ -56,13 +59,15 @@
<!-- <SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings> -->
<!-- <TrimmerSingleWarn>false</TrimmerSingleWarn> -->


<ImplicitUsings>disable</ImplicitUsings>
<Description>An application that simplifies management of Application Control in Windows.</Description>
<Description>A modern secure application that simplifies management of Application Control in Windows.</Description>
<PackageProjectUrl>https://github.com/HotCakeX/Harden-Windows-Security</PackageProjectUrl>
<RepositoryUrl>https://github.com/HotCakeX/Harden-Windows-Security</RepositoryUrl>
<PackageTags>App Control,WDAC,WDACConfig,AppControl For Business, AppControl Manager</PackageTags>
<PackageTags>App Control,WDAC,AppControl For Business, AppControl Manager</PackageTags>
<PackageReleaseNotes>https://github.com/HotCakeX/Harden-Windows-Security/releases</PackageReleaseNotes>


<!-- Automatically created for packing -->
<!-- https://learn.microsoft.com/en-us/windows/msix/app-installer/create-appinstallerfile-vs -->
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
Expand All @@ -71,32 +76,43 @@
<AppxPackageSigningTimestampDigestAlgorithm>SHA512</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>


<!-- Defining custom directory in the root directory to be created if it doesn't exist. MSIX package after packing will be stored there -->
<AppxPackageDir>MSIXOutput\</AppxPackageDir>
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundle>Auto</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x64|arm64</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<AssemblyName>AppControlManager</AssemblyName>
<PublishAot>False</PublishAot>
<ErrorReport>send</ErrorReport>
<FileVersion>1.5.2.0</FileVersion>
<FileVersion>1.6.0.0</FileVersion>
<AssemblyVersion>$(FileVersion)</AssemblyVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<StartupObject>WDACConfig.Program</StartupObject>
<StartupObject>AppControlManager.Program</StartupObject>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>


<!-- https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/unsafe-code -->
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>


<Version>$(FileVersion)</Version>
<Copyright>© 2024–Present</Copyright>
<Title>AppControl Manager</Title>


<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

</PropertyGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.XmlSerializer.Generator" Version="9.0.0" />
</ItemGroup>

<!--
For trimming to exclude incompatible assemblies, but currently not working
Expand All @@ -116,7 +132,6 @@
<!-- Nuget packages -->
<ItemGroup>
<PackageReference Include="CommunityToolkit.WinUI.Animations" Version="8.1.240916" />
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.1.240916" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.ColorPicker" Version="8.1.240916" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.1.240916" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.RadialGauge" Version="8.1.240916" />
Expand All @@ -131,6 +146,7 @@
</PackageReference>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.241114003" />
<PackageReference Include="Microsoft.XmlSerializer.Generator" Version="9.0.0" />
<PackageReference Include="System.Diagnostics.EventLog" Version="9.0.0" />
<PackageReference Include="System.Management" Version="9.0.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.0" />
Expand Down Expand Up @@ -165,13 +181,6 @@
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<ItemGroup>
<None Remove="Pages\AllowNewAppsDataGrid.xaml" />
<None Remove="Pages\AllowNewAppsEventLogsDataGrid.xaml" />
Expand All @@ -188,6 +197,7 @@
<None Remove="Pages\GitHubDocumentation.xaml" />
<None Remove="Pages\Logs.xaml" />
<None Remove="Pages\MDEAHPolicyCreation.xaml" />
<None Remove="Pages\MergePolicies.xaml" />
<None Remove="Pages\MicrosoftDocumentation.xaml" />
<None Remove="Pages\Settings.xaml" />
<None Remove="Pages\Simulation.xaml" />
Expand Down Expand Up @@ -303,6 +313,11 @@
<ItemGroup>
<Folder Include="Pages\AllowNewApps\" />
</ItemGroup>
<ItemGroup>
<Page Update="Pages\MergePolicies.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Pages\CreateSupplementalPolicyFilesAndFoldersScanResults.xaml">
<Generator>MSBuild:Compile</Generator>
Expand Down
8 changes: 8 additions & 0 deletions AppControl Manager/AppControl Manager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppControl Manager", "AppCo
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|arm64 = Debug|arm64
Debug|x64 = Debug|x64
Release|arm64 = Release|arm64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Debug|arm64.ActiveCfg = Debug|arm64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Debug|arm64.Build.0 = Debug|arm64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Debug|arm64.Deploy.0 = Debug|arm64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Debug|x64.ActiveCfg = Debug|x64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Debug|x64.Build.0 = Debug|x64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Debug|x64.Deploy.0 = Debug|x64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Release|arm64.ActiveCfg = Release|arm64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Release|arm64.Build.0 = Release|arm64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Release|arm64.Deploy.0 = Release|arm64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Release|x64.ActiveCfg = Release|x64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Release|x64.Build.0 = Release|x64
{8467BDD7-CAF9-478A-B74C-894D30C73E3A}.Release|x64.Deploy.0 = Release|x64
Expand Down
Loading

0 comments on commit 953b936

Please sign in to comment.