$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
I was just researching a little on how Group Policies are applied in Windows Vista. The client processing is actually done by the Group Policy Client Service. So can a user prevent Domain Policies from being applied by stopping this service?
If you go to the service properties you can see that even a local administrator cannot stop or disable the service:
The description says: “The service is responsible for applying settings configured by administrators for the computer and users through the Group Policy component. If the service is stopped or disabled, the settings will not be applied and applications and components will not be manageable through Group Policy. Any components or applications that depend on the Group Policy component might not be functional if the service is stopped or disabled.”
That sounds good! Let’s try it…
So I used the RunAsSys tool to run services.msc as system and stopped the service. Apart from a little balloon popup indicating that there was a problem with the service everything seemed to work and Domain Policies were not applied.
Then I tried logging in as a non admin user, and this happened:
This means that non admin users are not allowed to login when the service isn’t running!
Next I looked in the disassambly of the service (gpsvc.dll) and I noticed this function:
.text:6F2EA543 ; public: static int __stdcall CSKU::IsDomainIncapableSystem(void)
It calls an exported function of SLC.DLL called SLGetWindowsInformationDWORD with parameter pwszValueName of GroupPolicy-License-DomainIncapableSystem. So this function is used to determine if we are running on a system that is not capable (read allowed) to join a domain. This would be the case for the Starter and Home editions of Vista.
So I decided to try patching this value to return always 1, so we change it to:
/Edit: I made an error here: xor eax, eax should be mov eax, 1 (we want the function to return true and not false).
.text:6F2EA543 ; public: static int __stdcall CSKU::IsDomainIncapableSystem(void)
.text:6F2EA543 ?IsDomainIncapableSystem@CSKU@@SGHXZ proc near
.text:6F2EA543 ; CODE XREF: ProcessGPOs(_GPOINFO *)+963p
.text:6F2EA543 ; CGroupPolicySession::ApplyGroupPolicyForPrincipal(void *,void *,void *)+124p …
.text:6F2EA543 mov eax, 1
.text:6F2EA545 retn
.text:6F2EA545 ?IsDomainIncapableSystem@CSKU@@SGHXZ endp
I tested it and I can login with any account and Domain Policies are not applied!
Here is the dup2 file: Group Policy Client Service Patch (2613 downloads)
PS: please check if your license agreement and your country’s law permit it before create and/or applying the patch.
PS2: And don’t tell the Domain Admins 😉
Related article(s): Registry editing has been disabled by your administrator (not anymore!)
11 Responses for "Preventing Domain Group Policies from Applying"
What is the proper syntax to use RunAsSys?
Do I run it from the run menu item, command prompt or with a double click?
I have tired these but I’m at a loss as to how to run it.
RunAsSys.exe /services.msc
“RunAsSys.exe” services.msc
“RunAsSys.exe” -services.msc
hey any idea about how to accomplish the same goal on xp?
great post and great work. thanks.
I never really looked at the way XP handles it, if I remember correctly there is some exe that handles Group Policy but it’s not a service.
Dear Friend!
This is great idea!
I would like to have it done for Windows 7 32bit and especially 64bit, but patch doesn´t work for gpsvc.dll
from this systems. Please could You try it?
I can email You these dlls.
Thanks
Looking to patch the DLL on Windows 7 (64bit) system as well. I have gpsvc disabled for now but thats only a temporary solution. Would appreciate patch file for Win7! TIA!
Great post! I’m so happy to be free from that “big brother”-service. Thank you!
On win7 I can not stop the gpsvc service,it got started automatically (also the registry key can not be edited by me), therefore even if your patch would work with win7 it is not feasable without the possibility to stop the gpsvc service. Having a solution for that would be great !
Cheers
Rusco.
@Rusco: If you check permissions on the key you will find deny access. Take ownership will work (you are Admin) and then you can change permissions to grant yourself access.
As an alternative, use the install CD to perform the modification. This logs you in as SYSTEM.
Is there a patch for Windows 7 x64?
Thank you.
OK, I think I’ve found it. For Windows 7 x64:
Original gpsvc.dll
.text:000007FF76495000 ; public: static int CSKU::IsDomainIncapableSystem(void)
.text:000007FF76495000 ?IsDomainIncapableSystem@CSKU@@SAHXZ proc near
.text:000007FF76495000 ; CODE XREF: DllGetClassObject:loc_7FF7649AFBFp
.text:000007FF76495000 ; CGroupPolicySession::ApplyGroupPolicyForPrincipal(void *,void *,void *):loc_7FF764A18A0p …
.text:000007FF76495000
.text:000007FF76495000 arg_0 = dword ptr 8
.text:000007FF76495000 arg_8 = qword ptr 10h
.text:000007FF76495000
.text:000007FF76495000 ; FUNCTION CHUNK AT .text:000007FF764CC45C SIZE 0000001F BYTES
.text:000007FF76495000
.text:000007FF76495000 mov [rsp+arg_8], rbx
.text:000007FF76495005 push rdi
.text:000007FF76495006 sub rsp, 20h
.text:000007FF7649500A mov eax, cs:?s_dwTestNoDomainSystemCheckCount@@3KA ; ulong s_dwTestNoDomainSystemCheckCount
Patched gpsvc.dll
.text:000007FF76495000 ; public: static int CSKU::IsDomainIncapableSystem(void)
.text:000007FF76495000 ?IsDomainIncapableSystem@CSKU@@SAHXZ proc near
.text:000007FF76495000 ; CODE XREF: DllGetClassObject:loc_7FF7649AFBFp
.text:000007FF76495000 ; CGroupPolicySession::ApplyGroupPolicyForPrincipal(void *,void *,void *):loc_7FF764A18A0p …
.text:000007FF76495000
.text:000007FF76495000 arg_0 = dword ptr 8
.text:000007FF76495000 arg_8 = qword ptr 10h
.text:000007FF76495000
.text:000007FF76495000 ; FUNCTION CHUNK AT .text:000007FF764CC45C SIZE 0000001F BYTES
.text:000007FF76495000
.text:000007FF76495000 xor eax,eax
.text:000007FF76495000 inc eax
.text:000007FF76495005 retn
.text:000007FF76495006 sub rsp, 20h
.text:000007FF7649500A mov eax, cs:?s_dwTestNoDomainSystemCheckCount@@3KA ; ulong s_dwTestNoDomainSystemCheckCount
Thanks a lot mate.
You saved my day! 🙂
Leave a reply