1

I have an external program which calls a PowerShell script with a random secret identifier as a single argument. The PowerShell script needs to return the same random secret id when it calls the REST client on the external program.

Even though the PowerShell scripts are in secured location on the server, anyone can open the PowerShell and debug it to get $args[0] value. The PowerShell script cannot run on its own as it needs get a secret id from an external program.

I have tried using this script:

$gg = [Security.Principal.WindowsIdentity]::GetCurrent().Name 

$args[0]

$gg

The external program calls the PowerShell script every 2 seconds and passed the secret identifier. During debugging - I could not get a value of $args[0].

Any feedback is wished upon. Am I correct that no one can debug and get the value of the argument even in the debugging?

1
  • The REST client is called with mutual TLS, Realtime compute of the powershell script hash sha 256 is validated during the rest call and the script can only be read not modified Commented Nov 19, 2019 at 18:00

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.