This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

encrypt

Old posts that have not been replied to for several years.
Locked
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

encrypt

Post by duofruo »

is there a way to encrypt the tcl scripts, i neet the encrypt a botnet script, that contains many components
Embrace The Inevitable
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

Code: Select all

set text [encrypt $key $text] <- encrypts $text with $key
set text [decrypt $key $text] <- decrypts $text with $key
be sure to use the same key on both bots
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

i wana ecrypt the whole tcl script, not just on word
Embrace The Inevitable
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

TCLPro is the only acceptable way i'd say, strikelights method e.g. is too easy to crack
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

GodOfSuicide wrote:TCLPro is the only acceptable way i'd say, strikelights method e.g. is too easy to crack
You mean bytecode compilation, right? That's not encryption :P
Have you ever read "The Manual"?
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

well, for me bytecode asm and this stuff is like a cryptic lang ;)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Not many users know how to decode strikelight's method.. so it's better than none :mrgreen:
Once the game is over, the king and the pawn go back in the same box.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

you wouldnt even have to decode it, you could also find out the commands / settings / vars names with info, then get the proc's body with info body command, then the args and you're done....i wonder if this also works at TCLPro, anyone want to try ?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Why would you want to encrypt a whole script, anyway? Are there passwords in it, or unprotected commands or something?
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

For the record, my method is NOT "encryption", it's "obfuscation" (for my publically released scripts). I have never made any such claim that my publically released scripts are encrypted. My publically released scripts are designed for all eggdrop versions, without the use of any external modules, shared objects, dlls, etc.. etc.. There is no (semi)secure method of publically releasing an "encrypted" script without also releasing/using some type of addon/modification.

The encryption of my personal scripts IS actual encryption, private, not what I release. Thus, you would never have even seen my encryption method, as you put it.

As for if 'info <arg>' would work for byteencoded scripts, no, it would not work, as the TCL is obliterated and turned into simpler machine code. Hence the term "ByteCode Compiler"...
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

strikelight wrote:As for if 'info <arg>' would work for byteencoded scripts, no, it would not work, as the TCL is obliterated and turned into simpler machine code. Hence the term "ByteCode Compiler"...
yeah, but maybe it would have been decrypted on the fly...wouldnt be secure at all, i know.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

GodOfSuicide wrote:
strikelight wrote:As for if 'info <arg>' would work for byteencoded scripts, no, it would not work, as the TCL is obliterated and turned into simpler machine code. Hence the term "ByteCode Compiler"...
yeah, but maybe it would have been decrypted on the fly...wouldnt be secure at all, i know.
I repeat: bytecode compilation is NOT encryption. A .tbc file holds an (ascii-85) encoded version of the compiled script. All normal tcl scripts are compiled when you load them, and what your interpreter runs internally is this compiled version of the code. The string returned by 'info body' is a copy of the original source, not the actual code running in your interpreter.
When loading a .tbc file there is no source (in most cases anyway... there is a #define in the compiler to include the source in compiled files). The main purpose of bytecode compilation (the way I see it) is to avoid compiling a static script every time it's loaded. You also save the memory normally occupied by the source code copy (unless you change that #define in your compiler, of course).
Reconstructing the source (or at least a human-readable version) from the bytecode should not be too hard.
Have you ever read "The Manual"?
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

May not be so hard, but I think that there is no program which can do that (decompile it to human readable form).
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

KrzychuG wrote:May not be so hard, but I think that there is no program which can do that (decompile it to human readable form).
What's your point? bytecode compiling == encryption because there's no script kiddie tool avaliable to decode it? :P
In many cases decoding the xstrings found in the .tbc file will give you most of the code without even interpreting any bytecode.
Have you ever read "The Manual"?
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

I tried many ways to recover my script from bytecode without any results. Once after modifications in tbcload library i've recovered small part but i need all. I don't know how you decompiled it, but i'm very interested in it (still trying to recover my forgotten code).
Locked