Page 1 of 2 12>
Topic Options
#99020 - 2003-03-03 02:40 PM KiXcrypt version 3.03x - call for testers.
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I need some help testing a new version of KiXcrypt.

This version uses a new method of hiding the primary script, but at this stage it is experimental.

VERY IMPORTANT 1
This updated requires a version of KiXtart which supports IsDeclared()

Activate the experimental routine by using the "-x" command line switch.

The new features are:
  • New environment variable %KIXCRYPTDEBUG% set to "1" if the package was made with the "-d" debug flag.
  • New environment variable %KIXCRYPTEXE% which is the full path to the package name when started. This is also quite experimental, so let me know your findings.
  • %COMSPEC% is no longer included in the default execution command.
  • "-x" experimental script protection
VERY IMPORTANT 2
There is a problem with environment variables being expanded when starting the unencrypted script under the control of a command interpreter. To avoid this issue, either:
1) Don't use environment variables in your script or disguise them so that they don't appear as %ENVVAR%.
2) Don't use %COMSPEC% (command.com or cmd.exe) in your execution (-e) string. The default command no longer includes %COMSPEC%.
If you don't use the "-x" switch KiXcrypt works as it always has (or at least it should [Wink] let me know about any regressions)

For those of you interested in how it works, the "-x" option writes a boot script rather than the encrypted script. The encrypted script is passed as command line variables, which are then catenated in memory to form the original script. This is then Executed().

If you create the package with the debug option the recreated script is saved as "bsdebug.kix" so you can compare it with the original script if there are problems.

Note, if you have a very large script you may get problems with environment space.

To save you hacking it, here is the boot script:
code:
Break OFF
$KIXCRYPTCOUNT=0
$KIXCRYPTLINES='Exit 1'
While Execute('Exit IsDeclared($$sKIXCRYPT$KIXCRYPTCOUNT)')
Redim Preserve $KIXCRYPTLINES[$KIXCRYPTCOUNT]
$KIXCRYPTNULL=Execute('$$KIXCRYPTLINES[$KIXCRYPTCOUNT]=$$sKIXCRYPT$KIXCRYPTCOUNT')
If $KIXCRYPTLINES[$KIXCRYPTCOUNT]='0' $KIXCRYPTLINES[$KIXCRYPTCOUNT]='' EndIf
$KIXCRYPTCOUNT=$KIXCRYPTCOUNT+1
Loop
If %KIXCRYPTDEBUG%
$KIXCRYPTNULL=RedirectOutput('bsdebug.kix',1)
Join($KIXCRYPTLINES,@CRLF)
$KIXCRYPTNULL=RedirectOutput('')
EndIf
Exit Execute(Join($KIXCRYPTLINES,@CRLF))

VERY IMPORTANT 3
There is a small problem passing in a blank variable. If you start KiXtart with a variable specified as '$sVar=""' it gets converted to a numeric zero. This would mean that a blank line in your script would be converted to a zero, and the zero would be dumped to the console when you ran the script. To avoid this, the boot script changes any line which is "0" to "". In the unlikely event that you need a line in your script which is just "0" you will need to code around it.

This may apply to any line which can be converted to a numeric, so beware.

Right, if you've got this far and are still interested, the files are here

Top
#99021 - 2003-03-28 03:35 PM Re: KiXcrypt version 3.03x - call for testers.
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
*BUMP*

Anyone?

Top
#99022 - 2003-03-28 04:34 PM Re: KiXcrypt version 3.03x - call for testers.
krabourn Offline
Hey THIS is FUN
*****

Registered: 2000-12-11
Posts: 244
Loc: San Antonio, Texas, USA
I am not sure exactly what you want, but here is a little.

Good news
The %KIXCRYPTEXE% is working. I like this variable. $Sciptdir = "%KIXCRYPTEXE%" [Smile]

Bad news
My script is about 256kb
The file bsdebug.kix is about 11kb. That does not get passed all the kixform gui code.
_________________________
Kelly

Top
#99023 - 2003-03-28 10:11 PM Re: KiXcrypt version 3.03x - call for testers.
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
My scripts don't contain GUI and are not so big...

No problems found...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#99024 - 2003-08-22 08:03 AM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
what is da latest status of this?
_________________________
!

download KiXnet

Top
#99025 - 2003-08-23 09:34 AM Re: KiXcrypt version 3.03x - call for testers.
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
WYSIWYG.

Two responses to the testing so far - not really a good enough sample yet.

Feel free to download and test. All feedback welcome.

Top
#99026 - 2003-08-23 06:43 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sure I can test it.
just that I have not so much usage for crypter in general... actually none this far.

what is more interesting me, are the techniques you had used in there.
_________________________
!

download KiXnet

Top
#99027 - 2003-08-24 12:02 AM Re: KiXcrypt version 3.03x - call for testers.
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Interested too...

And not to hack KiXCrypt [Wink]
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#99028 - 2003-08-24 12:06 AM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja?
so what is your use of them then? [Wink]
_________________________
!

download KiXnet

Top
#99029 - 2003-08-24 12:42 AM Re: KiXcrypt version 3.03x - call for testers.
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
For now it's installing an applic with admin rights using KiXCrypt and SU.

Still looking into KSMS to steal some ideas though...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#99030 - 2003-08-31 09:55 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
some usage output would be great...
checking on the doc for switches.
the usage switch at least does not work [Wink]
_________________________
!

download KiXnet

Top
#99031 - 2003-08-31 10:03 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that might be just the case with wkixcrpt.exe

anyway, this:
quote:
For instance, using "CMD", "COMMAND" or "%COMSPEC%" will generate a console.
is not true.
if you haven't created a console beforehand, all these do NOT create a console.
_________________________
!

download KiXnet

Top
#99032 - 2003-08-31 10:17 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja.
that seems a problem of each wkixcrpt.exe's
no output.
can't get it to make output-file nor can't I make it give me any feedback.

so, will need to first use kixcrypt.exe to make your commandline and once done, then for the final call the wkixcrpt.exe
_________________________
!

download KiXnet

Top
#99033 - 2003-08-31 10:27 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
these are not just beta related comments but comments as I browse along...
quote:

FATAL: File "C:\DOCUME~1\NIEMJO~1.PIK\LOCALS~1\Temp\setup.ini" already exists - cannot continue.

now why is that?
what if kixcrypt would just overwrite those?
or use unique tempfile dir?

do I have to first delete possible temp-files before I can use my crypted exe?

also, specifying a temp-folder, gives:
quote:

C:\Documents and Settings\niemjo.PIKVAL\Työpöytä\checker installer>setup -t %temp%\unique1
FATAL: Cannot find temporary directory "C:\DOCUME~1\NIEMJO~1.PIK\LOCALS~1\Temp\unique1"

yet again, is there a way to make this standalone?
if not, think I need to go back to simple sfx stuff [Wink]

[ 31. August 2003, 22:28: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#99034 - 2003-08-31 10:36 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, thought something was wrong with my commandline so tried kcgen.kix.

no debug to console and "press return to continue" message.
once pressed it, it HANG.
waited about 1-2 mins before killed the process.
_________________________
!

download KiXnet

Top
#99035 - 2003-08-31 11:11 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja, bothered reading the bubblehelps in kcgen.
doh, there it was.
no info from wkixcrpt.

now, the existing file question remains.
how do I make reliable soft if kixcrypt crashes on existing file?
_________________________
!

download KiXnet

Top
#99036 - 2003-09-01 12:23 AM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, after some research with kixcrypt.exe I was able to produce package with wkixcrpt.exe

and it even works.
now, I'm little bit worried of having the same files in temp-folder and getting a crash...

anyway, it worked [Wink]
_________________________
!

download KiXnet

Top
#99037 - 2003-09-02 12:15 AM Re: KiXcrypt version 3.03x - call for testers.
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Ok, as regards requests about the internals of KiXcrypt, I'll refer you to the comments in the 3.00 release:
quote:
How good is the encryption?
Hmm. The encryption itself is quite good because it is proprietary. Only I know how it works and I'm not telling. It is good because without knowing how it works it is hard to get started cracking it.

I'd love to be in a position to get peer review of the code and techniques, but even giving hints would lessen the effectiveness of the encryption, so I can't divulge anything. Sorry [Frown]

quote:
--------------------------------------------------------------------------------
For instance, using "CMD", "COMMAND" or "%COMSPEC%" will generate a console.
--------------------------------------------------------------------------------

is not true.
if you haven't created a console beforehand, all these do NOT create a console.

Yes, and no [Wink] The point about this comment is that using "wkixcrpt.exe" will not stop a console being created. It will not create one itself but if by your actions one is created then it will appear. Some ways of doing this:
  • Use "kix32.exe" or another console application.
  • Use "wkix32.exe", but forget the "/i" switch.
  • Use "%COMSPEC%" in the execution (-e) command
The GUI front-end automatically uses "wkix32.exe /i" for console-less encryptions which solves most of these problems.
Note however, if you issue a command like:
code:
wkixcrpt -e "%COMSPEC% /C wkix32.exe /i %KIXCRYPTFILE%" "myscript.exe"

A console will appear.

quote:
the usage switch at least does not work
You are correct, this is because the console-less version does not have anywhere to dump the output from the command. I'll add something to the docs about this, but the solution as you found is to get it working with the console version and then switch to console-less for the final version.

There is no easy solution to this, as adding pop-ups (like wkix32.exe does) would bloat the executable enormously. I'm already unhappy that it is up to 35 KB.

quote:
how do I make reliable soft if kixcrypt crashes on existing file?
Ahem. It doesn't crash - it makes a nice clean exit in an exception.

If you think about it you will see why I chose to do this. The problem is that unless you have defined the directory it will unpack in (using -t at the encrypt stage) you don't know which directory will be used. This means that files in the destination directory could be clobbered.

As an example, suppose you create a package which includes the executable kix32.exe and the user runs it in c:\winnt. The package extracts kix32.exe, runs your script and then deletes all the support files. That's fine, unless there was already a kix32.exe present, in which case you have just deleted it from his system, removing his own version.

This could apply to any of the support files included in the package. For this reason the behaviour it to exit and clean up if there is a file name clash. You will not get this error with the primary file, as a unique filename is always generated.

quote:
C:\Documents and Settings\niemjo.PIKVAL\Työpöytä\checker installer>setup -t %temp%\unique1
FATAL: Cannot find temporary directory "C:\DOCUME~1\NIEMJO~1.PIK\LOCALS~1\Temp\unique1"

At present the temporary directory must already exist. I've thought about creating a temporary subdirectory with a random name. There is a lot of coding overhead in doing this, and some security concerns which is why I've avoided it so far.

The problem is mainly the clean-up code, dealing with extra files and subdirectories which may have been created when the unencryted file is executed.

I may well have another look at creating temporary subdirectories if it is a popular request.

Thanks for the feed-back, and any suggestions on how to safely overwrite existing files would be welcome.

Top
#99038 - 2003-09-01 01:04 PM Re: KiXcrypt version 3.03x - call for testers.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, does it matter where one runs the app?
as we know before hand, not specifying the tempdir will make it to use %temp%
and weird are the ppl that keep valuable stuff in temp [Wink]

anyway, I already got nice app done with this and feel kinda happy joy joy.
now just need to make it compressed too...
_________________________
!

download KiXnet

Top
#99039 - 2003-09-01 01:56 PM Re: KiXcrypt version 3.03x - call for testers.
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Compression. Hmm.

I've been thinking about adding compression using zlib, but this will more than double the size of KiXcrypt. Currently KiXcrypt is about 35 KB, at a guess it will weigh in at around 100 KB with built-in compression. This means it would only be of any real use if the input files were very large to start with.

Very few scripts would be large enough to make compression worth while. If the script was bundled with executables (like wkix32.exe) it might be worth it depending on the compression achieved.

I guess I could have a version with compression and a version without, althought that will add to the headache of maintining it.

Thoughts, anyone?

Top
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 369 anonymous users online.
Newest Members
rrosell, PatrickPinto, Raoul, Timothy, Jojo67
17877 Registered Users

Generated in 0.076 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org