MMC Snap-ins GPMC Issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

MMC Snap-ins GPMC Issues

L1 Bithead

Hey all,

 

Over the last several weeks, I've been working on getting various MMC snap-ins deployed within our PAM environment. DNS, DHCP, CA, and AD were successfully deployed, but GPMC won't work.

 

Greatly appreciate any assistance or guidance.

 

Here are snippets of the config and an error message

 

AppLocker - snippet to launch MMC

<!-- MMC process --> <Application Name="MMC" Type="Exe" Path="C:\Windows\System32\mmc.exe" Method="Hash" /> <Application Name="AutoIt3" Type="Exe" Path="C:\Program Files (x86)\AutoIt3\AutoIt3.exe" Method="Publisher" />

 

Dispatcher - snippet to launch GPMC

Global Const $DISPATCHER_NAME = "Microsoft GPMC" ; CHANGE_ME Global Const $CLIENT_EXECUTABLE = 'gpmc "C:\Program Files (x86)\Cyberark\PSM\Components\MSC\GPMC.msc"' ; CHANGE_ME Global Const $ERROR_MESSAGE_TITLE = "PSM " & $DISPATCHER_NAME & " Dispatcher error message" Global Const $LOG_MESSAGE_PREFIX = $DISPATCHER_NAME & " Dispatcher - "   Global $TargetUsername Global $TargetPassword Global $TargetAddress Global $TargetLogonDomain Global $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE)   ;======================================= ; Code ;======================================= Exit Main()   ;======================================= ; Main ;======================================= Func Main()   ; Init PSM Dispatcher utils wrapper ToolTip ("Initializing...") if (PSMGenericClient_Init() <> $PSM_ERROR_SUCCESS) Then Error(PSMGenericClient_PSMGetLastErrorString()) EndIf   LogWrite("successfully initialized Dispatcher Utils Wrapper")   ; Get the dispatcher parameters FetchSessionProperties()   LogWrite("mapping local drives") if (PSMGenericClient_MapTSDrives() <> $PSM_ERROR_SUCCESS) Then Error(PSMGenericClient_PSMGetLastErrorString()) EndIf   LogWrite("starting client application") ToolTip ("Starting " & $DISPATCHER_NAME & "...")   ; ------------------ ; Handle login here! ; CHANGE_ME ; ------------------   $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) if ($ConnectionClientPID == 0) Then Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error)) EndIf

 

Issue: when launched GPMC, a notification shows

To manage group policy you must log on to the computer with a domain user account

Based on articles out there, things I tried. Multiple combinations of the bellow.

From: Global $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) To: Global $ConnectionClientPID = 0   From: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) if ($ConnectionClientPID == 0) Then Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error)) EndIf   To: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1,$CLIENT_EXECUTABLE) if ($ConnectionClientPID == 0) Then Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error)) EndIf   And: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,0,$CLIENT_EXECUTABLE) if ($ConnectionClientPID == 0) Then Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error)) EndIf   And: $ConnectionClientPID = 0

Outcome: Once I change from 2 to any number (near if statement), an error message shows

Failed to execute process [mmc "C:\Program Files (x86)\Cyberark\PSM\Components\MSC\GPMC.msc"]

FYI. AppLocker does not prompt for any error messages, shows as changes are successful.

 

Thank you in advance for the help

 

1 accepted solution

Accepted Solutions

L1 Bithead

The solution to the issue, within our environment

 

"GPMCdispatcher" config file has been updated as per the following:

Line 32,

FROM: Global $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) 

TO: Global $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1,$CLIENT_EXECUTABLE)

 

Line 69 

FROM: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) 

TO: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1,$CLIENT_EXECUTABLE)

 

Followed by:

Disable the UAC on the Connector Server(s) by editing the Domain PSM Hardening GPO

Computer Configuration → Policies → Windows Settings → Security Settings → Local Policies → Security Options → User Account Controls → User Account Control: Run all administrators in Admin Approval Mode

 

View solution in original post

5 REPLIES 5

L7 Applicator

The target user has permissions to log on locally to the PSM server?

Hey Bernhard,

 

Good question. I would've expected the hardening GPO to handle permissions.

Looking at the "Allow log on locally" policy, PSMShadowUsers and Administrators are part of it.

PSMShadowUsers contain what seems to be random PSM- accounts (look like temp accounts)

Administrators contain an Administrator account and a group that controls who can access PSM servers as admin.

 

As PSM servers were deployed by CyberArk engineer, I would expect for that to be correct.

 

From your knowledge, what should be part of "Allow log on locally"?

The hardening GPO does not cover changes that are necessary for specific connection components that you develop yourself (or implement yourself). Most connection components from the CyberArk Marketplace will work without any changes.

 

Afaik, if you want to run the GPMC MMC snap-in, you need to give the target accounts "Log on locally" rights on the PSM - no way around it. Since this could weaken the security posture of the PSM, you need to strongly consider if you want to actually do this.

Hi ya,

 

That makes perfect sense, that was my understanding too. Correct permission are required.

I hope I'm not missing something and that your referral to "Log on locally" is equal to my referral  "Allow log on locally" located on the PSM server, Local Security Policy.

If so. The Target account used to launch GPMC has been added to Domain Admins (for test purposes).

Domain Admins Group belongs to a group on the PSM server called Administrators.

Administrators belongs to the Local Security policy Allow Log on Locally.

 

NOTE: Ensured to point platform containing GPMC tied to the account to PSM server where GPMC config sits, instead of the load balancer.

 

Thanks for sharing knowledge so far Bernhard.

L1 Bithead

The solution to the issue, within our environment

 

"GPMCdispatcher" config file has been updated as per the following:

Line 32,

FROM: Global $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) 

TO: Global $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1,$CLIENT_EXECUTABLE)

 

Line 69 

FROM: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,2,$CLIENT_EXECUTABLE) 

TO: $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1,$CLIENT_EXECUTABLE)

 

Followed by:

Disable the UAC on the Connector Server(s) by editing the Domain PSM Hardening GPO

Computer Configuration → Policies → Windows Settings → Security Settings → Local Policies → Security Options → User Account Controls → User Account Control: Run all administrators in Admin Approval Mode

 

  • 1 accepted solution
  • 1519 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!