this post was submitted on 27 Mar 2024
9 points (100.0% liked)

Raku

157 readers
1 users here now

A place for all things related to the Raku® Programming Language—an open source, gradually typed, Unicode-ready, concurrency friendly programming language made for at least the next hundred years. Please join us, for programming should be optimized for Fun and Profit!

Links

We are a bunch of volunteers developing the Raku Programming Language as the Open Source language of the future.

We also develop tools, web-services and applications written in the Raku Programming Language.

We try real hard to be nice to each other. You can help too! The only requirement is that you know how to be nice to all kinds of people (and butterflies 🦋). And don't be afraid to ask if you do not understand something.

founded 1 year ago
MODERATORS
all 6 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 7 months ago (2 children)

Did you know that, by default, Windows PowerShell doesn’t allow normal users to run scripts?

Yeah it's called access control, which is a basic tenant of IT security, letting any knucklehead run PS scripts is heading for disaster at worst, and a huge headache at best.

Also, the amount of users who have access to Unix in any environment is reasonably small, and they are usually vetted and trusted individuals, whereas most of the business segment of any organization is using Windows.

So do you really think Ken in shipping needs to run some PS scripts? Or Derek in Sales, or Joan in HR, or Ralph in maintenance?

[–] [email protected] 5 points 7 months ago

As a long time security engineer, I just wanted to say thank you for this post. Spot on.

[–] [email protected] 4 points 7 months ago (2 children)

Hardly. As per Microsoft,

The execution policy isn't a security system that restricts user actions. For example, users can easily bypass a policy by typing the script contents at the command line when they cannot run a script.

Or you can run iwr -useb 'https://dodgy-website.com/whateverscriptyouwant.ps1' | iex to execute any script from the internet.

Or read the file and pass it onto a new powershell process with Get-Content . whateverscriptyouwant.ps1 | PowerShell.exe -noprofile -

Or use the built-in bypass toggle PowerShell.exe -ExecutionPolicy Bypass -File whateverscriptyouwant.ps1

Or just actually change the execution policy for the proccess or user, via powershell or registry, because once again, it is not an access control. It is security theatre.

[–] [email protected] 3 points 7 months ago (1 children)

Its a safety feature not a security feature.

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4

The execution policy isn't a security system that restricts user actions. For example, users can easily bypass a policy by typing the script contents at the command line when they cannot run a script. Instead, the execution policy helps users to set basic rules and prevents them from violating them unintentionally.

Like the popup you get when you paste a command with new lines in it. It doesnt stop you from pasting a command that would run immediately, but it warns you that what you paste will immediately run.

More of a here-be-dragons

[–] [email protected] 2 points 7 months ago

I'm soo glad I dropped Windows 21+ years ago now!