githubEdit

Windows Built in Groups

Windows Built-in Groups

Default groups on windows or when we install AD

Default groups

https://ss64.com/nt/syntax-security_groups.html

Severity

Many of these groups confer special privileges on their members and some can be leveraged to escalate privileges on a server or a Domain Controller.

Target Groups

Backup Operators
Event Log Readers
DnsAdmins

Hyper-V Administrators

Print Operators

Server Operators


Backup Operators

After landing on a machine, we can use the command whoami /groups to show our current group memberships if we are a member of the Backup Operators group we grant SeBackup and SeRestore privileges.

Privilege Definition

SeBackup privilege: allow to Traverse any folder and list contents and allow to copy any file even if there is no access control entry (ACE) for us in the folder's access control list (ACL)

exploit the SeBackupPrivilege

Importing Libraries

Verifying SeBackupPrivilege is Enabled

Let's check if SeBackupPrivilege is enabled

Enabling SeBackupPrivilege

Copying a Protected File

This privilege can now be leveraged to copy any protected file.

Before

After

Attacking a Domain Controller - Copying NTDS.dit

This group also permits logging in locally to a domain controller. The active directory database NTDS.dit is a very attractive target

As the NTDS.dit file is locked by default, we can use the Windows diskshadow utility to create a shadow copy of the C drive and expose it as E drive. The NTDS.dit in this shadow copy won't be in use by the system.

Copying NTDS.dit Locally

Next, we can use the Copy-FileSeBackupPrivilege cmdlet to bypass the ACL and copy the NTDS.dit locally.

Using Robocopy

Backing up SAM and SYSTEM Registry Hives

The privilege also lets us back up the SAM and SYSTEM registry hives, which we can extract local account credentials offline using a tool such as Impacket's secretsdump.py

Extracting Credentials from NTDS.dit

DSInternals (PowerShell Module):

Using SecretsDump