Abuse Tokens

Enable all default token service account

If you compromise and service account for example svc_mssql account and the permission are disabled you can use the next tool to enable them.

SeImpersonate and SeAssignPrimaryToken

Favorite tool: GodPotatoarrow-up-right (Windows Server 2019/2022)

Tools:

CLSIDS working for Windows 2019/2022

SeTakeOwnershipPrivilege

SeDebugPrivilege

Event Log Readers

Members of this group can read event logs from local computers. The group is created when the server is promoted to a domain controller.

Process Name generated: 4688(S): A new process has been created. (This event generates every time a new process starts.)

circle-info

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.

SeBackupPrivilege

DnsAdmins

Malicious Custom DLL

Hyper-V Administrators

https://github.com/decoder-it/Hyper-V-admin-EOP/arrow-up-right

SeEnableDelegationPrivilege

If you possess the ability to add computer SeMachineAccountPrivilege and SeEnableDelegationPrivilege you can abuse oof unconstrained delegation.

Windows

Adding Computer to the domain controller

Enabling unconstrained delegation

UserAccountControl Values: useraccountcontrol-manipulate-account-propertiesarrow-up-right

Property flag
Value in decimal
Why?

WORKSTATION_TRUST_ACCOUNT

4096

Indicate is a machine account (mandatory)

TRUSTED_FOR_DELEGATION

524288

Enable Unconstrained Delegation

Total: 524288 + 4096 = 528384

Adding a malicious HTTP SPN

Note: make computer look like a real service by adding SPN HTTP/EVIL.delegate.vl

Checking the configuration applied

Adding a malicious DNS

Take time to replicate you can use nslookup evil.delegate.vl dc1.delegate.vl to sure is replicated into AD.

Running Krbrelayx to capture TGT

Use: pypykatz crypto nt 'Password123'

Coercing the authentication to malicious dns

Capturing the NT Hash via unconstrated delegation

Performing DCSync Attack against domain controller.

Linux

Creating a machine account

Adding the UserControlAccount attributes

Adding HTTP/CIFS SPN's to rogue computer

Checking the ServicePrincipalName

Running Krbrelayx to capture TGT

Coercing the authentication to malicious dns

Output from krbrelayx and printerbugshe;

Performing DCSync Attack

Server Operators

circle-info

If we issue the command whoami /priv, and don't see the SeLoadDriverPrivilege from an unelevated context, we will need to bypass UAC.

https://www.nirsoft.net/utils/driverview.html#google_vignettearrow-up-right

https://github.com/FuzzySecurity/Capcom-Rootkit/blob/master/Driver/Capcom.sysarrow-up-right

Last updated