| View previous topic :: View next topic |
| Author |
Message |
duofruo Halfop

Joined: 23 Oct 2003 Posts: 94 Location: Ploiesti@.ro
|
Posted: Mon Feb 09, 2004 4:27 pm Post subject: encrypt |
|
|
is there a way to encrypt the tcl scripts, i neet the encrypt a botnet script, that contains many components _________________ Embrace The Inevitable |
|
| Back to top |
|
 |
GodOfSuicide Master

Joined: 17 Jun 2002 Posts: 463 Location: Austria
|
Posted: Mon Feb 09, 2004 7:41 pm Post subject: |
|
|
| Code: |
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 |
|
| Back to top |
|
 |
duofruo Halfop

Joined: 23 Oct 2003 Posts: 94 Location: Ploiesti@.ro
|
Posted: Tue Feb 10, 2004 4:34 am Post subject: |
|
|
i wana ecrypt the whole tcl script, not just on word _________________ Embrace The Inevitable |
|
| Back to top |
|
 |
GodOfSuicide Master

Joined: 17 Jun 2002 Posts: 463 Location: Austria
|
Posted: Tue Feb 10, 2004 6:02 am Post subject: |
|
|
| TCLPro is the only acceptable way i'd say, strikelights method e.g. is too easy to crack |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Tue Feb 10, 2004 7:43 am Post subject: |
|
|
| 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  _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
GodOfSuicide Master

Joined: 17 Jun 2002 Posts: 463 Location: Austria
|
Posted: Tue Feb 10, 2004 8:45 am Post subject: |
|
|
well, for me bytecode asm and this stuff is like a cryptic lang  |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Feb 10, 2004 1:04 pm Post subject: |
|
|
Not many users know how to decode strikelight's method.. so it's better than none  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
GodOfSuicide Master

Joined: 17 Jun 2002 Posts: 463 Location: Austria
|
Posted: Tue Feb 10, 2004 2:06 pm Post subject: |
|
|
| 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 ? |
|
| Back to top |
|
 |
stdragon Owner

Joined: 23 Sep 2001 Posts: 959
|
Posted: Tue Feb 10, 2004 3:41 pm Post subject: |
|
|
| Why would you want to encrypt a whole script, anyway? Are there passwords in it, or unprotected commands or something? |
|
| Back to top |
|
 |
strikelight Owner

Joined: 07 Oct 2002 Posts: 708
|
Posted: Tue Feb 10, 2004 11:44 pm Post subject: |
|
|
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"... |
|
| Back to top |
|
 |
GodOfSuicide Master

Joined: 17 Jun 2002 Posts: 463 Location: Austria
|
Posted: Wed Feb 11, 2004 6:24 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Wed Feb 11, 2004 8:43 am Post subject: |
|
|
| 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"? |
|
| Back to top |
|
 |
KrzychuG Master

Joined: 16 Aug 2003 Posts: 306 Location: Torun, Poland
|
Posted: Sat Feb 14, 2004 3:23 pm Post subject: |
|
|
| May not be so hard, but I think that there is no program which can do that (decompile it to human readable form). |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Sun Feb 15, 2004 9:18 pm Post subject: |
|
|
| 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?
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"? |
|
| Back to top |
|
 |
KrzychuG Master

Joined: 16 Aug 2003 Posts: 306 Location: Torun, Poland
|
Posted: Sat Feb 21, 2004 1:46 pm Post subject: |
|
|
| 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). |
|
| Back to top |
|
 |
|