How to compress .sys files?

Hello,
do you know any tool/util which would compress my .sys driver?
e.g. UPX doesn’t support native PE files

thanks,
J.

Why do you want to compress your driver?

Have a nice day
GV


Gianluca Varenni, Windows DDK MVP

CACE Technologies
http://www.cacetech.com
----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Tuesday, November 20, 2007 2:49 PM
Subject: [ntdev] How to compress .sys files?

> Hello,
> do you know any tool/util which would compress my .sys driver?
> e.g. UPX doesn’t support native PE files
>
> thanks,
> J.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

xxxxx@hotmail.com wrote:

Hello,
do you know any tool/util which would compress my .sys driver?
e.g. UPX doesn’t support native PE files

What’s the point? How big is your driver?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Since my driver has about 400kb and it takes so long than it’s copied to virtual machine (virtual serial cable). Imagine you do that x-times per hour. Virtual machine doesnt support firewire and i don’t want to use 2nd computer. I was just curious if there was a tool/util which would compress my .sys driver. I know it’s not too practical for release version.

Thanks,
J.

I don’t know, try zip? If that doesn’t work, it’s unlikely your .sys
file will be very compressible.

OTOH, I’m not sure you’ll save any time compressing it, copying it over,
and decompressing it on the other side… probably by hand unless your
virtual machine has cross-VM scripting support.

xxxxx@hotmail.com wrote:

Since my driver has about 400kb and it takes so long than it’s copied to virtual machine (virtual serial cable). Imagine you do that x-times per hour. Virtual machine doesnt support firewire and i don’t want to use 2nd computer. I was just curious if there was a tool/util which would compress my .sys driver. I know it’s not too practical for release version.

Thanks,
J.


Ray
(If you want to reply to me off list, please remove “spamblock.” from my
email address)

Do you mean with on the fly decompression, so you can use .kdfiles with
your compressed driver and have it load and run without intervention?
If so, I don’t know of anything that will do this. If not, I don’t
understand your question.

mm

xxxxx@hotmail.com wrote:

Since my driver has about 400kb and it takes so long than it’s copied to virtual machine (virtual serial cable). Imagine you do that x-times per hour. Virtual machine doesnt support firewire and i don’t want to use 2nd computer. I was just curious if there was a tool/util which would compress my .sys driver. I know it’s not too practical for release version.

Thanks,
J.

Having experienced the speed of .kdfiles over serial, I was curious, and
I played around with some compiler and linker settings to see how the
size of a large WDK sample (I used fastfat.sys) could be reduced without
losing debugging information and without getting FPO involved so that it
doesn’t make debugging suck. Basically what I found is that while there
are many things that result in small decreases - changing section
alignment, -OPT:REF, -OPT:ICF, et. c. among others - adding
‘USER_C_FLAGS=-O1’ to sources and building it under AMD64-CHECKED
resulted in close to 50% reduction in its size, taking it from around
397,000 down to around 257,000. A CHECKED build on x86 produced similar
results.

If you’re interested in this, please keep a couple things in mind. The
first is that I did not test the driver at all, other than to make sure
that it will load. Also, I only took the most superficial of looks to
see whether the symbols were at least not garbage, as does happen some
times with FPO optimization. The last is that I do not normally use
BUILD, so I had to sort of guess to find ‘USER_C_FLAGS,’ and I assume
that I am doing no harm by using it.

Good luck,

mm

Martin O’Brien wrote:

Do you mean with on the fly decompression, so you can use .kdfiles with
your compressed driver and have it load and run without intervention? If
so, I don’t know of anything that will do this. If not, I don’t
understand your question.

mm

xxxxx@hotmail.com wrote:
> Since my driver has about 400kb and it takes so long than it’s copied
> to virtual machine (virtual serial cable). Imagine you do that x-times
> per hour. Virtual machine doesnt support firewire and i don’t want to
> use 2nd computer. I was just curious if there was a tool/util which
> would compress my .sys driver. I know it’s not too practical for
> release version.
>
> Thanks,
> J.

Thanks, good to know.

I wanted to compress .sys file, then .kdfiles would transfer it to virtual machine (serial cable) - and then, like all PE packers, would decompress itself in DriverEntry routine. Section alignment is set to 64 bytes. I just wanted to know if there’s a native PE packer; if not, it’s ok.

> Since my driver has about 400kb and it takes so long than it’s copied to
virtual

machine (virtual serial cable).

Use SMB instead.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com