Results 1 to 5 of 5

Thread: [RESOLVED] CRC - Self Referencing Routines

  1. #1

    Thread Starter
    Hyperactive Member Quiver318's Avatar
    Join Date
    Sep 2007
    Posts
    260

    Resolved [RESOLVED] CRC - Self Referencing Routines

    Hello All,

    While I have some great CRC routines that examine external programs for tampering before they are launched by my main program, I would also like my main program to look itself over to see if it has been tampered with or perhaps infected by a virus.

    Because of the self-referencing problems associated with storing a CRC value within an EXE that will be inspecting itself with that value, I would like to know if you can give me ideas of clever ways to store the CRC value externally, that would in itself be tamper resistant. Either that, or other neat tricks that would allow me to pull off an accurate self CRC-check?

    I know that anti-virus programs often check themselves before scanning a system, but what methods are they using that avoids self-referencing problems?

    Thanks!

    Quiver

    P.S. I am aware that people are capable of breaking any security measure when determined, but I still want to try to make my routines tamper resistant.

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: CRC - Self Referencing Routines

    If it's guaranteed that the program will be on a computer hooked to the internet, the best way would be to get the CRC from an external website.

    Slipping it into the registry as an encrypted string works well.

    I wouldn't try to hide it in the filesystem since different users have different levels of lockdown and you never know what areas of the filesystem your program has access to except for the areas meant for common data storage.

    Really, hide it anywhere you like. The primary vector of attack in your program is to alter the check routine to always "Return True" regardless of any cartwheels the routine is doing to check itself or compare CRCs.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3

    Thread Starter
    Hyperactive Member Quiver318's Avatar
    Join Date
    Sep 2007
    Posts
    260

    Re: CRC - Self Referencing Routines

    Thanks, Jenner! I had not considered the Internet route, at all.

    I had thought of encrypting the CRC value and sticking it into the registry, but I figured that was a pretty easy to alter it in a brute force style since it is such a tiny value. I guess I can pad the value, and then encrypt it so it is larger and harder to pick appart.

    Really the whole thing is just a helpful measure since, as you stated, it is pretty easy for someone to change the code so that a failing CRC value becomes a true value.

    Thanks for your ideas!

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: CRC - Self Referencing Routines

    Perhaps steganography could come handy in this instance?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Hyperactive Member Quiver318's Avatar
    Join Date
    Sep 2007
    Posts
    260

    Re: CRC - Self Referencing Routines

    Perhaps. I have seen programs that can hide information within JPG files. Maybe that is a good way to go. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width