#73685 - 2003-02-26 09:03 AM
Having problem with XP AND su AND kix
|
Mandala
Fresh Scripter
Registered: 2003-02-17
Posts: 36
|
Following my old topic (see Crypted external files for more explication. here is the link Crypted external ), i've got another trouble with the su.exe tool
This tool works well on 2000 but seems to give trouble on XP.
If you execute it from a local dir on xp, it works well but if you call it from a shared or network drive it gives an error. (even if the su.exe is on a local drive)
the error is *---------------------------------- CreateProcessAsUser error! (rc=247) le nom de répertoire est incorrect (translate: directory name incorrect) *----------------------------------
Does someone had the same trouble with XP Pro ? Does someone know a solution ? Does someone have a more recent version of the SU ? mine is 78096 octets It seems that a fix exists somewhere but i didn't find it on the web If someone could help...
P.MAQUOI
_________________________
P.Maquoi
Cellule Antivirus du M.E.T.
pmaquoi@met.wallonie.be
|
|
Top
|
|
|
|
#73687 - 2003-02-26 11:43 AM
Re: Having problem with XP AND su AND kix
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Just to pad out the information - we've had some private mail on this, here is an excerpt: quote: I've had a quick look around the web, and it looks like it may be a problem with the "su" command. Here is one page that mentions a similar problem: http://www.swynk.com/friends/Hobbs/offtopic.asp#CreateProcessAsUs er%20/%20The%20handle%20is%20invalid%20error
If you are using "su" from the W2K resource kit there is a hot-fix, detailed here: http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b265401
The MS page reports a hotfix, but there I believe it is one of those "contact a representative" types which is not generally available for download - this is the fix that Mandala refers to.
As he mentions, the process works on W2K clients, but fails on XP. [ 26. February 2003, 11:45: Message edited by: Richard H. ]
|
|
Top
|
|
|
|
#73689 - 2003-02-27 12:08 AM
Re: Having problem with XP AND su AND kix
|
Mandala
Fresh Scripter
Registered: 2003-02-17
Posts: 36
|
Me again
I've tested the NT4 version and the W2000 version of SU.
The same problem with these two if called from a network/shared drive on XP
P.MAQUOI Cellule Antivirus du MET virus@met.wallonie.be
_________________________
P.Maquoi
Cellule Antivirus du M.E.T.
pmaquoi@met.wallonie.be
|
|
Top
|
|
|
|
#73690 - 2003-02-26 01:03 PM
Re: Having problem with XP AND su AND kix
|
Mandala
Fresh Scripter
Registered: 2003-02-17
Posts: 36
|
like MightyR1 said code:
SetL "su_drive=n:" SetL "su_server=\\d420x1" SetL "su_share=netlogon" SetL "SU_PASSWORD=phmphm" Shell 'su.exe phm "SU_COMMANDLINE=d:\kixtest\Kix32.exe d:\kixtest\connect.kix"'
that calls another kix
code:
Use %su_drive% %su_server%+"\"+%su_share%
BUT ...
if it's done like this, another window is opened by the shell command and the SET parameters are ignored.
IF I use SETM the parameters are ok, the error code returned by USE is 0 (success) but i don't see the shared dir on the letter N
For the moment, i just want to throw my xp (and the computer) through a window for a (very) long time Mandala
Mandala
_________________________
P.Maquoi
Cellule Antivirus du M.E.T.
pmaquoi@met.wallonie.be
|
|
Top
|
|
|
|
#73691 - 2003-02-26 01:27 PM
Re: Having problem with XP AND su AND kix
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Whoa! Be very careful about which environment variables you are setting.
Some of them are in the machine environment and will be available to unrelated sessions. They may also be persistant.
Bad move if someone opens a DOS window, types "set" and can see your password in plain text
|
|
Top
|
|
|
|
#73692 - 2003-02-26 02:02 PM
Re: Having problem with XP AND su AND kix
|
Mandala
Fresh Scripter
Registered: 2003-02-17
Posts: 36
|
yes i know it's not secured
the target is just to try to find a way to use SU.exe
For the normal script, i'll use kixcrypt to declare the login and the password.
These script are just for test purpose
_________________________
P.Maquoi
Cellule Antivirus du M.E.T.
pmaquoi@met.wallonie.be
|
|
Top
|
|
|
|
#73695 - 2003-02-26 02:56 PM
Re: Having problem with XP AND su AND kix
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Patrick, To make your solution a little more secure, change your TST_SU.KIX to:
code:
;;;;;TST_SU.KIX;;;;; SetL "SU_PASSWORD="+$SU_PASSWORD Shell 'su admin "%SU_COMMANDLINE%"' Exit 0
And change the encryption line to:
code:
wkixcrypt -f "D:\Kix\tst\WKIX32.EXE" -f "D:\Kix\tst\SU.EXE" -m "" -e """"%KIXCRYPTDIR%\wkix32.exe """%KIXCRYPTFILE%""" $SU_PASSWORD=******" "D:\Kix\tst\tst_su.kix"
(Sorry about the long line guys)
Doing it this way ensures that the password is never visible in it's unencrypted form - it is passed directly on the command line as a variable assignment.
Even if someone gets a view of your unencrypted script, they will not see the password.
|
|
Top
|
|
|
|
#73704 - 2003-02-27 02:06 PM
Re: Having problem with XP AND su AND kix
|
Mandala
Fresh Scripter
Registered: 2003-02-17
Posts: 36
|
I used the procedure that MightyR1 described with his three files
this works also fine if launched from a local dir but not from a shared dir (netlogon dir)
we have the same message "CreateProcessFromUser" when the su started from the netlogon dir
Oh what a quest !
_________________________
P.Maquoi
Cellule Antivirus du M.E.T.
pmaquoi@met.wallonie.be
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1003 anonymous users online.
|
|
|