Your strings are not safe!!!
-
- User
- Posts: 13
- Joined: Wed Jun 02, 2004 10:10 am
Your strings are not safe!!!
I stumbled across a program called Textscan by AnalogX, which basically can read all the values, strings from your EXE's... a big problem for those creating near-simple security in their programs like registration keys etc...
http://www.analogx.com/contents/downloa ... xtscan.htm
http://www.analogx.com/contents/downloa ... xtscan.htm
A mind once stretched by a new idea, never regains its original dimensions.
thats why one of the most important rules of protecting valuable strings is
encrypting them. This is to be said for every programming language. so
PROTECT YOUR STRINGS! but only the valuable ones. and be ware of
using a word as password for unencrypting, that will be seen as well.
But i noticed that a lot of string finders wont notice your string and password,
if the encrypting makes a weird string out of it. non readable characters etc.
Low achii walues. And using 0 and 1 for password, most string listers wont
actually show it.
encrypting them. This is to be said for every programming language. so
PROTECT YOUR STRINGS! but only the valuable ones. and be ware of
using a word as password for unencrypting, that will be seen as well.
But i noticed that a lot of string finders wont notice your string and password,
if the encrypting makes a weird string out of it. non readable characters etc.
Low achii walues. And using 0 and 1 for password, most string listers wont
actually show it.
-
- User
- Posts: 13
- Joined: Wed Jun 02, 2004 10:10 am
I have seen those MD5 etc commands in the documentation, but i have no idea how to use them, my idea of encryption/cipher is entering a string or data, a keyword or password and take the output as the encrypted form.
If someone could tell me how, i would appreciate it
If someone could tell me how, i would appreciate it

A mind once stretched by a new idea, never regains its original dimensions.
Re: Your strings are not safe!!!
Compile this into an exe and take a look with a hex editor:

WARNING: This is NOT recommended for important data! You should always
use encryption for important data, as mentioned in this topic already. But this
method is fine for non-vital things such as Easter Egg messages and so on.
Code: Select all
a$=Chr('t')+Chr('h')+Chr('i')+Chr('s')+Chr(' ')
a$+Chr('i')+Chr('s')+Chr(' ')
a$+Chr('h')+Chr('i')+Chr('d')+Chr('d')+Chr('e')+Chr('n')+Chr(' ')
a$+Chr('i')+Chr('n')+Chr(' ')+Chr('a')+Chr('n')+Chr(' ')
a$+Chr('e')+Chr('x')+Chr('e')
MessageRequester("test",a$,0)

WARNING: This is NOT recommended for important data! You should always
use encryption for important data, as mentioned in this topic already. But this
method is fine for non-vital things such as Easter Egg messages and so on.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: Your strings are not safe!!!
> I stumbled across a program called Textscan by AnalogX, which basically
> can read all the values, strings from your EXE's
A better app is BinText: http://tinyurl.com/4amuz
BinText is smaller, needs no installation, has filtering, and lets you maximize
the window to see more results.
Highly recommended.
> can read all the values, strings from your EXE's
A better app is BinText: http://tinyurl.com/4amuz
BinText is smaller, needs no installation, has filtering, and lets you maximize
the window to see more results.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Here's an exampel using MD5 hashing to check passwords.
Code: Select all
Password.s = "Purebasic"
MD5.s = MD5Fingerprint(@Password, Len(Password))
OpenConsole()
PrintN("Enter password or Q to quit")
finished = #False
Repeat
Entered.s = Input()
PrintN("")
If LCase(Entered) = "q"
finished = #True
ElseIf MD5Fingerprint(@Entered, Len(Entered)) = MD5
PrintN("Password is correct")
Else
PrintN("Incorrect Password")
EndIf
Until finished
CloseConsole()
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
@GedB In your example you're still storing the password in a string. It's no more secure than not using the encryption at all. Open up your exe with a hex editor and you'll still find the password there, plain to see. I always thought the way to use those commands was like this (the password's still Purebasic)
Code: Select all
MD5.s="2747d19b44270f1e0e23bf32aca3a1f7"
OpenConsole()
PrintN("Enter password or Q to quit")
finished = #False
Repeat
Entered.s = Input()
PrintN("")
If LCase(Entered) = "q"
finished = #True
ElseIf MD5Fingerprint(@Entered, Len(Entered)) = MD5
PrintN("Password is correct")
Else
PrintN("Incorrect Password")
EndIf
Until finished
CloseConsole()
MD5 is ok for casual encryption
I think MD5 has been cracked and is not considered suitable for any serious encryption, but it is CERTAINLY suitable for turning your strings unrecognizable sections of code.