Skip to main content

Overview

SeManageVolumePrivilege allows a process to perform volume maintenance tasks — defragmentation, disk quotas, and filesystem-level operations. The critical capability from an attacker’s perspective: it grants the ability to call FSCTL_SD_GLOBAL_CHANGE on a volume, which can replace security descriptors globally across the entire filesystem. This effectively gives full read/write access to every file on the volume, including C:\Windows\System32. The privilege itself does not grant direct file access. The exploitation is a two-step process: first use the volume management capability to weaken ACLs on the entire disk, then exploit the resulting unrestricted filesystem access.

Who Has It by Default

SQL Server is the most common non-admin context where this privilege appears. The “Perform volume maintenance tasks” user right is routinely granted to SQL Server service accounts for database Instant File Initialization (IFI), which avoids zeroing out newly allocated database files.

Check if Enabled

Filter for it directly:
Expected output when exploitable:
If the privilege shows as Disabled, it can still be enabled programmatically in the current token using AdjustTokenPrivileges. The privilege only needs to be present in the token — the Enabled/Disabled state is a soft toggle that any code in your process can flip.

How It Works Technically

The privilege gates access to the FSCTL_SD_GLOBAL_CHANGE filesystem control code. This FSCTL instructs the NTFS driver to perform a find-and-replace operation on security descriptors across the entire volume. It was designed for domain migration scenarios where SIDs need to be remapped across all files on a disk. The API call chain:
The FSCTL_SD_GLOBAL_CHANGE control code value is 0x000900B0. The kernel checks for SeManageVolumePrivilege when the caller attempts to open the volume handle with MANAGE_VOLUME_ACCESS (also called FILE_READ_DATA on the volume device). If the privilege is present, the handle is granted and the FSCTL succeeds. In practical exploitation, the public tool SeManageVolumeExploit uses this mechanism to replace restrictive SDs with permissive ones, granting the current user Full Control over the entire C:\ drive.

Why This Is Dangerous

Unlike SeBackupPrivilege (read-only bypass) or SeRestorePrivilege (write-only bypass), SeManageVolumePrivilege gives a path to both read and write on every file on the volume — after a single FSCTL call. There is no need to open each file with special flags. Once the SDs are changed, standard copy, type, icacls, and every other file operation works normally with full access.

SeManageVolumeExploit Tool

The public exploit tool automates the FSCTL_SD_GLOBAL_CHANGE abuse. Repository: https://github.com/CsEnox/SeManageVolumeExploit

What It Does

  1. Opens a handle to \\.\C: with volume management access
  2. Calls NtFsControlFile with FSCTL_SD_GLOBAL_CHANGE
  3. Replaces the default NTFS security descriptors with ones granting the current user Full Control
  4. After execution, the current user can read and write any file on C:\

Build

Or compile with Developer Command Prompt:

Usage

No arguments needed. The tool targets C:\ by default. Expected output:

Verify Access

After running the exploit, confirm you now have full access:
You should see your user with (F) Full Control.
If this returns content (or at least does not say “Access denied”), the exploit worked.
The FSCTL_SD_GLOBAL_CHANGE operation modifies security descriptors on every file on the volume. This is noisy and destructive to the filesystem’s security posture. In a real engagement, plan your post-exploitation steps before running it, execute quickly, and clean up. There is no built-in undo — restoring original SDs requires a backup of the original $Secure stream or a system restore.

After Exploit: DLL Hijacking via IKEEXT Service (wlbsctrl.dll)

The most reliable post-exploitation path. The IKEEXT (IKE and AuthIP IPsec Keying Modules) service runs as NT AUTHORITY\SYSTEM and attempts to load wlbsctrl.dll from C:\Windows\System32 — but the DLL does not exist by default. After running SeManageVolumeExploit, you can write to System32.

Step 1 — Verify IKEEXT Exists and Its Start Type

Look for:

Step 2 — Confirm wlbsctrl.dll Is Missing

Expected: File Not Found.

Step 3 — Generate Malicious DLL

On your attacker machine:
Or a minimal DLL that spawns a reverse shell via C:
Cross-compile from Linux:

Step 4 — Transfer and Plant the DLL

Step 5 — Start Listener

Step 6 — Trigger IKEEXT

If you cannot restart IKEEXT (insufficient service control privileges), trigger it by initiating an IPsec connection or wait for a reboot:

Step 7 — Receive SYSTEM Shell


After Exploit: DLL Hijacking via Other Services

IKEEXT is not the only service that loads missing DLLs. Several other SYSTEM services have known missing DLL loads.

SessionEnv — TSMSISrv.dll

The Remote Desktop Configuration service (SessionEnv) attempts to load TSMSISrv.dll from System32.
Confirm LocalSystem and check if the DLL is missing:
Plant:

NetMan — wlanhlp.dll

The Network Connections service (NetMan) attempts to load wlanhlp.dll:
Plant:

Finding More Missing DLLs with Procmon

Use Process Monitor on a lab system with matching OS version:
Any DLL load that fails with NAME NOT FOUND from a SYSTEM service in C:\Windows\System32 is a candidate.

Additional Known Targets

Missing DLL targets vary by Windows version and installed roles/features. Always verify on the target system before assuming a DLL is missing. A DLL that is missing on Server Core may exist on a full Desktop Experience install.

After Exploit: Overwrite Service Binaries

With full write access to C:\, replace the executable that a SYSTEM service runs.

Find SYSTEM Services

Replace the Binary

Generate the payload:

Restart the Service

Target Services with Auto-Restart on Failure

If you cannot directly start/stop services, find ones with recovery actions set:
Look for RESTART -- Delay = ... in output. Replace the binary, then crash the service — it restarts automatically with your payload.

After Exploit: Read SAM/SYSTEM Directly

With full filesystem access, dump local credential hives without needing SeBackupPrivilege.

Save Registry Hives

Transfer to Attacker

Extract Hashes

Output:
Include LSA secrets and cached domain credentials:

Pass the Hash

Direct File Access (Alternative)

After the exploit, you can also read the raw hive files via Volume Shadow Copy:

After Exploit: Read Sensitive Files

Full filesystem access means every file on C:\ is readable. Target high-value files.

SSH Private Keys

KeePass Databases

PowerShell History (All Users)

Web Application Configs

Unattend / Sysprep Files (Plaintext Credentials)

Windows Credential Manager

Browser Data

Wi-Fi Profiles


After Exploit: Plant DLL in System32 or WinSxS

Beyond targeting specific service DLLs, you can plant DLLs in locations that affect a broad range of processes.

System32 DLL Planting

Any DLL placed in C:\Windows\System32 takes priority in the Windows DLL search order for most processes (unless SafeDllSearchMode is modified or the application uses absolute paths).
Common DLL names that many executables import:
Replacing real system DLLs in System32 will crash the system. Only plant DLLs with names that do not already exist in System32, or use DLL proxying (forward all exports to the real DLL while executing your payload).

WinSxS Directory

The WinSxS (Windows Side-by-Side) directory stores versioned copies of system DLLs. Applications that reference specific assembly versions load from WinSxS. With write access:
Replacing a DLL in WinSxS requires matching the exact version directory name. This is version-specific and less reliable than System32 planting but evades some monitoring that focuses on System32.

DLL Proxying for Stealth

To avoid breaking functionality when planting in System32, use DLL proxying. Your malicious DLL exports the same functions as the real DLL but forwards them:
Use SharpDllProxy or DLLirant to automate proxy DLL generation.

Alternative Exploitation: Manual FSCTL Approach

If you cannot use the public SeManageVolumeExploit binary (AV blocks it, cannot transfer it, etc.), implement the FSCTL call directly.

PowerShell — NtFsControlFile via P/Invoke

The SD_GLOBAL_CHANGE_INPUT structure requires building the old and new security descriptors in binary form. This is non-trivial in PowerShell — the public tool handles the structure construction. For a manual approach, it is more practical to write a minimal C/C++ program:

C Implementation — Minimal

Cross-compile:
The full implementation requires constructing valid SECURITY_DESCRIPTOR structures in their self-relative binary format. The SeManageVolumeExploit source code on GitHub is the best reference for the exact buffer layout. The manual approach is primarily useful when you need to modify the tool to target a specific volume or SD pattern.

C# Implementation

For execution via PowerShell Add-Type or as a standalone .NET assembly:
Compile:

Combine with Service Restart or Reboot

After gaining full filesystem access via SeManageVolumeExploit, most exploitation paths (DLL hijacking, binary replacement) require a service restart or system reboot to trigger the payload.

If You Can Restart Services

Most exploited accounts with SeManageVolumePrivilege (e.g., SQL Server service accounts) do not have sc control over arbitrary services. Check what you can control:

If You Cannot Restart Services

Wait for reboot — plant the DLL and wait. Auto-start services load DLLs at boot.
If DEMAND_START, the service only starts when triggered. Consider other auto-start services with missing DLLs, or use one of these triggers: Trigger IKEEXT without sc:
Force a scheduled reboot (if you have permissions):
Plant in a scheduled task output path:

Post-Reboot Persistence

After gaining SYSTEM via DLL hijack, establish a more reliable persistence mechanism:

Full Chain Walkthrough: SeManageVolumePrivilege to SYSTEM

End-to-end example from a SQL Server service account shell.

1. Confirm the Privilege

2. Run the Exploit

3. Verify Full Access

4. Plant wlbsctrl.dll

5. Trigger IKEEXT

If sc start fails with Access Denied, trigger it indirectly:

6. Catch SYSTEM Shell

On attacker:

7. Clean Up


Quick Reference