Trump aka runas
 

--Downloads--

Ver 1.06

Run as another user

With an encrypted command line.  

Win 2000 & above contains a command line utility to run a program under a different user’s permissions AKA Runas.  But this useless command requires the user at the keyboard to type the password of the ID in the command line.

Runas is a wrapper for the API CreateProcessWithLogonw

http://en.wikipedia.org/wiki/Runas

http://msdn.microsoft.com/en-us/library/ms682431%28v=vs.85%29.aspx

 

I have created my own wrapper that encodes the command line hiding the details.  TrumpGui.exe will take the command options & create the encoded command line.

"vKDuPsGyIxjy%<|Q1#_*Ac,VvZ#`(z<Nd%uc9'CCsK`'A9?Bfnb%al\]rVr0 (l9"

This string of characters encodes the information above. The command line below will run the command.

Trump.exe "vKDuPsGyIxjy%<|Q1#_*Ac,VvZ#`(z<Nd%uc9'CCsK`'A9?Bfnb%al\]rVr0 (l9"

The quotes are required!  

Any text to the left of the last quote is passed to the starting program for example.

Trump "vKDuPsGyIxjy%<|Q1#_*Ac,VvZ#`(z<Nd%uc9'CCsK`'A9?Bfnb%al\]rVr0 (l9" “c:\test.txt”

Will open c:\test.txt in notepad using the local administrators’ rights.

HIDE CONSOLE WINDOW

CreateProcessWithLogonw API runs the command as though it was typed from the command line.  This will create a console window. Which is useful if the process you are creating writes to STDOUT.  Checking this box will hide the console window but it will be seen on the screen flashing by.

CHARACTERS TO EXCLUDE

The scripting language I use (http://www.kixtart.org/) uses variables & macros with the characters “%$@” at the start. So I needed a way to exclude them. You may find other uses for this.  The “ is always excluded from the encode process.  Because of these exclusions, large command lines may fail to encode, resulting in this error.

My main use of trump is to run part of my logon script as a user with administration rights. But it could be used in shortcuts as well.

The trump command has little error checking.  It will check to make sure the encode command is correct & will return an “Error in Encoded Text” if it is not.  It will also return the error of the CreateProcessWithLogonw API as in “Error: 1326 Logon failure: unknown user name or bad password”

I have tested Trump in Win XP, server 2003 r2, Vista 32 and 64, server 2008 64 & Win 7 32 and 64.

At the moment Trump does what I wrote it to do, so this is the version that I’m posting for free and using myself.  But there is room for improvement such as a debug mode, greater use of anti hacking code, options to change the encoding and loading the encode command from a file.  If there is something that you would like to add, email me frank.fenti at gmail.  If there is significant interest I’ll consider it.  

Disclaimer

-----------------  

I don't claim that Trump is good for anything -- if you think it is, great, but it's up to you to decide.  If Trump doesn't work: tough.  If you lose a million because Trump messes up, it's you that's out the million, not me.  If you don't like this disclaimer: tough.  I reserve the right to do the absolute minimum provided by law, up to and including nothing.

This is basically the same disclaimer that comes with all software packages, but mine is in plain English and theirs is in legalese.  

I didn't really want to include any disclaimer at all, but my lawyers insisted.  I tried to ignore them but they threatened me with their attack shark at which point I relented.