Blog Post

Microsoft Security Baselines Blog
3 MIN READ

New & Updated Security Tools

Rick_Munck's avatar
Rick_Munck
Icon for Microsoft rankMicrosoft
Sep 03, 2020

It took us a little longer than we wanted but we are finally ready to announce new versions of LGPO and Policy Analyzer as well as two new tools, GPO2PolicyRules and SetObjectSecurity.  These new and updated tools are now available on the Microsoft Download Center

 

The goal is to keep this post as short as possible so let’s just jump into the details.

 

LGPO v3.0

Two new options were added in LGPO.exe.  The first, /ef which enables Group Policy extensions referenced in the backup.xml. The second, /p which allows for importing settings directly from a .PolicyRules file which negates the need to have the actual GPOs on hand. Additionally, LGPO.exe /b and /g now capture locally-configured client-side extensions (CSEs) (which we had an issue with previously).   Lastly, /b also correctly captures all user rights assignments, overcoming a bug in the underlying “secedit.exe /export” that fails to capture user rights assignments that are granted to no one.

 

Policy Analyzer v4.0

The “Compare to Effective State” button has replaced the “Compare local registry” and “Local Policy” checkboxes that used to be in the Policy Analyzer main window.  Press it to compare the selected baseline(s) to the current system state. If the selected baseline(s) contain any user configuration settings, they are compared against the current user’s settings. “Compare to Effective State” requires administrative rights if the selected baseline(s) include any security template settings or Advanced Auditing settings. The effective state corresponding to the selected baseline(s) settings are saved to a new policy rule set.

 

 

Policy Analyzer now captures information about Group Policy Client-Side Extensions (CSEs) when you import GPO backups. From a Policy Viewer window, choose View \ Client Side Extensions (CSEs) to view the Machine and User CSEs for each baseline in the Viewer. (Note that LGPO.exe’s improved support for CSEs includes the ability to apply CSE configurations from Policy Analyzer’s .PolicyRules files.)

 

 

Policy Analyzer now maps settings and sub-settings to display names more completely and more accurately, including mapping the GUIDs for Attack Surface Reduction (ASR) rules to their display names, and improved localization.

 

GPO2PolicyRules

You can now automate the conversion of GPO backups to Policy Analyzer .PolicyRules files and skip the GUI. GPO2PolicyRules is a new command-line tool that is included with the Policy Analyzer download. It takes two command-line parameters: the root directory of the GPO backup that you want to create a .PolicyRules file from, and the path to the new .PolicyRules file that you want to create. For example:

 

GPO2PolicyRules.exe C:\BaselinePkg\GPOs C:\Users\Analyst\Documents\PolicyAnalyzer\baseline.PolicyRules

 

SetObjectSecurity v1.0

SetObjectSecurity.exe enables you to set the security descriptor for just about any type of Windows securable object (files, directories, registry keys, event logs, services, SMB shares, etc). For file system and registry objects, you can choose whether to apply inheritance rules. You can also choose to output the security descriptor in a .reg-file-compatible representation of the security descriptor for a REG_BINARY registry value.

 

Use cases include:

  •              Restoring default security descriptor on the file system root directory (which sometimes gets misconfigured by some system setup tools)
  •              Restricting access to sensitive event logs that grant access too broadly (examples include AppLocker and PowerShell script block logs that grant read or read-write to NT AUTHORITY\INTERACTIVE)
  •              Locking down (or opening access to) file shares, directories, registry keys

 

SetObjectSecurity.exe is a 32-bit standalone executable that needs no installer, has no dependencies on redistributable DLLs, and works on all supported x86 and x64 versions of Windows. (x64 systems must support WOW64)

 

Terms of Use

We have now included standard use terms for the tooling that is delivered as part of the Security Compliance Toolkit.

 

We continually try to process all your feedback and make improvements along the way so please give the new and updated tooling a try and as always let us know any feedback in the comments below.

Updated Sep 04, 2020
Version 3.0

40 Comments

  • GeneSias's avatar
    GeneSias
    Copper Contributor

    Are there plans to convert the abilities of LGPO.exe into PowerShell and use a XML file for LGPO settings?? It would making managing a large fleet of non-domain PCs much easier. 

  • They are simple but useful and valuable tools.

    One feedback here, it would be nice to work on improving the UI and also add GUI menu for those who are primary using CLI too.

    We love both GUI and Commands and depending on use case we may use either.

  • haitao2020 - the LGPO.exe parser recognizes those actions in a registry policy (e.g., registry.pol) file, but does not otherwise support them. If you /parse a registry.pol that contains those commands, LGPO.exe will output what it finds as comments (that is, preceded with semicolons). I don't think I've ever seen those actions. Look for and parse an example of a %USERPROFILE%\ntuser.pol -- those seem to contain Comment commands, which LGPO.exe treats the same way.

  • haitao2020's avatar
    haitao2020
    Copper Contributor

    Does this version support parse registry actions with "Secure key" or "soft"? It's quite rare case, I can't find the examples.

  • Yes and we use WinPE 64-bit exclusively ever since we moved from BIOS to UEFI for devices.  We don't even maintain a 32-bit WinPE image.  This is a challenge for things which still require 32-bit binaries to run.

  • Neat stuff here.  It will be good to have an alternative when icacls.exe or Get-Acl | Set-Acl can't seem to get the job done.

    It would be nice for native 64-bit support for SetObjectSecurity so it will work in 64-bit Windows PE environments that don't have WOW64 subsystem.