DSInternals.DataStore 6.3.0

Prefix Reserved
dotnet add package DSInternals.DataStore --version 6.3.0
                    
NuGet\Install-Package DSInternals.DataStore -Version 6.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DSInternals.DataStore" Version="6.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DSInternals.DataStore" Version="6.3.0" />
                    
Directory.Packages.props
<PackageReference Include="DSInternals.DataStore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DSInternals.DataStore --version 6.3.0
                    
#r "nuget: DSInternals.DataStore, 6.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DSInternals.DataStore@6.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DSInternals.DataStore&version=6.3.0
                    
Install as a Cake Addin
#tool nuget:?package=DSInternals.DataStore&version=6.3.0
                    
Install as a Cake Tool

DSInternals DataStore Library

Introduction

The DSInternals.DataStore package allows you to directly access and modify the Active Directory database without running a domain controller.

Key Features

  • Password Hash Extraction: Extract NT hashes, LM hashes, and password history from ntds.dit
  • Account Manipulation: Modify account attributes like sIDHistory and primaryGroupId
  • Backup Key Extraction: Retrieve DPAPI backup keys from the database
  • Trust Password Extraction: Extract inter-domain trust passwords and derive Kerberos trust keys
  • KDS Root Key Access: Retrieve Key Distribution Service root keys for gMSA password computation
  • LAPS Password Decryption: Decrypt Windows LAPS encrypted passwords
  • DNS Zone Export: Extract DNS resource records from AD-integrated zones
  • BitLocker Recovery: Extract BitLocker recovery information

Usage Examples

Opening an ntds.dit File

using DSInternals.DataStore;

// Open the database in read-only mode
string ntdsPath = @"C:\Backup\ntds.dit";

using var context = new DirectoryContext(ntdsPath, readOnly: true);
using var agent = new DirectoryAgent(context);

Console.WriteLine($"Domain: {context.DomainController.DomainName}");
Console.WriteLine($"Forest Mode: {context.DomainController.ForestMode}");

Extracting Password Hashes

using DSInternals.DataStore;

string ntdsPath = @"C:\Backup\ntds.dit";
byte[] bootKey = /* Extract from SYSTEM registry hive */;

using var context = new DirectoryContext(ntdsPath, readOnly: true);
using var agent = new DirectoryAgent(context);

// Enumerate all accounts with password hashes
foreach (var account in agent.GetAccounts(bootKey))
{
    Console.WriteLine($"Account: {account.SamAccountName}");

    if (account.NTHash != null)
    {
        string ntHash = BitConverter.ToString(account.NTHash).Replace("-", "");
        Console.WriteLine($"NT Hash: {ntHash}");
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net9.0-windows7.0 is compatible.  net10.0-windows was computed. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.3.0 217 2/8/2026
6.1.0 2,140 8/17/2025
6.0.0 257 8/14/2025
5.3.0 1,070 4/11/2025
5.2.0 347 4/9/2025
5.0.0 231 3/3/2025
4.16.0 426 1/5/2025
4.14.0 902 4/13/2024
4.13.0 420 12/20/2023
4.12.0 290 10/6/2023
4.11.0 278 10/1/2023
4.10.0 283 9/16/2023
4.9.0 527 2/25/2023
4.8.0 2,312 12/6/2022
4.7.0 732 10/30/2021
4.6.0 2,174 10/19/2021
4.5.0 616 10/13/2021
4.3.0 1,784 4/2/2020
4.2.0 839 3/18/2020
4.1.0 851 12/12/2019
Loading failed

- Updated assembly dependencies.