Preventing (non-elevated) run of unsigned scripts

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

Preventing (non-elevated) run of unsigned scripts

L1 Bithead

We are currently attempting to move away from AppLocker, and don't really want to wade into the minefield of WDAC in an estate with a lot of historic baggage.

 

As part of our security approval process for specific work, we need to ensure that standard users are unable to run unsigned scripts - bat, cmd, ps1, you name it, if they don't have a proper digital signature with a certification chain, users should not be allowed to run them, elevated or not.

 

I have attempted to create a new advanced policy with a Block rule, specifying "Script" with the simple parameter "Publisher: Unsigned".

 

With this policy set to highest-priority in the chain, it doesn't appear to have any effect, and instead unsigned scripts are seemingly "managed" by the default global 'detect privileged unhandled applications' policy.

 

Can someone guide us in how we can accomplish the goal described above?

1 accepted solution

Accepted Solutions

L5 Sessionator

Hi @Adam Marks​ ,

 

ps1scripts can be blocked in the way you mentioned above. please check and let us know..

On the other hand, bat and cmd can't be typically signed so the Publisher is not valid for these types.

 

 

Thanks,

Arik.,

View solution in original post

3 REPLIES 3

L5 Sessionator

Hi @Adam Marks​ ,

 

ps1scripts can be blocked in the way you mentioned above. please check and let us know..

On the other hand, bat and cmd can't be typically signed so the Publisher is not valid for these types.

 

 

Thanks,

Arik.,

Thanks for the response - it does make sense that this would only work on scripts that can be signed!

 

I have now tested again, and my findings are mixed:

  • The script is now marked correctly as "Block" in EPM properties
  • When attempting to run the file simply by double-clicking, it is blocked as expected
  • HOWEVER - if I run the script via powershell command line, it still runs.

Is this expected behaviour?

Ok, now figured out that PS1 scripts are indeed blocked via command line as long as execution policy is set to Default.

 

HOWEVER - one issue I am now observing is that the rule on unsigned scripts is not applying to VBS scripts, which can be digitally signed. Are these typically covered by a Script based policy?

  • 1 accepted solution
  • 92 Views
  • 3 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!