From 8f101653b12f84842734826b99099704928cb96a Mon Sep 17 00:00:00 2001 From: Michael Grafnetter Date: Wed, 20 Dec 2023 18:43:13 +0100 Subject: [PATCH] Prepare for release 4.13 --- Documentation/CHANGELOG.md | 9 ++++++++- Src/DSInternals.Common/DSInternals.Common.nuspec | 2 +- Src/DSInternals.Common/Interop/UnicodeString.cs | 12 ++++++++++-- Src/DSInternals.Common/Properties/AssemblyInfo.cs | 4 ++-- .../DSInternals.DataStore.nuspec | 2 +- Src/DSInternals.DataStore/Properties/AssemblyInfo.cs | 4 ++-- .../Chocolatey/dsinternals-psmodule.nuspec | 5 ++--- Src/DSInternals.PowerShell/DSInternals.psd1 | 5 ++--- .../Properties/AssemblyInfo.cs | 4 ++-- Src/DSInternals.Replication.Interop/AssemblyInfo.cpp | 2 +- Src/DSInternals.Replication.Interop/version.rc | 8 ++++---- .../Properties/AssemblyInfo.cs | 4 ++-- .../DSInternals.Replication.nuspec | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- Src/DSInternals.SAM/DSInternals.SAM.nuspec | 2 +- Src/DSInternals.SAM/Properties/AssemblyInfo.cs | 4 ++-- 16 files changed, 43 insertions(+), 30 deletions(-) diff --git a/Documentation/CHANGELOG.md b/Documentation/CHANGELOG.md index 04b9043..8ae6fce 100644 --- a/Documentation/CHANGELOG.md +++ b/Documentation/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [4.13] - 2023-12-20 + +### Fixed + +- The [Set-LsaPolicyInformation](PowerShell/Set-LsaPolicyInformation.md#set-lsapolicyinformation) cmdlet now generates the [UNICODE_STRING](https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_unicode_string) structure with the trailing null character, to improve compatibility with NETLOGON. This issue mainly affects the functionality of the [New-ADDBRestoreFromMediaScript](PowerShell/New-ADDBRestoreFromMediaScript.md#new-addbrestorefrommediascript) cmdlet. Thanks Christoffer Andersson for reporting this issue and sorry Microsoft support escalation engineers for the trouble this bug has caused. + ## [4.12] - 2023-10-06 ### Added @@ -497,7 +503,8 @@ This is a [Chocolatey](https://chocolatey.org/packages/dsinternals-psmodule)-onl ## 1.0 - 2015-01-20 Initial release! -[Unreleased]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.12...HEAD +[Unreleased]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.13...HEAD +[4.13]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.12...v4.13 [4.12]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.11...v4.12 [4.11]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.10...v4.11 [4.10]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.9...v4.10 diff --git a/Src/DSInternals.Common/DSInternals.Common.nuspec b/Src/DSInternals.Common/DSInternals.Common.nuspec index 25b3da8..0bfcae9 100644 --- a/Src/DSInternals.Common/DSInternals.Common.nuspec +++ b/Src/DSInternals.Common/DSInternals.Common.nuspec @@ -14,7 +14,7 @@ This package is shared between all other DSInternals packages. Its main features are Azure AD Graph API and ADSI clients for for retrieval of cryptographic material. It contains implementations of common hash functions used by Windows, including NT hash, LM hash and OrgId hash. It also contains methods for SysKey/BootKey retrieval. This package is shared between all other DSInternals packages. -- Added support for parsing AES SHA2 Kerbers keys. +- Fixed a bug in LSA Policy modification. Copyright (c) 2015-2023 Michael Grafnetter. All rights reserved. ActiveDirectory Security AD AAD Identity Active Directory diff --git a/Src/DSInternals.Common/Interop/UnicodeString.cs b/Src/DSInternals.Common/Interop/UnicodeString.cs index 011af90..189029f 100644 --- a/Src/DSInternals.Common/Interop/UnicodeString.cs +++ b/Src/DSInternals.Common/Interop/UnicodeString.cs @@ -6,7 +6,7 @@ namespace DSInternals.Common.Interop /// /// The UnicodeString structure is used to define Unicode strings. /// - /// http://msdn.microsoft.com/library/windows/hardware/ff564879.aspx + /// https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_unicode_string [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct UnicodeString { @@ -31,14 +31,22 @@ public UnicodeString(string text) else { this.Buffer = text; + // Length of the unicode string. - this.Length = this.MaximumLength = (ushort)(text.Length * UnicodeCharLength); + this.Length = (ushort)(text.Length * UnicodeCharLength); + + // Length of the unicode string, including the trailing null character. + // Important: Some Windows components, including the Local Security Authority (LSA) do not behave properly if Length==MaximumLength. + this.MaximumLength = (ushort)(this.Length + UnicodeCharLength); } } /// /// The length, in bytes, of the string stored in Buffer. /// + /// + /// If the string is null-terminated, Length does not include the trailing null character. + /// public ushort Length; /// diff --git a/Src/DSInternals.Common/Properties/AssemblyInfo.cs b/Src/DSInternals.Common/Properties/AssemblyInfo.cs index 3cc27c1..739461c 100644 --- a/Src/DSInternals.Common/Properties/AssemblyInfo.cs +++ b/Src/DSInternals.Common/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DSInternals Common Library")] -[assembly: AssemblyVersion("4.12")] -[assembly: AssemblyFileVersion("4.12")] +[assembly: AssemblyVersion("4.13")] +[assembly: AssemblyFileVersion("4.13")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] diff --git a/Src/DSInternals.DataStore/DSInternals.DataStore.nuspec b/Src/DSInternals.DataStore/DSInternals.DataStore.nuspec index 948d6f5..e1c7b63 100644 --- a/Src/DSInternals.DataStore/DSInternals.DataStore.nuspec +++ b/Src/DSInternals.DataStore/DSInternals.DataStore.nuspec @@ -14,7 +14,7 @@ DSInternals DataStore is an advanced framework for offline ntds.dit file manipulation. It can be used to extract password hashes from Active Directory backups or to modify the sIDHistory and primaryGroupId attributes. DSInternals DataStore is an advanced framework for offline ntds.dit file manipulation. -- Support for Windows Server 2025 Insider Preview. +- Updated dependency version. Copyright (c) 2015-2023 Michael Grafnetter. All rights reserved. ActiveDirectory Security NTDS AD Identity Active Directory diff --git a/Src/DSInternals.DataStore/Properties/AssemblyInfo.cs b/Src/DSInternals.DataStore/Properties/AssemblyInfo.cs index 419a233..2171cab 100644 --- a/Src/DSInternals.DataStore/Properties/AssemblyInfo.cs +++ b/Src/DSInternals.DataStore/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DSInternals DataStore Library")] -[assembly: AssemblyVersion("4.12")] -[assembly: AssemblyFileVersion("4.12")] +[assembly: AssemblyVersion("4.13")] +[assembly: AssemblyFileVersion("4.13")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] diff --git a/Src/DSInternals.PowerShell/Chocolatey/dsinternals-psmodule.nuspec b/Src/DSInternals.PowerShell/Chocolatey/dsinternals-psmodule.nuspec index e7c99ab..3dd4a0c 100644 --- a/Src/DSInternals.PowerShell/Chocolatey/dsinternals-psmodule.nuspec +++ b/Src/DSInternals.PowerShell/Chocolatey/dsinternals-psmodule.nuspec @@ -3,7 +3,7 @@ DSInternals-PSModule - 4.12 + 4.13 https://github.com/MichaelGrafnetter/DSInternals/tree/master/Src/DSInternals.PowerShell/Chocolatey MichaelGrafnetter DSInternals PowerShell Module @@ -37,8 +37,7 @@ The DSInternals PowerShell Module has these main features: ## Disclaimer Features exposed through these tools are not supported by Microsoft. Improper use might cause irreversible damage to domain controllers or negatively impact domain security. -* Support for Windows Server 2025 Insider Preview. -* Improved KDS Root Key selection algorithm. +* Fixed a bug in LSA Policy modification. diff --git a/Src/DSInternals.PowerShell/DSInternals.psd1 b/Src/DSInternals.PowerShell/DSInternals.psd1 index 3f7b7bf..777897a 100644 --- a/Src/DSInternals.PowerShell/DSInternals.psd1 +++ b/Src/DSInternals.PowerShell/DSInternals.psd1 @@ -8,7 +8,7 @@ RootModule = 'DSInternals.Bootstrap.psm1' # Version number of this module. -ModuleVersion = '4.12' +ModuleVersion = '4.13' # Supported PSEditions # CompatiblePSEditions = 'Desktop' @@ -143,8 +143,7 @@ PrivateData = @{ # ReleaseNotes of this module ReleaseNotes = @" -- Support for Windows Server 2025 Insider Preview. -- Improved KDS Root Key selection algorithm. +- Fixed a bug in LSA Policy modification. "@ } # End of PSData hashtable diff --git a/Src/DSInternals.PowerShell/Properties/AssemblyInfo.cs b/Src/DSInternals.PowerShell/Properties/AssemblyInfo.cs index 10d7033..ca29534 100644 --- a/Src/DSInternals.PowerShell/Properties/AssemblyInfo.cs +++ b/Src/DSInternals.PowerShell/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DSInternals PowerShell Commands")] -[assembly: AssemblyVersion("4.12")] -[assembly: AssemblyFileVersion("4.12")] +[assembly: AssemblyVersion("4.13")] +[assembly: AssemblyFileVersion("4.13")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] diff --git a/Src/DSInternals.Replication.Interop/AssemblyInfo.cpp b/Src/DSInternals.Replication.Interop/AssemblyInfo.cpp index 6dfe003..4349e27 100644 --- a/Src/DSInternals.Replication.Interop/AssemblyInfo.cpp +++ b/Src/DSInternals.Replication.Interop/AssemblyInfo.cpp @@ -14,7 +14,7 @@ using namespace System::Security::Permissions; // [assembly:AssemblyTitleAttribute(L"DSInternals Replication Interop Library")]; // Note: Do not forget to change the version in version.rc files. -[assembly:AssemblyVersionAttribute("4.12")]; +[assembly:AssemblyVersionAttribute("4.13")]; [assembly:AssemblyDescriptionAttribute(L"")]; [assembly:AssemblyConfigurationAttribute(L"")]; [assembly:AssemblyCompanyAttribute(L"")]; diff --git a/Src/DSInternals.Replication.Interop/version.rc b/Src/DSInternals.Replication.Interop/version.rc index 1fb4768..41db9de 100644 --- a/Src/DSInternals.Replication.Interop/version.rc +++ b/Src/DSInternals.Replication.Interop/version.rc @@ -39,8 +39,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,12,0,0 - PRODUCTVERSION 4,12,0,0 + FILEVERSION 4,13,0,0 + PRODUCTVERSION 4,13,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -57,12 +57,12 @@ BEGIN BEGIN VALUE "CompanyName", "Michael Grafnetter" VALUE "FileDescription", "DSInternals Replication Interop Library" - VALUE "FileVersion", "4.12.0.0" + VALUE "FileVersion", "4.13.0.0" VALUE "InternalName", "DSInternals.Replication.Interop" VALUE "LegalCopyright", "Copyright © 2015-2023 Michael Grafnetter" VALUE "OriginalFilename", "DSInternals.Replication.Interop.dll" VALUE "ProductName", "DSInternals PowerShell Module" - VALUE "ProductVersion", "4.12.0.0" + VALUE "ProductVersion", "4.13.0.0" END END BLOCK "VarFileInfo" diff --git a/Src/DSInternals.Replication.Model/Properties/AssemblyInfo.cs b/Src/DSInternals.Replication.Model/Properties/AssemblyInfo.cs index ba3553c..8cc1035 100644 --- a/Src/DSInternals.Replication.Model/Properties/AssemblyInfo.cs +++ b/Src/DSInternals.Replication.Model/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DSInternals Replication Data Model")] -[assembly: AssemblyVersion("4.12")] -[assembly: AssemblyFileVersion("4.12")] +[assembly: AssemblyVersion("4.13")] +[assembly: AssemblyFileVersion("4.13")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] diff --git a/Src/DSInternals.Replication/DSInternals.Replication.nuspec b/Src/DSInternals.Replication/DSInternals.Replication.nuspec index 1f63c6d..f65d8c4 100644 --- a/Src/DSInternals.Replication/DSInternals.Replication.nuspec +++ b/Src/DSInternals.Replication/DSInternals.Replication.nuspec @@ -14,7 +14,7 @@ DSInternals Replication implements a client for the Active Directory Replication Service Remote Protocol (DRS-R). It can be used to remotely extract password hashes from domain controllers. DSInternals Replication implements a client for the Active Directory Replication Service Remote Protocol (DRS-R). -- Support for Windows Server 2025 Insider Preview. +- Updated dependency version. Copyright (c) 2015-2023 Michael Grafnetter. All rights reserved. ActiveDirectory Security RPC DRSR diff --git a/Src/DSInternals.Replication/Properties/AssemblyInfo.cs b/Src/DSInternals.Replication/Properties/AssemblyInfo.cs index 8daa432..3baa88e 100644 --- a/Src/DSInternals.Replication/Properties/AssemblyInfo.cs +++ b/Src/DSInternals.Replication/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DSInternals Replication Library")] -[assembly: AssemblyVersion("4.12")] -[assembly: AssemblyFileVersion("4.12")] +[assembly: AssemblyVersion("4.13")] +[assembly: AssemblyFileVersion("4.13")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] diff --git a/Src/DSInternals.SAM/DSInternals.SAM.nuspec b/Src/DSInternals.SAM/DSInternals.SAM.nuspec index d577c24..3b15ba0 100644 --- a/Src/DSInternals.SAM/DSInternals.SAM.nuspec +++ b/Src/DSInternals.SAM/DSInternals.SAM.nuspec @@ -14,7 +14,7 @@ DSInternals SAM implements a client for the Security Accounts Manager Remote Protocol (SAM-R) and Local Security Authority Remote Protocol(MS-LSAD or LSARPC). It can be used to import password hashes into Active Directory or to query and modify LSA Policy. DSInternals SAM implements a client for SAM-R and MS-LSAD/LSARPC protocols. -- Updated dependencies. +- Fixed a bug in LSA Policy modification. Copyright (c) 2015-2023 Michael Grafnetter. All rights reserved. ActiveDirectory Security RPC SAMR LSARPC AD Identity Active Directory diff --git a/Src/DSInternals.SAM/Properties/AssemblyInfo.cs b/Src/DSInternals.SAM/Properties/AssemblyInfo.cs index 45a269d..f700d55 100644 --- a/Src/DSInternals.SAM/Properties/AssemblyInfo.cs +++ b/Src/DSInternals.SAM/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DSInternals SAM Library")] -[assembly: AssemblyVersion("4.12")] -[assembly: AssemblyFileVersion("4.12")] +[assembly: AssemblyVersion("4.13")] +[assembly: AssemblyFileVersion("4.13")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")]