Windows Group Privilege

Backup Operators

Importing Libraries

PS C:\> Import-Module .\SeBackupPrivilegeUtils.dll
PS C:\> Import-Module .\SeBackupPrivilegeCmdLets.dll

Verifying SeBackupPrivilege is Enabled

PS C:\> whoami /priv

PRIVILEGES INFORMATION
----------------------

Privilege Name                Description                    State
============================= ============================== ========
SeMachineAccountPrivilege     Add workstations to domain     Disabled
SeBackupPrivilege             Back up files and directories  Disabled
SeRestorePrivilege            Restore files and directories  Disabled
SeShutdownPrivilege           Shut down the system           Disabled
SeChangeNotifyPrivilege       Bypass traverse checking       Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
PS C:\htb> Get-SeBackupPrivilege

SeBackupPrivilege is disabled

Enabling SeBackupPrivilege

Copying a Protected File

Attacking a Domain Controller - Copying NTDS.dit

Copying NTDS.dit Locally

Backing up SAM and SYSTEM Registry Hives

Extracting Credentials from NTDS.dit

Extracting Hashes Using SecretsDump

Robocopy

another way

Backup the SAM, SYSTEM, and SECURITY Hives:

Extract Password Hashes Using Tools:

Event Log Readers

Confirming Group Membership

Searching Security Logs Using wevtutil

Searching Security Logs Using Get-WinEvent

DnsAdmins

Leveraging DnsAdmins Access

Generating Malicious DLL

Downloading File to Target

Loading DLL as Non-Privileged User

Loading DLL as Member of DnsAdmins

Loading Custom DLL

Finding User's SID

Checking Permissions on DNS Service

Stopping the DNS Service

Starting the DNS Service

Confirming Group Membership

Cleaning Up

Confirming Registry Key Added

Deleting Registry Key

Starting the DNS Service Again

Checking DNS Service Status

Using Mimilib.dll

Creating a WPAD Record

Disabling the Global Query Block List

Adding a WPAD Record

Hyper-V Administrators

Target File

Taking Ownership of the File

Confirming Privileges

Checking Privileges Again

Compile with cl.exe

Add Reference to Driver

Capcom.sysarrow-up-right

Verify Driver is not Loaded

DriverView.exearrow-up-right

Verify Privilege is Enabled

Verify Capcom Driver is Listed

Use ExploitCapcom Tool to Escalate Privileges

Alternate Exploitation - No GUI

CommandLine

Automating the Steps

Automating with EopLoadDriver

Clean-up

Removing Registry Key

Server Operators

Querying the AppReadiness Service

Checking Service Permissions with PsService

Checking Local Admin Group Membership

Modifying the Service Binary Path

Starting the Service

Confirming Local Admin Group Membership

Confirming Local Admin Access on Domain Controller

Retrieving NTLM Password Hashes from the Domain Controller

Last updated