Jump to content

RunAs and saved credentials


Recommended Posts

Hi all,

I have a question concerning the 'RunAs' function (AutoIt v3.2.12.1) and the 'saved credentials' of Windows XP Prof.

Background:

Im writing a script which displays a password dialog when executed as 'normal' user, asking for the password for an administrator account. The script then executes itself using the 'RunAs' function with the username/password of the administrator account. When started with administrator privileges, the script tries to execute a program in the context of a 'normal' user, using 'runas.exe' with the 'savecred' parameter (I use the 'savecred' parameter because I dont want to enter the password for the 'normal' user).

Run(@SystemDir & '\runas.exe /savecred /u: & @Computername & \' & $user & ' "cmd /c start \"no title\" /B \"' & $cmd & '""')

Problem:

It seems like the RunAs function of AutoIt works in a way, that prevents one to access the saved credentials of an account. Because of that the listed call of the 'Run' function ends up in a shell asking for the password of the non-admin user.

Example:

Lets say the administrator account is called 'admin' and the user account is called 'usr'. When using the 'Run As' functionality of Windows XP to execute 'rundll32.exe keymgr.dll, KRShowKeyMgr' (which displays a dialog listing all saved credentials of an account) as user 'admin', I can see the saved credentials for 'admin' including the password for 'usr'. When executing 'rundll32.exe keymgr.dll, KRShowKeyMgr' with the 'RunAs' function of AutoIt (again as user 'admin') the saved credential dialog is empty.

Is it possible to use the 'RunAs' function in way, that allows one to access the saved credentials of an account?

Thanks in advance for your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...