Powershell elevation best practice

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

Powershell elevation best practice

L2 Linker

hi,

we have requests to allow powershell to be run elevated if necessary, where local admin rights are removed.

 

What is the risk?

What can be done by default through PS, when ran elevated, but elevate child processes is disabled?

How would you allow the elevation of PS, but tighten it´s execution?

 

Thanks for sharing your best practice.

J.

 

2 REPLIES 2

L4 Transporter

Hi @John F​ , Elevating powershell.exe is basically providing admin rights to the end user. The best practice would be to ask users to capture what they need to do, in a PowerShell script and only elevate that specific script by hash or signature. If elevating powershell.exe is still needed, you can apply step-up authentication upon launch and also apply some restrictions on the shell, such as access to network shares, registry, local files, and the internet.

Cheers,

Yossi

L2 Linker

Hi @Yossi Dantes​ , thanks for your suggestions above.

However, if PowerShell is elevated, without child processes and local admin rights are removed. Can you really achieve that much with it?

 

I have tried a couple of commands using PowerShell in elevated mode, but as soon as the commands triggers a tasks that Windows OS judge as needing admin rights, the commands stops.

 

Only then can non privileged actions could be achieved by the OS or if "Admin tasks" or specific applications are elevated in a separate policy.

 

Would that be correct?

Cheers,

Julien

  • 613 Views
  • 2 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!