#120366 - 2004-05-28 03:26 PM
KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Hi All...
I recently had a interesting conversation with one of my customers. He said, "Your script is broken." He then told me where it was broken. I decided that it WAS broken because he was ABLE TO SEE IT.
So now I need to use Kixcrypt to keep out prying eyes.
I have gotten it to work somewhat in most cases, but sometimes the script starts to pop up and it just beeps and closes without running the script. What does KixCrypt need to work its whole magic?
Here is the syntax I am using to build the encrypted script:
Code:
c:>kixcrypt -o kixtest2.scr kixtest.scr -t c:\nwsutil
C:\nwsutil is the temporary folder we use for all logon script functions.
Is there any other things I should be accounting for?
Thanks!
-Jdogg
P.S. I am using KixCrypt 003.00B.
|
|
Top
|
|
|
|
#120368 - 2004-05-28 03:44 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Lemme see if I understand... I normally encrypt the file locally using kixcrypt and then move it to the netlogon folder on one of the BDC's and replicate it out. Am I not using the syntax right? Thanks...
|
|
Top
|
|
|
|
#120370 - 2004-05-28 04:06 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Well, I give it the command to output to a scr file. It seems to work the same as an exe. It gives no errors. It just says "the encrypted script is called kixtest2.scr" or something like that. Does kix32.exe have to be in the same directory as the encrypted script in order for it to run?
Thanks...
|
|
Top
|
|
|
|
#120371 - 2004-05-28 04:35 PM
Re: KixCrypt Usage...
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
Does kix32.exe have to be in the same directory as the encrypted script in order for it to run
No, but if you don't specify where it is then it needs to be on the clients PATH somewhere.
When I said execute it in a command console, I meant the encrypted script (kixtest2.scr in your case) - not the encryption process.
If it is beeping at you then there definately errors. The only time that KiXcrypt will beep is when attempting to install a Control-C handler at run time. If this fails it will beep, but continue to execute.
Leave the "-o" option out for the moment. Just create the executable with "kixcrypt -d myscript.scr". This will automatically create a "myscript.exe" and display some debugging information.
When you run the exe, it will display more debugging information - this can be very useful in determining what the problem is.
|
|
Top
|
|
|
|
#120372 - 2004-05-28 04:55 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Code:
DEBUG: iSecure=9 DEBUG: iCryptionSeed=631 DEBUG: Message text len=92 Decrypting from KiXcrypt version 003.00b KiXcrypt author: Richard Howarth (rhowarth@sgb.co.uk) DEBUG: iPasswordLen=12 DEBUG: Suffix len=10 DEBUG: Command len=37 DEBUG: Temporary directory len=0 DEBUG: Unpacking 1 extra files DEBUG: Unpacking file "D:\DOCUME~1\testjb\LOCALS~1\Temp\kix32.exe",114688 bytes DEBUG: Unpacking master file "kixtest.scr",56131 bytes DEBUG: Temporary file name=D:\DOCUME~1\testjb\LOCALS~1\Temp\PPAULSNH.scr DEBUG: Executing "%COMSPEC% /C kix32.exe %KIXCRYPTFILE%" Expanded "D:\WINDOWS\system32\cmd.exe /C kix32.exe D:\DOCUME~1\testjb\LO CALS~1\Temp\PPAULSNH.scr" 'kix32.exe' is not recognized as an internal or external command, operable program or batch file. WARNING: Temporary file not deleted by KiXtart! DEBUG: Deleting support file "D:\DOCUME~1\testjb\LOCALS~1\Temp\kix32.exe"
This is the output when I try to run it, even when I use the syntax you provided AND include kix32.exe with the -f option. Suggestions??
|
|
Top
|
|
|
|
#120373 - 2004-05-28 05:27 PM
Re: KixCrypt Usage...
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Well, the error here is nice and simple. As you can see, "kix32.exe" cannot be located.
See how you get on with this command: Code:
kixcrypt -d -f c:\windows\kix32.exe -e "%KIXCRYPTDIR%\kix32.exe %KIXCRYPTDIR%\%KIXCRYPTFILE%" myscript.kix
Obviously you will need to change c:\windows... to wherever you have the executable installed.
|
|
Top
|
|
|
|
#120374 - 2004-05-28 06:26 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Code:
G:\Server Support\Logon Scripts - DO NOT DELETE!!>kixcrypt -d -f c:\nwsutil\kix32.exe -e "%KIXCRYPTDIR%\kix32.exe %KIXCRYPTDIR%\%K IXCRYPTFILE%" kixtest.scr Crypting with KiXcrypt version 003.00b KiXcrypt author: Richard Howarth (rhowarth@sgb.co.uk)
Encrypted file is "kixtest.exe" DEBUG: DataPointer=32768 DEBUG: iSecure=9 DEBUG: Cryption Seed=2725 DEBUG: Message text len=92 DEBUG: iPasswordLen=22 DEBUG: SuffixLen=10 DEBUG: Command line len=52 DEBUG: Directory path len=0 DEBUG: Adding 1 additional files DEBUG: Adding file c:\nwsutil\kix32.exe, 114688 bytes DEBUG: Base filename "kix32.exe" DEBUG: Writing master file "kixtest.scr", 56131 bytes.
G:\Server Support\Logon Scripts - DO NOT DELETE!!>"G:\Server Support\Logon Scripts - DO NOT DELETE!!\kixtest.exe" DEBUG: iSecure=9 DEBUG: iCryptionSeed=2725 DEBUG: Message text len=92 Decrypting from KiXcrypt version 003.00b KiXcrypt author: Richard Howarth (rhowarth@sgb.co.uk) DEBUG: iPasswordLen=22 DEBUG: Suffix len=10 DEBUG: Command len=52 DEBUG: Temporary directory len=0 DEBUG: Unpacking 1 extra files DEBUG: Unpacking file "C:\DOCUME~1\mjblh\LOCALS~1\Temp\kix32.exe",114688 bytes DEBUG: Unpacking master file "kixtest.scr",56131 bytes DEBUG: Temporary file name=C:\DOCUME~1\mjblh\LOCALS~1\Temp\YRHSLYRA.scr DEBUG: Executing "%KIXCRYPTDIR%\kix32.exe %KIXCRYPTDIR%\%KIXCRYPTFILE%" Expanded "C:\DOCUME~1\mjblh\LOCALS~1\Temp\kix32.exe C:\DOCUME~1\mjblh\LOCALS~1\Temp\C:\DOCUME~1\mjblh\LOCALS~1\Temp\YRHSLY RA.scr" Script error : failed to find/open script !.
WARNING: Temporary file not deleted by KiXtart! DEBUG: Deleting support file "C:\DOCUME~1\mjblh\LOCALS~1\Temp\kix32.exe"
It looks like it is still having problems. Can you see what I am doing wrong? Thanks for your patience.
|
|
Top
|
|
|
|
#120376 - 2004-06-01 09:34 AM
Re: KixCrypt Usage...
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
hmm... richard, is %kixcryptfile% fully qualified (full-path) reference?
(can't remember myself)
Oops
Yes, it is fully qualified. Now you can see why I recommend using the GUI to create the encrypted files
JDogg, try the command line that Lonkero supplied in the previous post, and let us know how you get on:
Code:
kixcrypt -d -f c:\nwsutil\kix32.exe -e "%KIXCRYPTDIR%\kix32.exe %KIXCRYPTFILE%" kixtest.scr
|
|
Top
|
|
|
|
#120377 - 2004-06-03 07:48 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Sorry for the late reply... I have been busy with other things... imagine that! 
That DOES seem to work! But for my sanity's sake, lets see if I can break this down so that I understand:
The -f includes the kix32.exe in the package so that it can be run. The -e tells what will be executed when the package is run. The kixtest.scr is the script that will be encrypted.
The %KIXCRYPTDIR% and %KIXCRYPTFILE% are variables, I know, but what is defined in those variables? Is it essentially saying: %KIXCRYPTDIR% = wherever the temp files are extracted AND %KIXCRYPTFILE% = internal variable used by kixcrypt??
Sorry if I am making this more complicated than it seems. The main point is, your command line DID work. Thanks again!
|
|
Top
|
|
|
|
#120379 - 2004-06-04 03:24 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Richard/All,
Thanks for the help. The following syntax seems to work for the command line: kixcrypt -f c:\nwsutil\kix32.exe -e "%KIXCRYPTDIR%\kix32.exe %KIXCRYPTFILE%" kixtart.scr
However, I have ONE user that is reporting a popup error message, and I figured I would run it by you: kix32.exe - Entry poing not found The procedure entry point cm_get_devnode_status_ex could not be located in the dynamic link library setupapi.dll.
I have checked the user's setupapi.dll and it looks the same as mine. He appears to be the only one with the problem. Any suggestions?
|
|
Top
|
|
|
|
#120381 - 2004-06-04 06:50 PM
Re: KixCrypt Usage...
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
It seems that I found a fix... I am not including the kix32.exe in the package, but rather, just making sure it knows where it is on the machine.
OLD WAY kixcrypt -f c:\nwsutil\kix32.exe -e "%KIXCRYPTDIR%\kix32.exe %KIXCRYPTFILE%" kixadmin.scr
NEW WAY kixcrypt -e "C:\NWSUTIL\kix32.exe %KIXCRYPTFILE%" kixadmin.scr
Using it this way keeps that error message from coming up, and seems to be more reliable on all the machines I tested.
Thanks again Richard.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|