Persistence
Group Policy artifacts
Group Policy cheat sheet: SYSVOL policies, Registry.pol, GPP passwords, client-side history and event logs, and how attackers abuse GPO for mass deployment.
- Location
- %SystemRoot%\System32\GroupPolicy\
- Proves
- Which policies applied to a machine or user, when, and whether a GPO was weaponised
- Timestamps
- Registry.pol and XML file $SI/$FN times (NTFS UTC); History key LastWrite (UTC); gpttmpl versionNumber
- Retention
- SYSVOL and client cache persist until the GPO changes or is deleted; History keys survive reboots
- Access
- Domain admin or DC SYSTEM for SYSVOL; local admin for client-side cache and History keys
- Evidence of
- PersistenceExecution
- Type
- File / file system
- Windows
- Vista / 78 / 8.11011
- KAPE target
- No dedicated target
- Velociraptor
- No dedicated target
Tools
Compare all tools- Registry ParserIn browser
- EVTX ParserIn browser
- gpresultCLI · built into Windows
- GroupPolicy PowerShell moduleLibrary · built into Windows
- RegRipperCLI · open source
- Registry ExplorerGUI
What it is
Group Policy distributes configuration from Active Directory to every domain machine and user. Policies live as files in SYSVOL on domain controllers and are cached and applied on each client. Because one GPO can push settings, scripts, scheduled tasks and software to thousands of hosts at once, attackers who gain directory control weaponise Group Policy for domain-wide persistence and ransomware deployment. Group Policy artifacts let an investigator see what was applied, when, and whether a policy object was tampered with.
Location
| Item | Path |
|---|---|
| SYSVOL policies (DC) | \\<domain>\SYSVOL\<domain>\Policies\{GUID}\ |
| Machine / User registry settings | ...\{GUID}\Machine\Registry.pol, ...\User\Registry.pol |
| GPP files | ...\{GUID}\Machine\Preferences\...\Groups.xml, ScheduledTasks.xml, Services.xml |
| Startup / logon scripts | ...\{GUID}\Machine\Scripts\, Scripts.ini |
| Client-side cache | %SystemRoot%\System32\GroupPolicy\, GroupPolicyUsers\ |
| Client history | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\History (and HKCU equivalent) |
What it proves
- Which GPOs applied to a host or user, from the History keys and
gpresult. - What a policy contained: registry settings, scheduled tasks, services, scripts and installed software.
- Tampering: an unexpected
ScheduledTasks.xmlor script in a GPO, or a bumped version number, evidences a weaponised policy. - It does not prove a policy actually executed on a given host without corroboration; combine with client-side execution artifacts. History keys show assignment and last apply, not per-user outcome.
Key fields
| Field | Meaning |
|---|---|
| Policy GUID | Folder name identifying the GPO |
Registry.pol | Binary registry settings pushed to the client |
GPP cpassword | AES-encrypted password in old GPP XML; the key was published, so these are trivially decryptable |
versionNumber (GPT.INI) | Increments on each edit; a jump can flag a change |
History DisplayName / Extensions | Applied GPO name and client-side extensions used |
Timestamps
Registry.pol and the GPP XML files carry NTFS $SI/$FN times (UTC on disk); a recently modified ScheduledTasks.xml inside a long-standing GPO is a strong lead. The History registry keys expose a LastWrite time (UTC) for the last apply. Cross-reference with the GroupPolicy Operational event log.
Retention and clearing
SYSVOL content and the client cache persist until the GPO is edited or deleted; deleting a GPO removes its {GUID} folder but shadow copies and DC backups usually retain it. The History registry keys survive reboots and are a durable record of what applied even after the source GPO is gone.
Collection
gpresult /h C:\case\gpresult.html /f
Get-GPO -All | Select DisplayName, Id, ModificationTime, GpoStatus
robocopy \\%USERDNSDOMAIN%\SYSVOL\%USERDNSDOMAIN%\Policies E:\case\Policies /E /COPY:DAT
Also export the Group Policy\History keys from the client registry hives and collect the GroupPolicy Operational event log.
Parsing tools
- gpresult / rsop.msc (built in): the resultant set of policy for a host or user.
- GroupPolicy PowerShell module (
Get-GPO,Get-GPOReport): inventory GPOs and their last modification time; run on a DC or with RSAT. - RegRipper / Registry Explorer: parse the History keys and read
Registry.pol. - Get-GPPPassword and similar auditing scripts decrypt legacy GPP
cpasswordvalues so you can assess exposure; named factually for defenders.
Investigation tips
- GPP passwords: any surviving
cpasswordinGroups.xml,Services.xmlorScheduledTasks.xmlis decryptable and was a classic credential source; flag and rotate the affected accounts. - Weaponised GPO: attackers add an immediate scheduled task or startup script to a widely linked GPO to run a payload across the domain in one cycle. Diff GPO contents against a known-good backup and check
ScheduledTasks.xmlmodification times. - On the DC, 5136 (directory object modified) and 5137 (created) in the Security log capture GPO and link changes; correlate with the account that made them and with DCSync-era activity.
- The GroupPolicy Operational channel records apply cycles (start/finish and errors); confirm the current event IDs for your build rather than assuming, as they vary.
- New or unexpected GPO GUIDs, or a GPO linked at the domain root just before an incident, deserve close review; tie the change time to lateral movement.
Related artifacts
- Scheduled TasksScheduled tasks cheat sheet: task XML and .job files, TaskCache registry keys, DynamicInfo times, hidden tasks, TaskScheduler and 4698 events.
- Windows ServicesWindows services cheat sheet: Services key values (ImagePath, Start, Type, ServiceDll), 7045 and 4697 install events, PsExec traces and pitfalls.
- Registry hivesRegistry hives cheat sheet: SYSTEM, SOFTWARE, SAM, SECURITY, NTUSER.DAT, UsrClass.dat, transaction logs, RegBack, LastWrite times and collection.
- NTDS.dit and domain controllersNTDS.dit cheat sheet: the Active Directory database, what it proves, theft traces on a DC, and the Kerberos, NTLM and DCSync event IDs investigators need.
- Windows event logs (EVTX)Windows event log cheat sheet: EVTX locations, must-know event IDs for logons, processes, services and log clearing, retention, audit policy and parsing tools.
- Run keys and Startup foldersRun keys and Startup folders cheat sheet: Run, RunOnce, Wow6432Node and Policies paths, StartupApproved enabled/disabled bytes, timestamps and pitfalls.
Glossary terms
- PersistenceMechanisms that let malware or an attacker survive reboots and logoffs, such as Run keys, services, scheduled tasks or WMI subscriptions.
- Security Identifier (SID)The unique value Windows uses to identify users, groups and computers, such as S-1-5-21-…-1001, found throughout registry, logs and file paths.
- Lateral movementAn attacker moving from one compromised host to others in the network, using RDP, SMB, PsExec, WMI, WinRM or remote tasks and services.
- Windows event IDThe number identifying an event type within a given provider; it only has meaning when paired with its provider and log channel.
Guides
- Hunting Windows Persistence: Registry, Tasks, WMI and MoreFind attacker persistence on Windows: Run keys, services, scheduled tasks, WMI, Winlogon, IFEO, COM hijacking and BITS, mapped to MITRE ATT&CK, with tools.
- Lateral Movement Forensics: RDP, PsExec, WMI and WinRMMap source and destination artifacts for RDP, PsExec, SMB, WMI, WinRM, scheduled tasks and DCOM, then build a cross-host lateral movement graph.
- Active Directory Forensics: Domain Controller Event LogsInvestigate domain controllers: Kerberos and NTLM events, account and group changes, DCSync 4662, directory changes, GPO abuse, NTDS.dit theft, forged tickets.