Backup Operators
Backup Operators
Membership of this group grants its members the
SeBackupandSeRestore
SeBackup
SeBackupPrivilegeiallows a user to bypass file and directory permission checks to perform backups. When granted, a user can read all files, regardless of the ACLs set on them, for backup purposes.
POC
We use this POC for the attack => https://github.com/giuliano108/SeBackupPrivilege/tree/master/SeBackupPrivilegeCmdLets/bin/Debug
Both .dll must be transfered to the target.
Launching the attack
First import the librairies from the POC
Import-Module .\SeBackupPrivilegeUtils.dll
Import-Module .\SeBackupPrivilegeCmdLets.dllThen verifiy if SeBackup is enabled
If not we enable it
From there we have different attack options
A) Copying a protected file
B) Attacking a DC - Copying NTDS.dit
This applies only in Active Directory context.
We can attempt to copy the DC database which contains all the users NTLM hashed passwords. We can't copy it with Copy-FileSeBackupPrivilege because the file is locked.
Next, we can use the Copy-FileSeBackupPrivilege cmdlet to bypass the ACL and copy the NTDS.dit locally.
Now we can use a tool likesecretsdump.py or the PowerShell DSInternals module to extract all Active Directory account credentials. Here we focus on the Administrator user:
With DSInternals:
With secretdumps.py:
C) Attacking Local Windows - Backing up SAM and SYSTEM Registry Hives
We can back up the SAM and SYSTEM registry hives to extract local account credentials offline using a tool such as Impacket's secretsdump.py
First we backup the hives
D) Copying protected files with robocopy
It's less common, but we can also leverage robocopy to copy files in backup mode:
/B: Runs in "Backup mode." Allows Robocopy to bypass file and folder permission checks because ofSeBackupPrivilegeC:\secrets\creds.txt: Source directory.\hacker_folder: Destination directorycreds.txt: Specifies to only backup this file from the source directory
Last updated