A forum for reverse engineering, OS internals and malware analysis 

Forum for discussion about user-mode development.
 #4194  by wacked
 Thu Dec 30, 2010 12:04 pm
Well currently I'm trying to identify packers as generic as possible.
The file to test goes through several test and earns points on each. If a file gets a high enough number of points it is considered packed.
Currently I'll test
-The last section is executable (+ 10 Points)
-The first section is writeable (+ 10 Points)
-The raw size of the first section is 0 (+ 10 Points)
-Entrypoint in last section (This seems to unreliable. MSVC++ complied progs. have this and some packers keep it this way while e.g UPX changes it) (- 5 Points)
-Any section is write & executable (+ 15 points)
-Suspicious section names (".aspack", ".adata", ".Upack", ".petite", "UPX0", ".vmp", ".loader", "MEW") (+ 30 points) (ok that isn't very generic...)
-Double section names (example: http://img683.imageshack.us/img683/5233 ... mefail.png. Some packers try to "hide" their new sections by naming them like legitimate. Seems like there are AVs that check only if the EP is in a section named ".code" :shock: )
I plan to test
-No strings in data section (+ 15 points)
-Suspicious Imports (VirtualProtect, WriteProcessMemory, LoadLibrary, ...) (+ 5 points for each entry)
-Only LoadLibrary and GetProcAdress imported (+INFINTE points)
Do you got any suggestions how I could improve this? And maybe also link me to interesting packed files?
And to give a quick look at this project:
Image
(matrix.exe and getinstalledprogs.exe are unpacked)
 #4195  by EP_X0FF
 Thu Dec 30, 2010 12:17 pm
Hello,

I assume we are talking about exactly "packers" detection, not cryptors etc used by malware.

how about calculating entropy for sections? If section is packed it will have high entropy. As example you can take Process Explorer (it is highlighting packed images).

additionally you should check entry point, well as in fact you can determine several packers (UPX/PECompact) only by quick looking on ep code.

Regards.
 #4196  by wacked
 Thu Dec 30, 2010 12:53 pm
Well actually also crypters. I just used the word packers to distinguish it from the RunPE-kiddy-crypters.
But the entropy idea is good I'll look into it.
 #4212  by Meriadoc
 Fri Dec 31, 2010 8:14 am
Hi,
entropy
Also have a look at Mandiant Red Curtain. MRC can also list Sections, Imports, PE anomalies (modifications,) entry point signature, digital signature...calculating a 'threat score.'