Group Privileges

Abusing Group Privileges

ko-fi

Dangerous Groups

whoami /groups

Always run the command from an admin shell if possible, some privs can not be seen otherwse

Build-in Groups

We should always check these groups and include a list of each group's members as an appendix in our report for the client to review and determine if access is still necessary.

Backup Operators

Check SeBackupPrivilege in User Privileges

Pre-compiled Tools

SeBackupPrivilege ?

or

Enable SeBackupPrivilege: Set-SeBackupPrivilege

Copying a Protected File

Attacking a Domain Controller - Copying NTDS.dit

This group also permits logging in locally to a domain controller.

Diskshadow

Copy ntds.dit

or with Robocopy

Backing up SAM and SYSTEM Registry Hives

Extract credentials

  • PowerShell DSInternals

  • Secretsdump

NTDS secrets

With NXC

References

Event Log Readers

Confirming Group Membership

Searching Security Logs Using wevtutil

Passing Credentials to wevtutil

Searching Security Logs Using Get-WinEvent

Note: Searching the Security event log with Get-WInEvent requires administrator access or permissions adjusted on the registry key HKLM\System\CurrentControlSet\Services\Eventlog\Security. Membership in just the Event Log Readers group is not sufficient.

Can also be run as another user with the -Credential parameter.

Other logs include PowerShell Operational log, which may also contain sensitive information or credentials if script block or module logging is enabled. This log is accessible to unprivileged users.

DnsAdmins

Generating Malicious DLL

Loading DLL as Member of DnsAdmins

Note: We must specify the full path to our custom DLL or the attack will not work properly.

The DLL will be loaded the next time the DNS service is started. Membership in the DnsAdmins group doesn't give the ability to restart the DNS service, but this is conceivably something that sysadmins might permit DNS admins to do.

Finding User's SID

Checking Permissions on DNS Service

RPWP permissions which translate to SERVICE_START and SERVICE_STOP, respectively.

Stopping the DNS Service

Starting the DNS Service

Confirming Group Membership

Sign out using "Start" then log in back to apply the changes

Cleaning Up

Making configuration changes and stopping/restarting the DNS service on a Domain Controller are very destructive actions and must be exercised with great care. We should only carry out with explicit permission from and in coordination with our client.

Using Mimilib.dll

Modifying the kdns.c file to execute a reverse shell one-liner

Creating a WPAD Record

Use a tool such as Responder or Inveigh to perform traffic spoofing, and attempt to capture password hashes and crack them offline or perform an SMBRelay attack

Disabling the Global Query Block List

Adding a WPAD Record pointing to our attack machine

Hyper-V Administrators

If Domain Controllers have been virtualized, then the virtualization admins should be considered Domain Admins

If the operating system is vulnerable to CVE-2018-0952 or CVE-2019-0841, we can leverage this to gain SYSTEM privileges. Otherwise, we can try to take advantage of an application on the server that has installed a service running in the context of SYSTEM, which is startable by unprivileged users,

For exemple Firefox:

After running the PowerShell script, we should have full control of this file and can take ownership of it.

Next, we can replace this file with a malicious maintenanceservice.exe, start the maintenance service, and get command execution as SYSTEM.

Note: This vector has been mitigated by the March 2020 Windows security updates, which changed behavior relating to hard links.

SeLoadDriverPrivilege

From administrative command shell

The driver Capcom.sys contains functionality to allow any user to execute shellcode with SYSTEM privileges.

Download the poc locally and edit it, pasting over the includes below.

Next, from a Visual Studio 2019 Developer Command Prompt, compile it using cl.exe. Or use pre-compiled tools

Compile with cl.exe

Add Reference to Driver

Download the Capcom.sys driver from here, and save it to C:\temp. Issue the commands below to add a reference to this driver under our HKEY_CURRENT_USER tree.

Verify Driver is not Loaded

Verify Privilege is Enabled

Verify Capcom Driver is Listed

Use ExploitCapcom Tool to Escalate Privileges

Alternate Exploitation - No GUI

Modify the ExploitCapcom.cpp code before compiling. Here we can edit line 292 and replace "C:\\Windows\\system32\\cmd.exe" with, say, a reverse shell binary created with msfvenom, for example: c:\ProgramData\revshell.exe.

CommandLine string in this example would be changed to:

Automating the Steps

Automate the process of enabling the privilege, creating the registry key, and executing NTLoadDriver to load the driver

Then run ExploitCapcom.exe to pop a SYSTEM shell or run our custom binary

Clean up

Pre-compiled Tools

Server Operators

It is a very highly privileged group that can log in locally to servers, including Domain Controllers. => Target the DC

Membership of this group confers the powerful SeBackupPrivilege and SeRestorePrivilege privileges and the ability to control local services.

Querying the AppReadiness Service

Checking Service Permissions with PsService

Checking Local Admin Group Membership

Our target account is not present.

Modifying the Service Binary Path

Add our current user to the default local administrators group

Starting the Service

Starting the service fails, which is expected.

But, if we check the membership of the administrators group, we see that the command was executed successfully.

Sign out using "Start" then log in back to apply the changes

Retrieving NTLM Password Hashes from the Domain Controller

“Network Configuration Operators” group

Active Directory Domain Services Elevation of Privilege Vulnerability (CVE-2025-21293)

DHCP Administrators Group

Interesting Book

Interesting Books

Disclaimer: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.

Support this Gitbook

I hope it helps you as much as it has helped me. If you can support me in any way, I would deeply appreciate it.

ko-fi

buymeacoffee

Last updated