What are group policies?
When making security hardening, for example, in a Windows server environment, often the same hardening settings are desired to be applied to all - not just to individual or current servers.
Group policies (Group Policy Objects or commonly GPO) are a feature of Windows that is part of Windows Active Directory. With GPOs, server administrators can centrally manage and configure operating system settings, applications, and user environments in Active Directory.
They are commonly used in business environments, schools, and other organizations where there is a need to manage large quantities of computers and users.
What can be done with GPO?
With GPOs, you can, among other things:
- Defines settings such as background image, network printers, or security updates.
- Prevent or allow access to certain programs or Windows features.
- Configure security settings such as firewall and antivirus regulations.
- Manage user profiles and login scripts.
- To perform other cybersecurity hardening measures.
How to use GPOs?
Open Group Policy Management (GPM) by searching for it with the Windows button search:
![](https://cdn.sanity.io/images/3unppnk2/ha-content/68a5f23c9f3c4d5967c476b18de5a36e4b2c52c5-1500x1276.png?w=3840&q=75&fit=clip&auto=format)
Expand the scope you want to create a GPO for. In this case, evilcorp.local.
![](https://cdn.sanity.io/images/3unppnk2/ha-content/14eafbde4a8113821683c656d5e3277831f0da02-814x494.png?w=1920&q=75&fit=clip&auto=format)
Creating a New GPO
Right-click the organizational unit (OU) you want the policy to apply to and select "Create a new GPO in this domain, and Link it here".
Modifying existing GPO
Click on GPO and select "Edit" to open the Group Policy Management Editor. From here, you can configure user and computer-specific policies. Settings are divided into two main categories: "User Settings" and "Computer Settings".
![](https://cdn.sanity.io/images/3unppnk2/ha-content/0d98824657ecb2089d312e1607ee5c0356d018b2-686x258.png?w=1920&q=75&fit=clip&auto=format)
![](https://cdn.sanity.io/images/3unppnk2/ha-content/dd2351944688e6b69d42640997f80f165e469cb0-1392x654.png?w=3840&q=75&fit=clip&auto=format)
Creating a new rule
You can now edit the GPO. For example, if you want to disable the Task Manager, you can do so as follows:
- Expand the tree structure as follows: User Configuration > Administrative Templates > System > Ctrl+Alt+Del Options.
![](https://cdn.sanity.io/images/3unppnk2/ha-content/70ce45ee208810e2df5aa8f61ddc19d972ea373c-1550x682.png?w=3840&q=75&fit=clip&auto=format)
- Double click "Remove Task Manager".
- Change the value to "Enabled".
![](https://cdn.sanity.io/images/3unppnk2/ha-content/45f939b7942bf111dd87ea8ae7745a4ff1bc8470-706x430.png?w=1920&q=75&fit=clip&auto=format)
- Press "OK" in the end.
Implementation of Updated Policy
Once you have configured the desired settings, close the editor. The GPO will be automatically applied according to the schedule defined by the AD, or you can force the update by using the command "gpupdate /force" on the target machine.
Open PowerShell and run it as an administrator (right-click and "Run as administrator").
![](https://cdn.sanity.io/images/3unppnk2/ha-content/fe81c080ba7cc00efff00acf420ed60119823236-1204x1294.png?w=3840&q=75&fit=clip&auto=format)
Then execute gpupdate /force
![](https://cdn.sanity.io/images/3unppnk2/ha-content/b0cd041ad1fa9529176506651bc8b1a8bac7921f-882x344.png?w=1920&q=75&fit=clip&auto=format)
The changes should now be effective on the server on which you executed the command.
Exercise
Prevent the use of task manager as described above. Then try to open it:
![](https://cdn.sanity.io/images/3unppnk2/ha-content/a36516b2a9020ebc719325d3f84a119439dfd618-1710x1290.png?w=3840&q=75&fit=clip&auto=format)
What error message are you getting?
![hakatemia pro](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fpro_desktop_en.be4531e0.png&w=3840&q=75)
![hakatemia pro](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fpro_mobile_en.937d2b98.png&w=1920&q=75)
Ready to become an ethical hacker?
Start today.
As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.