Give elevated privilege only exact command

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

Give elevated privilege only exact command

L3 Networker

hi,

 

i dont want to give elevated privilege whole powershell instead of that i want to give exact parameter, like in the picture but nor working as i desired. Pls assist.

Field_Content_versions_oct20__068Vy00000LOWvVIAX.png 

12 REPLIES 12

L2 Linker

Have you activated child processes?

I dont see child process activation rule or config in agent config side for Windows.

Field_Content_versions_oct20__068Vy00000LUlTlIAL.png

Its in the settings where you define a application. For example in a application group:

Field_Content_versions_oct20__068Vy00000LUyM8IAL.pngDown left corner

yes i know that, but i don't want to give elevated access whole powershell.exe because this time user can execute any application over the powershell with admin rights. I want to give admin execution access to only specific parameter in powershell. Is that possible ? if yes, pls help me

L2 Linker

if it's a particular powershell script you are trying to give admin rights for ,ensure you select the definition type as Script and provide the exact file name.it should work

L5 Sessionator

Hi @Maharram Najafov​ ,

 

Did you check in the Events Management which event is created when you run that command.

Based on that, you will be able to create a policy in the most accurate way.

 

Thanks,

this is not possible i think, because i open powershell and after run specific command.

 

If they ran a PS1. script instead - then the events manager would pick up the parameter for the code so then you can add that specific ps1 script to the Application policy and include a checksum so the script can't be manipulated there after? I guess you're looking to let users run specific scripts but not run powershell as a whole.

If they ran a PS1. script instead - then the events manager would pick up the parameter for the code so then you can add that specific ps1 script to the Application policy and include a checksum so the script can't be manipulated there after? I guess you're looking to let users run specific scripts but not run powershell as a whole.

L5 Sessionator

I think AirkR gave me the answer from a previous post, so reposting for you if it's useful in our case

 

https://docs.cyberark.com/epm/24.10.0/en/content/policies/deployscripts-newui.htm

https://docs.cyberark.com/epm/24.10.0/en/content/policies/scriptdistributionpolicies-newui.htm#

https://docs.cyberark.com/epm/latest/en/content/policies/executescipts-newui.htm

 

 

How to appropriately map command-line arguments (PowerShell/Command Prompt) for thousands of users?

Correct me if I am wrong, but I understand that the following is Best Practice for elevating commands:

  1. Create an Allow Policy (without child-processes) for PowerShell/Command Prompt. Make this a parent policy.
  2. Create an Elevation Policy (without child-processes) for PowerShell/Command Prompt. Add parameters next to executable i.e. powershell.exe --Parameter

 

However, this does not seem to work efficiently for thousands of users running hundreds of different commands. Is there a better approach to this? Any suggestions are appreciated.

 

 Cyberark response:

You’re correct that the approach you’ve described is a common best practice for managing command-line arguments in EPM. However, when scaling to thousands of users with diverse command needs, this method can become inefficient.

 

Here are few approaches you can try,

 

    • Instead of specifying each command individually, consider using wildcards or regular expressions in your Elevation Policies to match a broader set of command-line arguments. This can reduce the number of individual policies required.
    • If there are common sets of commands or parameters that multiple users need, you can group them under a single policy. This simplifies management and reduces the number of policies you need to create.
    • Segment users into roles or groups based on their typical usage patterns and create policies that apply to each role. This allows you to manage a smaller number of policies while still covering the necessary commands for different user types.
    • Implement centralized logging to track which commands are being used most frequently and adjust your policies accordingly. This helps optimize and refine your policy set over time.

 

L4 Transporter

I think AirkR gave me the answer from a previous post, so reposting for you if it's useful in our case

 

https://docs.cyberark.com/epm/24.10.0/en/content/policies/deployscripts-newui.htm

https://docs.cyberark.com/epm/24.10.0/en/content/policies/scriptdistributionpolicies-newui.htm#

https://docs.cyberark.com/epm/latest/en/content/policies/executescipts-newui.htm

 

 

How to appropriately map command-line arguments (PowerShell/Command Prompt) for thousands of users?

Correct me if I am wrong, but I understand that the following is Best Practice for elevating commands:

  1. Create an Allow Policy (without child-processes) for PowerShell/Command Prompt. Make this a parent policy.
  2. Create an Elevation Policy (without child-processes) for PowerShell/Command Prompt. Add parameters next to executable i.e. powershell.exe --Parameter

 

However, this does not seem to work efficiently for thousands of users running hundreds of different commands. Is there a better approach to this? Any suggestions are appreciated.

 

 Cyberark response:

You’re correct that the approach you’ve described is a common best practice for managing command-line arguments in EPM. However, when scaling to thousands of users with diverse command needs, this method can become inefficient.

 

Here are few approaches you can try,

 

    • Instead of specifying each command individually, consider using wildcards or regular expressions in your Elevation Policies to match a broader set of command-line arguments. This can reduce the number of individual policies required.
    • If there are common sets of commands or parameters that multiple users need, you can group them under a single policy. This simplifies management and reduces the number of policies you need to create.
    • Segment users into roles or groups based on their typical usage patterns and create policies that apply to each role. This allows you to manage a smaller number of policies while still covering the necessary commands for different user types.
    • Implement centralized logging to track which commands are being used most frequently and adjust your policies accordingly. This helps optimize and refine your policy set over time.

 

L4 Transporter

Hi @Maharram Najafov​ 

 

Since several community members answered your question, please let us know if these solutions addressed your query.

If so, it would be great if you could mark the most helpful response as 'Select as Best' to assist other community members with similar questions.

 

Thank you, Liad.

  • 237 Views
  • 12 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!