Re: Slow down string changers

From: Gerhard W. Gruber (sparhawk_at_gmx.at)
Date: 01/28/04


Date: Wed, 28 Jan 2004 22:21:03 +0100

On Wed, 28 Jan 2004 04:30:21 +0100 wrote "The Half A Wannabee"
<ShakainZulu_AT(dimmu borgir - fear and wonder)_Hotmail.com> in alt.lang.asm
with <40172dbc$1@news.broadpark.no>

>> I can think of a couple of ways.
>> I don't want to encrypt the string.
>>
>> a. Do a CRC of the string and check it against a stored value
>> b. Check the string at a few locations for certain characters
>> c. Do (a) and if it fails write the correct string in the .exe
>>
>> Thanks.
>
>c. And where would the correcting string be stored ?

Also you have the problem that, if the protection code and the exectuable is
the same file, then its a bit hard to write to the file while it is running.
:) Depending on the OS of course. Under plain DOS this is no problem, but
under Windows this shouldn't work and I think also not under Linux.

Another thing to take care of. If you use a CRC for protection then you can
easily calculate a correcting value which will result in the same CRC but with
different data. This means that the data you check shouldn't contain any
padbytes, otherwise they can be used to correct the CRC. For a CRC32 you would
need 4 padbytes to do this.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://pice.sourceforge.net/
Fast application launcher - http://sourceforge.net/projects/launchmenu


Relevant Pages

  • Re: Shorter checksum than MD5
    ... CRC algorithms were ... within that arithmetic, the CRC of a string is ... def crc(s, salt): ... 'The probability of the changed dada having the same CRC32 is 1/2**32' ...
    (comp.lang.python)
  • Re: Module philosophy
    ... optionally add convenient methods to String and Fixnum too. ... but it's true that I might forget to remove that crc. ... CrcString and CrcSocket which returns CrcStrings. ... probably not going to extend if you include. ...
    (comp.lang.ruby)
  • Re: CCITT-CRC16 in kernel
    ... > of CRC polynomials. ... coefficient of the highest power of x, and the *last* bit it sees is ... mapping between a byte string and a bit string. ... If you have some wierd piece of existing hardware, ...
    (Linux-Kernel)
  • Re: encrypt a string
    ... application by using some "Resouce Hacker" tools, and then calculate the CRC ... > unique string of chars of matching length. ... > Store the result as the value of the registry key. ... > only good for that particular execution. ...
    (microsoft.public.vc.mfc)
  • Re: 15 Bit of data to be veryfied
    ... For short frames, a CRC allows locating, and correcting, a single-bit ... of the polynomial division of x^n, where n is the number of bits ... It is even possible to extend this to multibit errors. ...
    (sci.crypt)

Loading