Windows Security ยท 2.9

๐Ÿ—‚๏ธ Group Policy Objects (GPO)

The master control panel for every Windows security settingโฑ ~9 min

๐Ÿ›๏ธGPO is like a constitution for your computer

A constitution overrides ordinary laws โ€” no law can contradict it. Group Policy is the same: a GPO setting overrides whatever you set in Windows Settings or Control Panel. If you disabled Windows Update via GPO, re-enabling it in Windows Settings does nothing. GPO is the highest authority in local Windows configuration.

What Is Group Policy?

Group Policy is a Windows feature that centrally controls hundreds of security settings through a single interface. The Local Group Policy Editor (gpedit.msc) manages policies for just one computer. In corporate environments, Group Policy is applied from a server to thousands of PCs simultaneously โ€” but in CyberPatriot, you work with LOCAL group policy on the VM image.

secpol.msc (Local Security Policy)
  • โ€ขSubset of Group Policy
  • โ€ขOnly covers: Account Policies, Local Policies, Windows Firewall, public key policies
  • โ€ขEasier to navigate for password/lockout settings
  • โ€ขGood for quick password and lockout changes
gpedit.msc (Local Group Policy Editor)
  • โ€ขFull superset โ€” includes everything in secpol.msc plus much more
  • โ€ขControls: Windows Update, AutoPlay, Remote Desktop, Defender, Software Restriction, and hundreds more
  • โ€ขDivided into Computer Configuration and User Configuration
  • โ€ขUse this when secpol.msc doesn't have the setting you need

Opening the Local Group Policy Editor

๐Ÿ“ Navigation Path
Press Win+Rโ†’Type: gpedit.mscโ†’Press Enter
โœ“ Action: Opens Local Group Policy Editor
โš  Warninggpedit.msc requires an Administrator account. If you get 'Windows cannot find gpedit.msc', you are on Windows Home edition โ€” Home does not include Group Policy Editor. CyberPatriot competition images use Windows 10/11 Pro or Education, which always have it.

The Two Halves: Computer Configuration vs User Configuration

SideWhat It ControlsWhen It Applies
Computer ConfigurationSettings that apply to the machine regardless of who logs in โ€” services, Windows Update, system-wide restrictionsApplied at Windows startup, before anyone logs in
User ConfigurationSettings that apply to the currently logged-in user โ€” desktop restrictions, browser settings, mapped drivesApplied when a specific user logs in
๐Ÿ”’ SecurityIn CyberPatriot, Computer Configuration is where most vulnerabilities live. Focus there first. Attackers plant malicious settings in Computer Configuration because they apply to every user and survive reboots.

Navigating the Tree: Administrative Templates

Most competition-relevant settings are under Administrative Templates, which contains registry-based policies organized into categories. The path pattern is:

๐Ÿ“ Navigation Path
Computer Configurationโ†’Administrative Templatesโ†’Windows Componentsโ†’(specific feature)

Example 1 โ€” Windows Update (Competition Vulnerability)

Competition images often have Windows Update disabled via Group Policy as an intentional vulnerability. Automatic updates are your first line of defense against exploits โ€” disabling them is a critical misconfiguration. Here's how to find and fix it:

๐Ÿ“ Navigation Path
Computer Configurationโ†’Administrative Templatesโ†’Windows Componentsโ†’Windows Updateโ†’Manage end user experienceโ†’Configure Automatic Updates
โœ“ Action: Set to: Not Configured (or Enabled โ†’ Auto download and schedule install)
๐Ÿ’ก TipIn the right pane, double-click the policy name. A dialog opens with three states: Not Configured, Enabled, Disabled. For 'Configure Automatic Updates', set it to 'Not Configured' to let Windows use its default (enabled) behavior โ€” or 'Enabled' and choose option 4 (Auto download and schedule install).

Example 2 โ€” Disable Remote Desktop via GPO

Remote Desktop (RDP) should be disabled unless the scenario specifically requires it. RDP is a common attack vector โ€” leaving it on gives attackers a way in if they guess or steal a password.

๐Ÿ“ Navigation Path
Computer Configurationโ†’Administrative Templatesโ†’Windows Componentsโ†’Remote Desktop Servicesโ†’Remote Desktop Session Hostโ†’Connectionsโ†’Allow users to connect remotely using Remote Desktop Services
โœ“ Action: Set to: Disabled
powershell
# Alternative: disable RDP via registry (same effect as GPO)
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name 'fDenyTSConnections' -Value 1
# Or via System Properties:
# Win+R โ†’ sysdm.cpl โ†’ Remote tab โ†’ select 'Don't allow remote connections to this computer'

Example 3 โ€” Disable AutoPlay via GPO (CIS Level 1)

AutoPlay automatically runs software from USB drives, DVDs, and network drives when plugged in. CIS Level 1 requires it to be disabled โ€” infected USB drives exploit AutoPlay to install malware automatically.

๐Ÿ“ Navigation Path
Computer Configurationโ†’Administrative Templatesโ†’Windows Componentsโ†’AutoPlay Policiesโ†’Turn off AutoPlay
โœ“ Action: Set to: Enabled โ†’ All Drives
๐Ÿ’ก TipAfter enabling 'Turn off AutoPlay', set the dropdown to 'All Drives' โ€” not just 'CD-ROM and removable media drives'. USB drives are the primary attack vector.

Example 4 โ€” Windows Defender Antivirus Settings

๐Ÿ“ Navigation Path
Computer Configurationโ†’Administrative Templatesโ†’Windows Componentsโ†’Microsoft Defender Antivirus
โœ“ Action: Make sure 'Turn off Microsoft Defender Antivirus' is set to Disabled (i.e., Defender stays ON)
โš  WarningCheck for 'Turn off Microsoft Defender Antivirus' โ€” if this is set to 'Enabled', it DISABLES Defender entirely. This is a common competition vulnerability. Set it to 'Disabled' or 'Not Configured' to keep Defender active.

How GPO Settings Override Other Methods

โ˜… FactGPO settings take precedence over Windows Settings, Control Panel, and even direct registry edits made by programs. If Windows Update appears stuck disabled even after you toggle it in Settings, the answer is always: check gpedit.msc. The policy is overriding your change.

Checking Effective Policy โ€” gpresult

cmd
# Show all applied Group Policy settings for the computer
gpresult /r
# Generate a detailed HTML report โ€” open in browser
gpresult /h C:\gpresult.html
# Force Group Policy to refresh immediately
gpupdate /force
๐Ÿ”’ SecurityRun gpresult /r early in a competition round to see which policies are applied. This reveals malicious or misconfigured GPO settings that override your manual fixes โ€” you must change the GPO, not just the setting, or your fix won't stick.

Competition GPO Checklist

  • โ€ขOpen gpedit.msc โ†’ scan Computer Configuration โ†’ Administrative Templates โ†’ Windows Components for disabled/misconfigured settings
  • โ€ขWindows Update: should be 'Not Configured' or 'Enabled' โ€” never 'Disabled'
  • โ€ขRemote Desktop: 'Allow users to connect remotely' โ†’ should be Disabled unless scenario requires it
  • โ€ขAutoPlay: 'Turn off AutoPlay' โ†’ should be Enabled on All Drives
  • โ€ขMicrosoft Defender Antivirus: 'Turn off Microsoft Defender Antivirus' โ†’ should be Disabled (so Defender stays ON)
  • โ€ขRun gpupdate /force after making any GPO changes to apply them immediately
๐Ÿง Quick Checkfirst try = +5 XP

A setting keeps reverting even after you change it in Windows Settings. Where should you look?

โญ 0 XP๐Ÿ”ฅ 0 days