Dropping over old archives
A view on the past , LZH , ARC/PAK , ZOO , CRC16


Intro

Long time ago when zip rar & arj weren't too much used, there were some more known archives because they imposed themseves on the amiga or the atari scene. Those formats are totally forgotten now , but I found it interesting to study them in the Archive infector series , so Enjoy!

The CRC16

What's the CRC16 , the same thing than the CRC32 but smaller and using a 512 bytes table zone , see its code

When you have done that you done the CRC calculation, the scheme is the same than in CRC_16 file , so si = offset of start CRC calc & cx = number of thoz

The ARC format

NB: Arc are know as ARC/PAK extension , this two means the same thing NB II: (I give a big thanks to Raymond Clay from whom I take his ARC description here )

ARC Infection

Erm , a precision first , there's a little packet at the end of the ARC file you must preserve , some ARC file have it , other not , two are good but you can't drop over a file who have a last packet ,then you must detect the last packet , at all arc/pak file , it was at the end-12 of the file , then you can easily save it somewhere ( those I have seen )

        1ø Go to the end-256
        2ø Read 256 and scan for dead packet
        3ø Save dead packet and write header at this offset
        4ø Write the header
        5ø Write virus
        6ø Close the file

The LZH format

NB (I give a big thanks to Raymond Clay from whom I take his LZH description here )

LZH infection

NB: There's some crappy code at the end of the virus , I don't know what's that and in some archives it doesn't exist , anyway I wrote something to detect it then no problemo

Go to the end , drop an header , drop the virus , and it's finished!

The ZOO format

NB (I give a big thanks to Raymond Clay from whom I take his ZOO description here )

There are two parts, the first 20 bytes of the file are crappy code , good to put a a virus mark etc etc , zoo is a well good locked archive because offset goes header by header , but don't panick for our virus , the last header point to a kinda death packet, we just have to find it and rewrite the header and the virus

ZOO infection

Go to the end , search the death packet , build & drop an header , drop the virus , and it's finish!

Here's those code , any suggestion is welcome