Can PS Studio be used to sell Powershell script requiring a license?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 5 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jgq1985
Posts: 23
Last visit: Thu Dec 07, 2023 7:30 am

Can PS Studio be used to sell Powershell script requiring a license?

Post by jgq1985 »

With Powershell Studio, is it possible to have a Powershell script compiled and encrypted so that you can sell it as a software solution where people need a license to run it?

Product, version and build:
PS Studio 2020
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 7:24 am
Answers: 39
Been upvoted: 30 times

Re: Can PS Studio be used to sell Powershell script requiring a license?

Post by brittneyr »

SAPIEN Script Packager is not a compiler. A compiler translates source code into machine code which is not easily reversible. C/C++ is a good example for that.
C# is translated into ILASM and only compiled at the endpoint. Very easy to de-compile.

The tool SAPIEN Script Packager, included in PowerShell Studio, bundles your PowerShell code into an encrypted blob inside the executable.
Due to the nature of PowerShell, being an interpreted scripting language, it has to exist as clear code at the point of execution.
If you make sure you don't have script block logging and so forth enabled, you can make it so that a normal user will not see your code. There is an option for that when packaging.
Give that you use a SAPIEN Script Host engine, your code is executed in memory, not as a temporary file.

A fully authorized admin on a machine with a debugger or the ability to enable script block logging will be able to see your code.
You can employ an obfuscator to mangle your code before packaging, which will severely reduce the usefulness of any code recovered. In the latest build of PowerShell Studio, there an option to obfuscate code included in SAPIEN Script Packager, but this only provides basic obfuscation.

Is it 100% secure? No.
Can you make it so that regular users cannot see your code? Yes.
It all depends on where you want to deploy that and what level of users will have access.

Generally, if you sell software, you should have a license agreement which will prevent users from reverse engineering or disassembling your code by contract.
Brittney
SAPIEN Technologies, Inc.
This topic is 1 year and 5 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.