Dropping over Compression alternative format:
HA & ACE
By UnknowN MnemomaniaK [iKx]


Introduction to HA

Ha is an a bit old compression format , it was thought to work with compatibitility from linux to ibm dos , obviously it is not really used , I have never seen any HA but the archive exists, so I decided to code it into my infectors series in honor of the Zhengxi virus , then let's see how it works.

HA Format

The Ha structure is simple like rar structure but has a little difficulty, Ha archive is fragmented in two zones

 The little that has just :     db      'HA'            Ha mark
                                dw      0               number of archive

and following this part , there are a lot of archives that all must respect this header

Infection

The HA file infection is quite simple , you have to verify that the first 2 bytes are equal to HA , increment the word at offset 02h in the file by 1, read 0Dh bytes , go to the end write it , write No Pathname + Filename , write spec and close the file , damn , let's build an algorithm

        1ø Read 4 bytes
        2ø Verify the 2 first bytes , if <> HA then close file
        3ø Inc the word at offset 02h
        4ø Read 0Dh
        5ø Rebuild the CRC32 & the name , (-> rebuild header)
        6ø Go to the end 
        7ø Write the virus
        8ø Close the file

The Asm file are under the ACE infection, if you need code , don't hesitate

Introduction to ACE

ACE format is a quite new format that has basically the same structure than RAR , ACE is a serious archive build by an independent , some razor warez issue of razor are know under this file format . Ace compression/ decompression software is quite good looking and you have very soon the impression that you have to do with professional material.

ACE Format

I'll just detail the format of one header only becoz you just need to drop it and drop the virus to infect an archive

Ace structure is kinda secret because not too used and not reprogrammed by a lot of people like rar arj or zip , but by one individual person only

What's the CRC32x ? then it's basically the CRC32 who are applying a second not. It's because the programmer forgot to put that in his CRC routine

Infection

So , I consider that the best solution with ace files is to drop one header from an existing packet in the archive , then you go to the end, you rebuild the header , you calculate Header CRC , you drop the header and

        1ø Go to the end 
        2ø Rebuild the header
        3ø Write the header
        4ø Write the virus
        5ø Close tha file

But in the example, I have analysed the complex ACE header structure to get an existing one header as temporary , let's see how I did that if you are interested with that