Originally Posted by Kurapica
I used to do some tests to get the smallest "do something" .NET Assembly, I managed to reduce it to 3 KB only, I don't know if it can be stripped more.
anyway I recommend using MPRess packer for .NET files to reduce the size.
You can strip it down to 1536 bytes (don't know how to attach the file here), by removing the win32 resources, the .rsrc section and .reloc section. The only bad thing about the .NEt PELoader is that you cannot change a FileSectionAlignment for a .NET file (which is set to 200)... which makes it hard to go below this limit (in the 1536 bytes, there is still the old import text for CorExeMain that I cannot removed, because the section is already 400h bytes, It could be theoretically shrinked to 300h bytes, but the FileSectionAlignment doesn't allow it!
Also, I did already test MPress and the exe was able to compress from 65Ko to around 31Ko, better than NETZ or sixxpack, but still, from my test, we can go as low as 20Ko, which is a significant improvement here (of course, at the cost of decompressing time, which could be around 800ms, but for demomaking, that's not an issue)
Originally Posted by Kao
Any chance to see a sample packed file?
Sure, when all things will be settled, I'll wrote a post about this.
Indeed for SSCLI2.0, but It has stills lots of things inside that are still accurate, so... It was probably easier for me to look at this sourcecode than to go through the tedious IDAPro way!