Site Logo
Niklas Heringer - Cybersecurity Blog
Cover Image

Active Directory Journey Day Four: Rights, Privileges, GPOs and a Whole Lot More

Table of Contents

Hey folks, been laying sick most of the week, only now getting better.. I’ll try to get back to regular pace as soon as possible, so let’s see what we have today hehe.

Today’s all about Rights & Privileges in AD. Hope you’ll enjoy!

Rights & Privileges in AD - broken down

In Active Directory, rights and privileges are the difference between “can I look around?” and “can I take over the company?”

Think of a right as the permission to enter a room - e.g., opening the Finance folder on a shared drive is such a right. A privilege however is the authority to perform an action - shredding documents or changing someone’s salary.

Term Analogy Example
Right Key to open a specific door Read a file, log in locally
Privilege Ability to perform a high-impact task Reset passwords, shut down server, install software

Rights = Access something. Privileges = Do something powerful.

Windows Quirks: “User Rights Assignment” != Just Rights

In Windows, there’s a setting called User Rights Assignment - but these are privileges, not mere rights!

It’s like labeling someone’s Job as “Janitor”, not giving proportional tribute to the fact that they also hold master keys to the building.. misleading name, powerful tool.

User Rights Assignment (URA) allows actions like:

As you can imagine, each of these is a powerful entry point when misconfigured.

Built-in AD Groups - The Secret Society of Privileges

Active Directory comes with a lot of pre-made groups .

Think of these like departments with secret clearance levels.

Membership here = silent power. And we’ll now find out how.

Top-Suspects: Dangerous Built-In Groups

Let’s highlight the juciest ones:

Group Powers (and Pitfalls)
Domain Admins God Mode. Full domain control. Being a member = owning the entire AD.
Administrators Local or domain-wide (on DCs) full access. Always high-value.
Backup Operators Can copy any file - including NTDS.dit, even if denied. Often overlooked. Dangerous.
Server Operators Manage services and shares on DCs. Add a service = get SYSTEM. Easily abused.
Print Operators Yes, printers. But they can also log into DCs. Rare, but can be weaponized via driver hijacks.
DnsAdmins If DNS is on a DC, DnsAdmins = code execution on the DC via DLL path changes. Huge.
Hyper-V Admins Virtual DCs? This group can access their disk. Thatโ€™s game over.
Schema Admins Change the DNA of AD. Add fields, inject backdoors. Only needed briefly - should be empty.
Enterprise Admins Forest-wide power. Create domains, trusts, users. Dangerous if cross-forest trusts exist.
Account Operators Manage users (except Admins). Can create new privileged accounts if monitored poorly.

Some look harmless.. but aren’t

Group Why You Should Care
Remote Desktop Users Anyone here can log in via RDP. That might be all an attacker needs.
Remote Management Users Same idea - allows remote PowerShell and WinRM access.
Event Log Readers Can read sensitive logs (like security events) - stealthy privilege.
Preโ€“Windows 2000 Access Often a legacy setting. Can allow anonymous users to read too much. Dangerous if still in use.
Group Policy Creators Can craft GPOs to deploy malware, add users, or set startup scripts. Power hidden behind creativity.

AD Group Membership = Privileges

Remember: being in the right group is like having a master keycard - you don’t need to break the lock, you just swipe.

Attackers love:

Group Metadata in AD

PS C:\> Get-ADGroup -Identity "Server Operators" -Properties *

Look for:

These details help you:

Quick Recap - Built-In Groups you MUST know

Group Danger Level Notes
Domain Admins ๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€ Full domain compromise. Ultimate prize.
Backup Operators ๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€ Dump NTDS.dit. Can bypass file ACLs.
DnsAdmins ๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€ DLL injection = code on DC.
Server Operators ๐Ÿ’€๐Ÿ’€๐Ÿ’€ Manage DC services. Escalation vector.
Print Operators ๐Ÿ’€๐Ÿ’€ Load drivers โ†’ escalate. Often ignored.
Hyper-V Admins ๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€ Access DCs if virtual. Path to NTDS.dit.
Schema Admins ๐Ÿ’€๐Ÿ’€๐Ÿ’€ Rarely needed. Remove members immediately after use.
Enterprise Admins ๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ’€ Forest-wide. Watch out in trust scenarios.
Remote Desktop Users ๐Ÿ’€ RDP access = foothold.

The Most Dangerous Privileges - Deep Dive ๐Ÿ”ฌ

Some User Rights are just there. Others are loaded weapons.
Letโ€™s dissect the most abusable ones, what they mean in practice, and how attackers use them.

SeRemoteInteractiveLogonRight: Logon via RDP

This right allows a user to log in remotely via RDP .

Why it Matters

Enumeration

Get-LocalGroupMember -Group "Remote Desktop Users"

Abuse

If you’re a pentester and find yourself in a group that grants this right:

mstsc /v:<target-ip>

or from PowerShell:

Enter-PSSession -ComputerName <target-ip>

SeBackupPrivilege: Bypass File Access Control Lists (ACLs)

Lets users read any file, regardless of permissions, for backup purposes.

Using this, we can dum NTDS.dit, SAM, SYSTEM, SECURITY, all without being Admin.

To exploit this for stealthy exfiltration, we can combine it with

Co-Work with Shadow Copies

Shadow Copies, also called Volume Shadow Copy Service (VSS), is a Microsoft Technology, enabling snapshots and safety copies of files or whole disks while they are in use.

Abuse (Dumping SAM/SYSTEM)

reg save HKLM\SAM sam.bak
reg save HKLM\SYSTEM system.bak

Abuse (NTDS.dit via Shadow Copy):

vssadmin create shadow /for=C:
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\NTDS\ntds.dit .

โš ๏ธ Add SeRestorePrivilege and SeSecurityPrivilege to make this even more dangerous.

SeDebugPrivilege: Read Process Memory

Enables reading/modifying memory of any process, including SYSTEM ones like lsass.exe .

Used in

Abuse with Mimikatz

privilege::debug
sekurlsa::logonpasswords

You’ll need to be in an elevated session to access LSASS memory.

SeImpersonatePrivilege: Become Someone Else

Let’s you impersonate tokens of other users/services - like SYSTEM.

Why it’s cricital

Tools & Examples

Notable tools to exploit this right are JuicyPotato , RoguePotato , PrintSpoofer , GenericPotato , RogueWinRM

Example (PrintSpoofer):

PrintSpoofer.exe -i -c cmd.exe

Modern GenericPotato:

GenericPotato.exe -m COM -t SYSTEM -p "cmd.exe"

SeLoadDriverPrivilege: Kernel Access

Lets a user load unsigned drivers into the kernel.

Why it’s Dangerous

Abuse

If we can create a malicious driver .sys file, we can then load it via registry:

reg add HKLM\SYSTEM\CurrentControlSet\Services\MyDriver /v ImagePath /t REG_EXPAND_SZ /d \??\C:\MyDriver.sys /f

and start the driver cia:

sc create MyDriver type= kernel binPath= "C:\MyDriver.sys"
sc start MyDriver

This is not so commonly abused due to needing a valid (but malicious) driver file, but it is very powerful.

SeTakeOwnershipPrivilege: Own Protected Objects

Lets you take ownership of files/folders/registry keys even without access.

Why it matters

Abuse

Taking ownership:

takeown /f C:\SensitiveFolder /r /d y

Granting yourself full control:

icacls "C:\SensitiveFolder" /grant youruser:F /t

You still need the Modify Permissions right on the file, unless you’re SYSTEM or Admin.

Summar - Abuse Cheatsheet

Privilege What It Lets You Do Common Tools / TTPs Used
SeRemoteInteractiveLogonRight Log in via RDP mstsc, Enter-PSSession, lateral movement
SeBackupPrivilege Read any file, bypass ACLs reg save, vssadmin, copy NTDS.dit
SeDebugPrivilege Dump memory of any process Mimikatz, procdump, custom tools
SeImpersonatePrivilege Run as SYSTEM from user context PrintSpoofer, RoguePotato, GenericPotato, etc.
SeLoadDriverPrivilege Load malicious kernel-mode drivers sc.exe, reg add, custom driver loaders
SeTakeOwnershipPrivilege Become file/registry owner, change ACLs takeown, icacls

Enumerating Privileges: whoami /priv

Want to know what powers a user really has? This is your first stop.

The whoami /priv command lists all privileges assigned to the current user, and whether they are enabled or disabled in the session.

PS C:\htb> whoami /priv

But there’s a catch…

UAC: The Privilege Gatekeeper

Since Windows Vista, User Account Control (UAC) ensures even administrators don’t run everything with full privileges by default.

You have to explicitly request elevation - either through Run As Administrator, an elevated PowerShell session or a UAC prompt - to actually use some of your assigned rights.

This is where attackers trip up - or get creative.

Case 1: Standard Domain User

User: john.doe in Domain Users only.

PS C:\htb> whoami /priv

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

Privilege Name                Description                    State
============================= ============================== ========
SeChangeNotifyPrivilege       Bypass traverse checking       Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled

๐Ÿ” Analysis:

Case 2: Domain Admin (Non-Elevated Session)

User: Administrator, but launched PowerShell without elevation.

PS C:\htb> whoami /priv

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

Privilege Name                Description                    State
============================= ============================== ========
SeShutdownPrivilege           Shut down the system           Disabled
SeChangeNotifyPrivilege       Bypass traverse checking       Enabled
SeUndockPrivilege             Remove computer from dock      Disabled
SeTimeZonePrivilege           Change the time zone           Disabled

๐Ÿ” Analysis:

PLEASE drink a cup of water right now! Take a break, stretch, then go on.

Case 3: Domain Admin (Elevated Session)

Same user, now launched “Run as Administrator”.

PS C:\htb> whoami /priv

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

Privilege Name                Description                    State
============================= ============================== ========
SeDebugPrivilege              Debug programs                     Enabled
SeBackupPrivilege             Back up files and directories      Disabled
SeImpersonatePrivilege        Impersonate client after auth      Enabled
SeTakeOwnershipPrivilege      Take ownership                     Disabled
...

๐Ÿ” Analysis:

Example: Mimikatz needs SeDebugPrivilege enabled, which is only active in this elevated session.

Case 4: Backup Operators Group Member

PS C:\htb> whoami /priv

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

Privilege Name                Description                    State
============================= ============================== ========
SeShutdownPrivilege           Shut down the system           Disabled
SeChangeNotifyPrivilege       Bypass traverse checking       Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled

๐Ÿ” Analysis:

SharpUp or Seatbelt can enumerate these rights across systems.

Takeaways

Scenario What You See Whatโ€™s Hidden
Standard user Low-priv output No attack paths visible
Admin (non-elevated) Looks weak Rights like SeDebugPrivilege are dormant
Admin (elevated) All juicy rights show up Game on - escalation ready
Backup Operator Looks like nothing Privs like SeBackupPrivilege lie dormant

Why this matters for us

Tips for Lab Testing

If you’re unsure what a user should or shouldn’t be able to do, compare output between:

whoami /priv

vs.

Start-Process powershell -Verb runAs

Then run whoami /priv again inside the elevated shell.

Active Directory Security Basics: Hardening the Castle Walls

Imagine AD a giant castle, built for comfort and peace, but the walls have.. gaps.

By design, Active Directory leans heavily toward Availability in the CIA Triad - you should read it, it is often quoted and used (wrong), which is why i am going to explain it again.

Turns out determining your CIA Triad priorities is not always that simple..

AD is meant to make sharing easy, access simple and admin tasks scalable.

But as defenders (or attackers ๐Ÿ‘€), we have to ask ourselves: “Supposing our security measures fail, what if someone actually gets inside?”

The CIA Triad - A Balancing Act

Security is all about juggling:

CIA Element In AD Context AD Default Focus
Confidentiality Permissions, Group Memberships โœ…
Integrity Preventing tampering, logging โŒ
Availability Users can always log in, access stuff โœ…โœ…

AD favours easy access and availability over (hard) security by default. Let’s talk about fixing that.

General Active Directory Hardening Measures

Think of these as installing different kinds of deadbolts on our castle doors.

LAPS (Local Administrator Password Solution)

One admin password to rule them all? Terrible idea.

LAPS randomizes the local admin password per machine and rotates it regularly. This:

Want to check your LAPS config?

Get-AdmPwdPassword -ComputerName TARGET

The prerequisites for this are LAPS installed & rights to view passwords.

Audit Policy Settings: See Everything, Miss Nothing

“If it’s not logged, did it even happen?”

Set up logging to catch:

Key tools:

Group Policy: More Than Just Wallpaper Settings

GPO = Admin spellbook. Use it wisely.

Account Policies

Control how users authenticate:

Local Policies

Per-machine hardening:

Software Restriction Policies & AppLocker

Want to block PowerShell for interns? AppLocker is your friend.

Block:

๐Ÿ’ก These can often be bypassed, but it adds friction - and friction buys detection time.

Tools like Applocker serve as so-called Application Control Policies

Advanced Audit Policy Configuration

GPO Path: Computer Configuration โ†’ Policies โ†’ Windows Settings โ†’ Advanced Audit Policy Configuration

Audit events like:

Enable what’s useful, but avoid log floods - they hide real attacks in noise.

Patch Management: WSUS & SCCM

Unpatched = unhardended. Always.

Even with the best GPOs and SIEM in place, unpatched systems = easy prey.

Options:

๐Ÿ’ก Missed patch = EternalBlue all over again :')

Group Managed Service Accounts (gMSA)

Service accounts with 120-character auto-changing passwords you donโ€™t even know? Hell yes.

Why gMSAs rock:

Check out usage:

Get-ADServiceAccount -Filter *

Warning: Not all apps support gMSAs. Test before rollout!

Security Groups: Controll Access Like a Pro

Don’t assign rights to users - assign to groups! Always!

Why?

Use:

GPOs, folder permissions, RDP, and file shares should only point to groups.

First of Two: AD Hardening TL;DR

Security Measure Why It Matters
LAPS Prevents password reuse across hosts
Audit Policies Detects weird behavior before it’s too late
GPO Hardening Controls user capabilities system-wide
AppLocker Stops unauthorized tools & scripts
Patch Management Kills known vulnerabilities
gMSA Secures service accounts
Security Groups Simplifies access management & auditing

Start here. Add more layers later. Defense in depth isnโ€™t optional, itโ€™s survival.

Built-in Security Groups โ€“ Hidden Gatekeepers

Active Directory comes with many default groups - and while some are harmless, others carry serious power.

If Domain Admins are the kings, groups like Account Operators or Backup Operators are their trusted stewards โ€“ with keys to specific, juicy chambers.

๐Ÿ’ก Always review group memberships. Tools like:

Get-ADGroupMember "Account Operators"

or BloodHound can reveal attack paths through nested groups.

Account Separation โ€“ One Hat at a Time

Admins should never do email and domain work with the same account. Thatโ€™s like carrying sensitive blueprints while visiting a food court.

Best practice:

This limits:

Passwords, Passphrases & 2FA

A complex 8-character password isnโ€™t good enough anymore.

โ€œWinter2024!โ€ might pass AD complexity, but Iโ€™d try it within the first 10 guesses.โ€ โ€“ Every pentester ever

Recommendations for Good Passwords

Spray attacks succeed when people get lazy with passwords. Make laziness harder.

Limiting Domain Admin Usage

Domain Admins should only touch Domain Controllers.

Using a DA account on a workstation is like:

Restrict DA logins with:

Set-ADUser -Identity da_user -LogonWorkstations "DC01"

Combine with Tiered Admin Models โ€“ protect Tier 0 assets with surgical access.

Remove Stale Users & Ghost Accounts

If an account hasnโ€™t logged in since 2015โ€ฆ you probably donโ€™t want to find out what it has access to during a breach.

Audit and disable:

PowerShell to the rescue:

Search-ADAccount -AccountInactive -UsersOnly -TimeSpan 90.00:00:00

Permissions & Access Audits

How many Domain Admins do you have?

If the answer is more than 5, it’s probably too many.

Audit:

๐Ÿ’ก Use tools like:

Audit Policies & Logging

No logs = No visibility = No security

Enable and centralize:

Use:

auditpol /get /category:*

And feed into a SIEM for real-time detection.

Restricted Groups

Want to enforce group membership via GPO?

Use Restricted Groups to:

Configure in GPO:

Computer Configuration โ†’ Policies โ†’ Windows Settings โ†’ Security Settings โ†’ Restricted Groups

Server Role Separation โ€“ Keep Services in Their Lanes

Installing IIS on a Domain Controller?

Thatโ€™s like hosting your castleโ€™s party in the war room. Bad idea.

Never co-locate:

Isolate roles to minimize:

Limit Local Admins & RDP

If Domain Users can RDP or are in Administrators group on a workstation - that’s a recipe for pwnage.

Audit RDP rights:

Get-LocalGroupMember -Group "Remote Desktop Users"

Restrict with:

You could disable RDP entirely where not needed. Itโ€™s a door - and doors are attack surfaces.


Second of Two: AD Hardening TL;DR

Control Why You Need It
Account Separation Minimize exposure of admin creds
Password Hygiene + 2FA Stop brute-force & spray attacks
Limit Domain Admin Usage Contain blast radius in case of breach
Audit Stale Objects Eliminate forgotten access paths
Restrict Group Memberships Reduce overprivilege & lateral movement
Segment Roles Minimize service attack surfaces
Control RDP + Local Admins Prevent easy access & credential theft

Group Policy in Active Directory - Introduction

If Active Directory is the heart of your Windows network, Group Policy is the nervous system: sending instructions, enforcing rules, and keeping things in sync across thousands of machines.

What is Group Policy

Group Policy is a feature in Windows that allows administrators to define rules and configurations that are then automatically applied to users and computers.

These rules are grouped into objects called Group Policy Objects (GPOs).

Think of a GPO like a company-wide policy memo:

Once published, the whole office complies, whether you like it or not.

Where Group Policy Lives

In AD, Group Policy becomes a weapon for both defense and offense - hardening systems or, when misused, opening dangerous backdoors.

What Can You Actually Do With GPOs?

Here’s just a taste of what GPOs let you control:

Use Case Example
Enforce security policies Password length, complexity, lockout settings, Kerberos ticket lifetime
Lock down systems Block USBs, disable PowerShell, rename guest/admin accounts
Restrict applications Prevent cmd.exe, block .ps1 scripts via AppLocker
Automate scripts or startup tasks Logon banner, drive mapping, cleanup scripts
Enable detailed auditing File access, user logon/logoff, privilege use
Deploy software or updates Install antivirus, push configs, schedule reboots

Where GPOs Are Applied: Scope & Precedence

Group Policy is hierarchical - policies are applied in this order:

  1. Local Group Policy (lowest priority)
  2. Site-Level GPOs
  3. Domain-Level GPOs
  4. Organizational Unit (OU) GPOs
  5. Child OU Policies (highest priority)

If two GPOs conflict, the one applied last takes precedence.

Example:

The OU policy wins, unless the Domain policy is marked Enforced.

You can also:

GPO Refresh Timing: When Do Settings Apply?

Group Policy isn’t instant. Hereโ€™s how often settings are refreshed:

Target Default Interval
Users & Computers Every 90 minutes ยฑ30 min jitter
Domain Controllers Every 5 minutes

๐Ÿ›  Force a GPO update manually:

gpupdate /force

๐Ÿ“Œ Modify this interval via GPO: Computer Configuration โ†’ Policies โ†’ Administrative Templates โ†’ System โ†’ Group Policy

Default GPOs

Default Domain Policy

Automatically created - used to apply domain-wide settings (e.g. password policy)

Default Domain Controllers Policy

Applies to all DCs in the domain. Covers things like audit policy, user rights.

Best Practice: Don’t bloat these default GPOs too much. Use separate GPOs for role-specific settings, then link them to the correct OUs.

Group Policy in Active Directory - Risks & Real Defense

Group Policy isn’t just a sysadmin’s toolkit - it’s an attackerโ€™s dream when misconfigured.

After understanding how GPOs work and where they apply, itโ€™s time to come back to our red side of the fence - and then see how we can reinforce the blue-side barricades.

How Attackers Abuse Group Policy

Once an attacker gains access to an account that can modify or link GPOs, theyโ€™re one step away from:

Example Attacks:

One GPO linked to the wrong OU = full environment compromise.

BloodHound + GPOs: Mapping Attack Paths

Remember BloodHound from my earlier posts? Tt’s brilliant at spotting GPO misuse.

Example

๐Ÿ’ก Even indirect group membership, like nested groups, can create exploitable paths.

Defending Against GPO Abuse

Letโ€™s flip the table and reinforce our domain using the same toolset.

1. Audit & Lock Down GPO Permissions

Run:

Get-GPO -All | ForEach-Object {
  Get-GPPermission -Guid $_.Id -All
}

โ†’ Review who can edit or link each GPO. Strip down unnecessary write access.

2. Use Enforced GPOs Carefully

3. Enable GPO Auditing

GPOs are code. You need version control.

Enable advanced audit policies:

4. Follow Least Privilege for GPO Management

5. Clean Up & Control Scope

6. Watch Out for GPO Abuse Tactics

Common red flags:

๐Ÿšฉ Indicator โš ๏ธ Potential Risk
Users in groups with GPO edit rights Unintended privilege escalation paths
Unlinked but enabled GPOs Stealthy persistence (can be re-linked later)
GPOs granting local admin access Lateral movement vectors
GPOs with scripts or scheduled tasks Malware deployment method

Group Policy can be a security blanket - or a loaded weapon. The key difference? Understanding, visibility, and careful administration.

Now that youโ€™ve seen how GPOs work, how they’re structured, and how they can be used for good (or evil), youโ€™re better prepared to:


This is it queens, this is the wrap up for this one. Next is the Lab itself. Finally. I am slowly feeling better, let’s see when i’ll be restored back to full strength.

Until the next one! Drink enough water!