[C#]Create a Checksum from a Running Process?

04/21/2011 11:17 |NeoX#1
IŽd like to know how i can create a checksum from a RUNNING Process, like every AV does to check if the file is valid.

Cant find anything about that on the internet...
04/22/2011 21:21 bloodx#2
Hmmm.... scan for a Signatur/Fingerprint....
04/23/2011 07:21 Gertos#3
Create a MD5 Checksum for the memory of your own process.

Take a closer look on the API function VirtualQueryEx().
It gives you more Infos about all the diffrent memory blocks.
e.g. Is a block in use or free; contais it executabele code; is it readable , ....

But you should remember that all your variables are also inside of the memory.
Also is the .Net Framework active in the background that is doing a lot thing.
(compiling your code/ Garbage Collector / ... )

Maybe also leagl programm modify your process as well ( Antivirus / personal Firewall / ... )
04/23/2011 12:42 mgX#4
Or you could just check what executable the process is running from, and do an md5 on the exe, which is incredibly easy to do.
04/23/2011 17:31 |NeoX#5
Thanks for your support, got it working :)