0

I was wondering if there's any way i can protect my Exe file (which is a powershell script converted by ps2exe tool) from decompile? couldnt find info about that subject

  • Here is a nice PDF on source code and reverse engineering protection, though it is focused mainly on Java you can read it: http://www.cs.sjsu.edu/faculty/stamp/students/kundu_deepti.pdf – Wasif Sep 16 '20 at 06:29
  • 2
    The ps2exe tool does not make a true executable. There is no compile. ps2exe is not a compiler. It makes self-extracting zip files, that must be decompiled and loaded into memory before it can be run. Turning this to an executable is convenience and to keep the average user for seeing the code, but it takes very little effort to see the code. Windows Powershell auditing will show this code in logs by design. There is no stopping that. If you want a true executable, then you need to use a real programming language (C#, VB.Net, etc.) with embedded PowerShell and compile to a true executable. – postanote Sep 16 '20 at 15:22
  • I understand, so there isnt any third side program to do that conversion maybe? if id wanted to compile and protect my scripts i would have to learn programming language? – Shahar Weiss Sep 17 '20 at 06:29
  • 1
    @ShaharWeiss - it depends on how far you are willing to go with this. A compiled program is still readable but it takes reverse engineering to read it. What is it that you want to protect? Code or passwords/configs? – Lieven Keersmaekers Sep 17 '20 at 07:30
  • i need to protect a script im using on remote server which contains an encrypted password of a local admin in that machine – Shahar Weiss Sep 17 '20 at 11:37
  • 1
    In that case, you might want to look at `Export/Import-Clixml`. That allows you to store an encrypted file on that server that can only be read with your account on that server. – Lieven Keersmaekers Sep 18 '20 at 06:27
  • 1
    Aprriciate your help so much, thank you vey much for your time! – Shahar Weiss Sep 18 '20 at 12:19

0 Answers0