Skip to content

RunasCs version 1.3

Compare
Choose a tag to compare
@antonioCoco antonioCoco released this 30 Aug 18:55
· 66 commits to master since this release
5e8c074

Added

  • The spawned process will have an environment block associated containing the required environment variables;
  • Added -r flag to redirect stdout, stdin, stderr to a remote host;
  • Added --create-profile flag to force the user profile creation.

Changed

  • Simple commandline parser with optional arguments added to the exe;
  • Switch from a static method to object invocation;
  • Now the logon type 9 is an abstraction that works for every process function providing a feature like the /netonly flag present in runas.exe.

Bugfixes

  • Now the domain name "." is recognized;
  • Switch to exception based error handling. When using the ps1 version the previous error handling using System.Environment.Exit() was causing the powershell process to exit;
  • Fixed a bug that caused RunasCs to hang also after the timeout. This was due to the pipe created in blocking mode. Now the pipe is set to PIPE_NOWAIT;
  • Fixed a bug when logon type 9 is requested. The provider LOGON32_PROVIDER_WINNT50 must be used in the LogonUser function;
  • Improved handle cleanup;
  • Fixed a bug for the default behavior of the CreateProcessAsUser. If the new user has not permission to access to the current directory the process won't be created.

Big credits to @qtc-de for the nice improvements.