// COMPLETE THREAD

best way to check for modification of self

3 expanded posts ยท every known parent and child

NODE 066c6491best way to check for modification of self
I am looking for C src or algorithms that would be useful for a program
to check its own integrity and make sure it hasnt been modified.  

Looking at the filesize of the file would not help, since I want to make
sure no one has modified just some text, etc.  I would like the algorithm
or code to be rather quick in doing the check in the initialization of
the program.  Would finding the src to CRC or sum and adding that into the
program be the best solution?

Has anyone else dealt with this?



-- 
Christopher Klaus
klaus@mail.lds.loral.com cklaus@hotsun.nersc.gov
NODE cf4184bfRe: best way to check for modification of self
>I am looking for C src or algorithms that would be useful for a
  >program to check its own integrity and make sure it hasnt been
  >modified.

     Try caware.zip, cvirport.zip, and stealth.zip in /pub/msdos/virus
on oak.oakland.edu.
NODE 736985c6Re: best way to check for modification of self
> 
> 
> 
> I am looking for C src or algorithms that would be useful for a program
> to check its own integrity and make sure it hasnt been modified.  
> 
> Looking at the filesize of the file would not help, since I want to make
> sure no one has modified just some text, etc.  I would like the algorithm
> or code to be rather quick in doing the check in the initialization of
> the program.  Would finding the src to CRC or sum and adding that into the
> program be the best solution?
> 
> Has anyone else dealt with this?

this is what the tripwire package does. 
I think (perhaps maybe) I heard someone say it uses a hashing
function that is not cryptographically secure (ie. can be forged)
but also that the design is highly modular and the hashing function
can be replaced with something more secure

> Christopher Klaus
> klaus@mail.lds.loral.com cklaus@hotsun.nersc.gov