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?

Sir Muffington
  • 1,447
  • 2
  • 9
  • 22
Geo V
  • 11
  • 2
  • 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 – Geo V Nov 19 '19 at 18:00

0 Answers0