Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:45:02+00:00 2026-05-24T23:45:02+00:00

Let me explain what I’m trying to accomplish. I want to know from inside

  • 0

Let me explain what I’m trying to accomplish. I want to know from inside my Windows executable file if it was tampered with after it was built. For that I decided to calculate the CRC value on its own file from within and compare it with a predefined value. But what I’m encountering is that once the executable is built the CRC remains the same, but only until I re-build it again (without any changes done to the source code). That’s when the CRC changes. What is the magic here? Does the compiler add some arbitrary bytes to the exe file?

PS. I’m using Microsoft Visual Studio C++ 2008 and run my tests on Windows 7 Ultimate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:45:03+00:00Added an answer on May 24, 2026 at 11:45 pm

    It could be some timestamp or version number automatically embedded by the compiler/linker…

    To account for that I suggest something different (based on the fact that these are native EXE/DLLs):

    Just postprocess the generated file – don’t assume anything about CRC32 of the resulting file before it is generated…

    Windows has a really “nice” feature when loading an EXE/DLL: it just ignores anything at the end of the file that doesn’t belong there.

    You can use this to your advantage: append a block of bytes (for example 256 bytes) to the file. This block can contain whatever you like (hash of your file, length of your file etc.) and can be even encrypted… when you want to check you calculate the information needed (like your CRC…) and compare it to that block of your file…

    To make it harder you can include different hashes and choose randomly which one you check… you can even sprinkle some random bytes into that block…
    Also put in a check that makes sure there is only one such block present… so you can abort or whatever you want if there is no such block, more than one such block or your check and the saved information from that block does not match.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me explain what I'm trying to realize: I have a encrypted tar file.
Let me explain. Suppose I want to teach Python to someone who only speaks
Quite new to maven here so let me explain first what I am trying
Let me explain what I do. On Android I want a gallery of images,
Let me explain what I mean when I say that I want to rotate
Let me explain you the scenario I am developing for Windows Phone 7 and
Let me explain more: we know that map function in jQuery acts as .Select()
Let me explain what I'm trying to do, and if someone could point the
Let me explain a bit more, I am trying to have a large area
Let me explain more detail. First of all; I know that if user press

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.