A forum for reverse engineering, OS internals and malware analysis 

Forum for discussion about user-mode development.
 #4071  by kmd
 Tue Dec 21, 2010 2:47 am
hi
is the any generic method to solve subj problem?
i need to know if specified file is .net file

some PE header flags maybe?

thanks in advance
 #4073  by GamingMasteR
 Tue Dec 21, 2010 7:31 am
Hi,

1- Check if COM directory present and points to valid CLR header structure :
Parse NtHeader->OptionalHeader->DataDirectories[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR], if RVA != NULL then parse it's body and check if it's a valid IMAGE_COR20_HEADER.

2- Signature scan, just like what PEiD or any other PE Scanner do to determine if it is a DotNET file.