How symstore calculates directory hash value

I am looking for a hash algorithm that uses symstore to create a directory name. I found this link Microsoft Symbol Server / Local Cache Hash Algorithm , which describes the data elements that are used to generate the hash, but it does not contain detailed information on how the value of the hash function is calculated. I am interested to see how symstore generates a hash directory, and if anyone has any sample code that they can show, that would be great!

+5
source share
2 answers

symstore.exe calculates hash directory names as follows:

For PDB files, use GUID + Age. Here is a python example:

pdb = pdbparse.parse("some.pdb")
pdb.STREAM_PDB.load()
guid = pdb.STREAM_PDB.GUID
guid_str = "%.8X%.4X%.4X%s" % (guid.Data1, guid.Data2, guid.Data3,
                               guid.Data4.encode("hex").upper())

symstore_hash = "%s%s" % (guid_str, pdb.STREAM_PDB.Age)

PE (exe/dll) TimeDateStamp ( IMAGE_FILE_HEADER) SizeOfImage ( IMAGE_OPTIONAL_HEADER). python:

pe = pefile.PE("some.exe")

symstore_hash = "%X%X" % (pe.FILE_HEADER.TimeDateStamp,
                          pe.OPTIONAL_HEADER.SizeOfImage)

python script, - symstore PDB PE:

https://gist.github.com/lennartblanco/9a70961a5aa66fe49df6

+5

, , , . , , , ( , 6, 7, 8). , .

+2

All Articles