Forums
New posts
Search forums
News
Security News
Technology News
Giveaways
Giveaways, Promotions and Contests
Discounts & Deals
Reviews
Users Reviews
Video Reviews
Support
Windows Malware Removal Help & Support
Inactive Support Threads
Mac Malware Removal Help & Support
Mobile Malware Removal Help & Support
Blog
Log in
Register
What's new
Search
Search titles only
By:
Search titles only
By:
Reply to thread
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Software
Security Apps
Hard_Configurator Tools
Applocker on Windows Home.
Message
<blockquote data-quote="ForgottenSeer 97327" data-source="post: 1011628"><p>New rules with the correction of [USER=32260]@Andy Ful[/USER] (thanks <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite130" alt="(y)" title="Thumbs up (y)" loading="lazy" data-shortname="(y)" />) Allow DLL's everywhere, but block unsigned executables/iinstalleers and unsigned scripts in user space</p><p></p><p>[SPOILER="Allow DLL's everywhere"]</p><p><#</p><p>.SYNOPSIS</p><p> This function creates new AppLocker settings using MDM WMI Bridge.</p><p> All previous rules will be deleted.</p><p></p><p>.CREDITS</p><p> The script is based on the script for EXE files made by Sandy Zeng (Sandy Tsang).</p><p> <a href="https://github.com/sandytsang/MSIntune/tree/master/Intune-PowerShell/AppLocker" target="_blank">MSIntune/Intune-PowerShell/AppLocker at master · sandytsang/MSIntune</a></p><p>#></p><p></p><p>$namespaceName = "root\cimv2\mdm\dmmap" #Do not change this</p><p>$GroupName = "AppLocker001" #Your own groupName</p><p>$parentID = "./Vendor/MSFT/AppLocker/ApplicationLaunchRestrictions/$GroupName"</p><p></p><p>$classNameDLL = "MDM_AppLocker_DLL03" #Do not change this</p><p>Get-CimInstance -Namespace $namespaceName -ClassName $classNameDLL -Filter "ParentID=`'$parentID`' and InstanceID='DLL'" | Remove-CimInstance</p><p></p><p>$classNameEXE = "MDM_AppLocker_ApplicationLaunchRestrictions01_EXE03" #Do not change this</p><p>Get-CimInstance -Namespace $namespaceName -ClassName $classNameEXE -Filter "ParentID=`'$parentID`' and InstanceID='EXE'" | Remove-CimInstance</p><p></p><p>$classNameMSI = "MDM_AppLocker_MSI03" #Do not change this</p><p>Get-CimInstance -Namespace $namespaceName -ClassName $classNameMSI -Filter "ParentID=`'$parentID`' and InstanceID='MSI'" | Remove-CimInstance</p><p></p><p>$classNameScript = "MDM_AppLocker_Script03" #Do not change this</p><p>Get-CimInstance -Namespace $namespaceName -ClassName $classNameScript -Filter "ParentID=`'$parentID`' and InstanceID='Script'" | Remove-CimInstance</p><p></p><p>$classNameStoreApps = "MDM_AppLocker_ApplicationLaunchRestrictions01_StoreApps03"</p><p>Get-CimInstance -Namespace $namespaceName -ClassName $classNameStoreApps -Filter "ParentID=`'$parentID`' and InstanceID='Storeapps'" | Remove-CimInstance</p><p></p><p>Add-Type -AssemblyName System.Web</p><p></p><p>#This is example Rule Collection for EXE</p><p>$obj = [System.Net.WebUtility]::HtmlEncode(@"</p><p> <RuleCollection Type="Exe" EnforcementMode="Enabled"></p><p> <FilePathRule Id="921cc481-6e17-4653-8f75-050b80acca20" Name="All files located in the Program Files folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="%PROGRAMFILES%\*" /></p><p> </Conditions></p><p> </FilePathRule></p><p> <FilePathRule Id="a61c8b2c-a319-4cd0-9690-d2177cad7b51" Name="All files located in the Windows folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="%WINDIR%\*" /></p><p> </Conditions></p><p> <Exceptions></p><p> <FilePathCondition Path="%WINDIR%\registration\crmlog\*" /></p><p> <FilePathCondition Path="%WINDIR%\servicing\packages\*" /></p><p> <FilePathCondition Path="%WINDIR%\servicing\sessions\*" /></p><p> <FilePathCondition Path="%WINDIR%\tasks\*" /></p><p> <FilePathCondition Path="%WINDIR%\temp\*" /></p><p> <FilePathCondition Path="%WINDIR%\tracing\*" /></p><p> <Exceptions></p><p> </FilePathRule></p><p> <FilePublisherRule Id="9ab086ea-40a8-4b05-875b-f9fdf9962ba8" Name="All signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*"></p><p> <BinaryVersionRange LowSection="*" HighSection="*" /></p><p> </FilePublisherCondition></p><p> </Conditions></p><p> </FilePublisherRule></p><p> </RuleCollection></p><p>"@)</p><p>New-CimInstance -Namespace $namespaceName -ClassName $classNameEXE -Property @{ParentID=$parentID;InstanceID="EXE";Policy=$obj}</p><p></p><p></p><p>#This is example Rule Collection for MSI</p><p>$obj = [System.Net.WebUtility]::HtmlEncode(@"</p><p> <RuleCollection Type="Msi" EnforcementMode="Enabled"></p><p> <FilePublisherRule Id="b7af7102-efde-4369-8a89-7a6a392d1473" Name="All signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*"></p><p> <BinaryVersionRange LowSection="0.0.0.0" HighSection="*" /></p><p> </FilePublisherCondition></p><p> </Conditions></p><p> </FilePublisherRule></p><p> <FilePathRule Id="5b290184-345a-4453-b184-45305f6d9a54" Name="All files located in the folder %systemdrive%\Windows\Installer." Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="%WINDIR%\Installer\*" /></p><p> </Conditions></p><p> </FilePathRule></p><p> <FilePathRule Id="64ad46ff-0d71-4fa0-a30b-3f3d30c5433d" Name="Allow for Administrators" Description="" UserOrGroupSid="S-1-5-32-544" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="*.*" /></p><p> </Conditions></p><p> </FilePathRule></p><p> </RuleCollection></p><p>"@)</p><p>New-CimInstance -Namespace $namespaceName -ClassName $classNameMSI -Property @{ParentID=$parentID;InstanceID="MSI";Policy=$obj}</p><p></p><p></p><p>$obj = [System.Net.WebUtility]::HtmlEncode(@"</p><p> <RuleCollection Type="Script" EnforcementMode="Enabled"></p><p> <FilePathRule Id="06dce67b-934c-454f-a263-2515c8796a5d" Name="All scripts in Program Files folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="%PROGRAMFILES%\*" /></p><p> </Conditions></p><p> </FilePathRule></p><p> <FilePathRule Id="9428c672-5fc3-47f4-808a-a0011f36dd2c" Name="All scripts in Windows folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="%WINDIR%\*" /></p><p> </Conditions></p><p> </FilePathRule></p><p> <FilePathRule Id="ed97d0cb-15ff-430f-b82c-8d7832957725" Name="Allow for Administrators" Description="" UserOrGroupSid="S-1-5-32-544" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="*" /></p><p> </Conditions></p><p> </FilePathRule></p><p> </RuleCollection></p><p>"@)</p><p>New-CimInstance -Namespace $namespaceName -ClassName $classNameScript -Property @{ParentID=$parentID;InstanceID="Script";Policy=$obj}</p><p></p><p></p><p>$obj = [System.Net.WebUtility]::HtmlEncode(@"</p><p> <RuleCollection Type="Dll" EnforcementMode="Enabled"></p><p> <FilePathRule Id="bac4b0bf-6f1b-40e8-8627-8545fa89c8b6" Name="Aloow all DLLs everywhere" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePathCondition Path="*" /></p><p> </Conditions></p><p> </RuleCollection></p><p>"@)</p><p>New-CimInstance -Namespace $namespaceName -ClassName $classNameDLL -Property @{ParentID=$parentID;InstanceID="DLL";Policy=$obj}</p><p></p><p></p><p>$obj = [System.Net.WebUtility]::HtmlEncode(@"</p><p> <RuleCollection Type="Appx" EnforcementMode="Enabled"></p><p> <FilePublisherRule Id="a9e18c21-ff8f-43cf-b9fc-db40eed693ba" Name="All signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"></p><p> <Conditions></p><p> <FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*"></p><p> <BinaryVersionRange LowSection="0.0.0.0" HighSection="*" /></p><p> </FilePublisherCondition></p><p> </Conditions></p><p> </FilePublisherRule></p><p> </RuleCollection></p><p>"@)</p><p>New-CimInstance -Namespace $namespaceName -ClassName $classNameStoreApps -Property @{ParentID=$parentID;InstanceID="Storeapps";Policy=$obj}</p><p></p><p></p><p>[/SPOILER]</p><p></p><p>As said my wife's laptop is using nearly Microsoft only software so I can use MD exploit Protection enabling Code Integrity Guard as an additional layer of protection (allow only Microsoft signed DLL's) for Microsoft Office, Edge and Explorer. All third-party software is not allowed to start other programs (also restricted by MD's exploit protection). My wife has a HP laptop which updates fine with Configure Defender on MAX, so I am aware of the holes, but happy with the extra protection Andy-san provides us with Configure Defender and now these AppLocler scripts for Windows 11H2</p><p></p><p><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite130" alt="(y)" title="Thumbs up (y)" loading="lazy" data-shortname="(y)" /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite130" alt="(y)" title="Thumbs up (y)" loading="lazy" data-shortname="(y)" /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite130" alt="(y)" title="Thumbs up (y)" loading="lazy" data-shortname="(y)" /></p></blockquote><p></p>
[QUOTE="ForgottenSeer 97327, post: 1011628"] New rules with the correction of [USER=32260]@Andy Ful[/USER] (thanks (y)) Allow DLL's everywhere, but block unsigned executables/iinstalleers and unsigned scripts in user space [SPOILER="Allow DLL's everywhere"] <# .SYNOPSIS This function creates new AppLocker settings using MDM WMI Bridge. All previous rules will be deleted. .CREDITS The script is based on the script for EXE files made by Sandy Zeng (Sandy Tsang). [URL='https://github.com/sandytsang/MSIntune/tree/master/Intune-PowerShell/AppLocker']MSIntune/Intune-PowerShell/AppLocker at master · sandytsang/MSIntune[/URL] #> $namespaceName = "root\cimv2\mdm\dmmap" #Do not change this $GroupName = "AppLocker001" #Your own groupName $parentID = "./Vendor/MSFT/AppLocker/ApplicationLaunchRestrictions/$GroupName" $classNameDLL = "MDM_AppLocker_DLL03" #Do not change this Get-CimInstance -Namespace $namespaceName -ClassName $classNameDLL -Filter "ParentID=`'$parentID`' and InstanceID='DLL'" | Remove-CimInstance $classNameEXE = "MDM_AppLocker_ApplicationLaunchRestrictions01_EXE03" #Do not change this Get-CimInstance -Namespace $namespaceName -ClassName $classNameEXE -Filter "ParentID=`'$parentID`' and InstanceID='EXE'" | Remove-CimInstance $classNameMSI = "MDM_AppLocker_MSI03" #Do not change this Get-CimInstance -Namespace $namespaceName -ClassName $classNameMSI -Filter "ParentID=`'$parentID`' and InstanceID='MSI'" | Remove-CimInstance $classNameScript = "MDM_AppLocker_Script03" #Do not change this Get-CimInstance -Namespace $namespaceName -ClassName $classNameScript -Filter "ParentID=`'$parentID`' and InstanceID='Script'" | Remove-CimInstance $classNameStoreApps = "MDM_AppLocker_ApplicationLaunchRestrictions01_StoreApps03" Get-CimInstance -Namespace $namespaceName -ClassName $classNameStoreApps -Filter "ParentID=`'$parentID`' and InstanceID='Storeapps'" | Remove-CimInstance Add-Type -AssemblyName System.Web #This is example Rule Collection for EXE $obj = [System.Net.WebUtility]::HtmlEncode(@" <RuleCollection Type="Exe" EnforcementMode="Enabled"> <FilePathRule Id="921cc481-6e17-4653-8f75-050b80acca20" Name="All files located in the Program Files folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePathCondition Path="%PROGRAMFILES%\*" /> </Conditions> </FilePathRule> <FilePathRule Id="a61c8b2c-a319-4cd0-9690-d2177cad7b51" Name="All files located in the Windows folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePathCondition Path="%WINDIR%\*" /> </Conditions> <Exceptions> <FilePathCondition Path="%WINDIR%\registration\crmlog\*" /> <FilePathCondition Path="%WINDIR%\servicing\packages\*" /> <FilePathCondition Path="%WINDIR%\servicing\sessions\*" /> <FilePathCondition Path="%WINDIR%\tasks\*" /> <FilePathCondition Path="%WINDIR%\temp\*" /> <FilePathCondition Path="%WINDIR%\tracing\*" /> <Exceptions> </FilePathRule> <FilePublisherRule Id="9ab086ea-40a8-4b05-875b-f9fdf9962ba8" Name="All signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*"> <BinaryVersionRange LowSection="*" HighSection="*" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> </RuleCollection> "@) New-CimInstance -Namespace $namespaceName -ClassName $classNameEXE -Property @{ParentID=$parentID;InstanceID="EXE";Policy=$obj} #This is example Rule Collection for MSI $obj = [System.Net.WebUtility]::HtmlEncode(@" <RuleCollection Type="Msi" EnforcementMode="Enabled"> <FilePublisherRule Id="b7af7102-efde-4369-8a89-7a6a392d1473" Name="All signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*"> <BinaryVersionRange LowSection="0.0.0.0" HighSection="*" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> <FilePathRule Id="5b290184-345a-4453-b184-45305f6d9a54" Name="All files located in the folder %systemdrive%\Windows\Installer." Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePathCondition Path="%WINDIR%\Installer\*" /> </Conditions> </FilePathRule> <FilePathRule Id="64ad46ff-0d71-4fa0-a30b-3f3d30c5433d" Name="Allow for Administrators" Description="" UserOrGroupSid="S-1-5-32-544" Action="Allow"> <Conditions> <FilePathCondition Path="*.*" /> </Conditions> </FilePathRule> </RuleCollection> "@) New-CimInstance -Namespace $namespaceName -ClassName $classNameMSI -Property @{ParentID=$parentID;InstanceID="MSI";Policy=$obj} $obj = [System.Net.WebUtility]::HtmlEncode(@" <RuleCollection Type="Script" EnforcementMode="Enabled"> <FilePathRule Id="06dce67b-934c-454f-a263-2515c8796a5d" Name="All scripts in Program Files folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePathCondition Path="%PROGRAMFILES%\*" /> </Conditions> </FilePathRule> <FilePathRule Id="9428c672-5fc3-47f4-808a-a0011f36dd2c" Name="All scripts in Windows folder" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePathCondition Path="%WINDIR%\*" /> </Conditions> </FilePathRule> <FilePathRule Id="ed97d0cb-15ff-430f-b82c-8d7832957725" Name="Allow for Administrators" Description="" UserOrGroupSid="S-1-5-32-544" Action="Allow"> <Conditions> <FilePathCondition Path="*" /> </Conditions> </FilePathRule> </RuleCollection> "@) New-CimInstance -Namespace $namespaceName -ClassName $classNameScript -Property @{ParentID=$parentID;InstanceID="Script";Policy=$obj} $obj = [System.Net.WebUtility]::HtmlEncode(@" <RuleCollection Type="Dll" EnforcementMode="Enabled"> <FilePathRule Id="bac4b0bf-6f1b-40e8-8627-8545fa89c8b6" Name="Aloow all DLLs everywhere" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePathCondition Path="*" /> </Conditions> </RuleCollection> "@) New-CimInstance -Namespace $namespaceName -ClassName $classNameDLL -Property @{ParentID=$parentID;InstanceID="DLL";Policy=$obj} $obj = [System.Net.WebUtility]::HtmlEncode(@" <RuleCollection Type="Appx" EnforcementMode="Enabled"> <FilePublisherRule Id="a9e18c21-ff8f-43cf-b9fc-db40eed693ba" Name="All signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*"> <BinaryVersionRange LowSection="0.0.0.0" HighSection="*" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> </RuleCollection> "@) New-CimInstance -Namespace $namespaceName -ClassName $classNameStoreApps -Property @{ParentID=$parentID;InstanceID="Storeapps";Policy=$obj} [/SPOILER] As said my wife's laptop is using nearly Microsoft only software so I can use MD exploit Protection enabling Code Integrity Guard as an additional layer of protection (allow only Microsoft signed DLL's) for Microsoft Office, Edge and Explorer. All third-party software is not allowed to start other programs (also restricted by MD's exploit protection). My wife has a HP laptop which updates fine with Configure Defender on MAX, so I am aware of the holes, but happy with the extra protection Andy-san provides us with Configure Defender and now these AppLocler scripts for Windows 11H2 (y) (y) (y) [/QUOTE]
Insert quotes…
Verification
Post reply
Top