Announcement

Collapse
No announcement yet.

A script that runs powershell but keeps the Authenticode Signature valid

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A script that runs powershell but keeps the Authenticode Signature valid

    Hello

    Thank you very much for the many nice procedures. Sadly I am not good with python and the encoding really makes me crazy :P. I tried to modify the Run powershell script in a way so it respects the Authenticode Signature of my script but sadly I am unable to keep the Signature intact.

    It would be very nice to have a Python Script that can run a signed powershell script.

    I hope you guys can help me out with this request.

    Thank you very very much in advance


    I added a sample script as an attachment which is digitally signed and can be used for testing. It should run with:
    Code:
    powershell.exe -ex AllSigned -File <PSFile>
    Attached Files
    Last edited by Weatherlights; 12-17-2020, 09:38 PM.

  • #2
    Ok. I spend a little time thinking about my issue. I build a little work around using Base64 encoding. I verified the execution in my lab envoirnment but sadly when using ITarian the script procedure does not run.

    It is not that it throws an error or anything like my scripts before it is that just nothing happens on the client. Are there any limitations on running scripts using ITarian?

    The script is attached maybe someone form ITarian can give me a hint why this script won't even start .
    Attached Files

    Comment


    • #3
      OK found it out myself . The one single line was the issue. After splitting the Base64 encoded string into multiple lines everything worked perfectly

      Comment

      Working...
      X