Re: Win32 PE, ImageHlp, and Checksum (CRC)

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi All,

I broke down and fired up WinDbg. I posted the results to the Crypto++
news gorup since I was approaching it as a CRC.

Jeff

http://groups.google.com/group/cryptopp-users/browse_thread/thread/73386ab6b2f2f0d8

On Jun 21, 3:21 pm, Jeffrey Walton <noloa...@xxxxxxxxx> wrote:
Hi All,

To cut to the Chase: What is the Algorithm that Microsoft uses for the
PE checksum?

I'm researching shortcomings of the Windows Checksum in the Header.
Using ImageHlp I can extract the embedded checksum and have the file's
checksum recalculated.

I've used IDA Pro to perform a statc listing: CheckSumMappedFile()
from ImageHlp.dll eventually calls _ChkSum@12. So the function is
there.

I've also notice that Microsoft only uses the low order 24 bits of the
DWORD, so I suspect one of two things:

* CRC-24 or variant
* CRC-32 with some sort of truncation

I'm also aware most bets are off with .NET when using Cetificates to
verify the image's integrity.

Any Ideas,
Jeff
Jeffrey Walton

So far, I've looked at:
* Microsoft PE Executable Format
* Debbuging Applications, 1st Ed (John Robbins)
* Debbuging Applications, 3rd Ed (John Robbins)
* MSJ Under the Hood by Matt Pietrek
* An In-Depth Look into the Win32 Portable
Executable File Format, Part 1
* An In-Depth Look into the Win32 Portable
Executable File Format, Part 2
* What Goes On Inside Windows 2000: Solving the
Mysteries of the Loader
* Undocumented DOS (Personal Library)
* Undocumented Windows 2000 Secrets (Personal Library)
* Web Grep

.



Relevant Pages

  • Win32 PE, ImageHlp, and Checksum (CRC)
    ... What is the Algorithm that Microsoft uses for the ... I'm researching shortcomings of the Windows Checksum in the Header. ... Executable File Format, Part 1 ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Alert: Microsoft Security Bulletin - MS03-013 - Windows 2000 Warning
    ... 0x00D8-0x00DB, which is where the timestamp is stored in the file header, ... which is the image checksum. ... Subject: Alert: Microsoft Security Bulletin - MS03-013 - Windows 2000 ... If Microsoft has somehow fixed the problems with MS03-007, ...
    (NT-Bugtraq)
  • Re: Reboot on boot
    ... Microsoft Certified Professional ... | * Symbol loading may be unreliable without a symbol search path. ... | Timestamp: unavailable ...
    (microsoft.public.win2000.general)
  • RE: Blue Screen stop: c0000221
    ... C0000221 {Bad Image Checksum} The image SHDOCVW.dlll is possibly corrupt. ... I have tried to start in safe mode, ... Insert the Windows XP CD into your CD-ROM or DVD-ROM drive. ...
    (microsoft.public.windowsxp.general)
  • Re: Can not boot to SAFE MODE, STOP ERROR
    ... Microsoft Certified Professional ... | Invalid system memory was referenced. ... | Timestamp: unavailable ...
    (microsoft.public.win2000.general)