Attack Technique that Utilizes the Differences Between the Extraction Methods of Each Compressor (Prompting Use of WinRAR)

On March 23, ASEC analysis team has found that abnormal malicious archive files have been distributed via email. The attachment in the e-mail is ZIP extension, but it prompts the user to extract it by a specific decompressor using a message “Use Winrar.”

Figure 1. Malware distributed in a form of an archive file

Distributing archived malware via email is a known method. As shown in the highlighted text (Use Winrar) in Figure 1, this email prompts the user to decompress the file using ‘WinRAR.’ 2 samples distributed that way have been found, and the filenames are as below: 


This blog will use “” file as a sample for further explanation.

If the user uses WinRAR compressor to extract the archive file as the attacker intended, a malicious executable (.exe) is extracted. 

However, upon extracting the file with compressors commonly used in Korea such as bandizip or 7-zip (latest) compressor, a normal *.jpg is extracted.

What makes extraction outcomes from identical archive file different? The straight answer to this is that the malicious zip file has an abnormal compression structure which is a combination of two archive files. The normal structure of a ZIP file will be briefly explained to provide an explanation for such an abnormal structure.

ZIP compression structure

The following are the terms that will be used to prevent the readers from being confused by the naming differences between aspects that are expressed with template feature of 010 editor and names of commonly known configurations. 

  • Record = Local File Header + File Data (Compressed)
  • DirEntry = Central Directory
  • EndLocator = End of Central Directory Record

Upon creating a normal ZIP file and expressing it in a format of ZIP, files are shown as the Figure 2.

Figure 2.  ZIP file with a normal structure

The number of Record and DirEntry is equal to the number of archive files in the normal ZIP archive format, and only one EndLocator exists. Hence, if 3 files are compressed, 3 Records, 3 DirEntries, and 1 EndLocator exist as shown in Figure 2.

When reading an internal file compressed in the form of a ZIP file, most of the compressor refers to ‘EndLocator’ structure first and foremost.

Figure 3. Structure of a ZIP file – EndLocator info

EndLocator is a structure that is on the bottommost part of Figure 3, and it contains info such as elEntriesInDirectory that can be used to figure out the number of compressed files, elDirectoryOffset that points toward the first of DirEntry form with Offset (red arrow), and elDirectorySize that can be used to see the total size of all DirEntries. It then refers to DirEntry and reads Record. As DirEntry contains info of each Record, data compressed in Record can be checked by performing repetition as much as the number of compressed data.

Figure 4. The overall structure of ZIP file format

2 Abnormal Aspects

There are two abnormal aspects in the malicious file previously mentioned in this document.

1)     The number of EndLocators

As shown in Figure 2, only 1 EndLocator exists in a structure of a normal ZIP archive file.

Figure 5.  Structure of a malicious sample ZIP file

However, as shown in Figure 5, the sample has 2 EndLocators, and the value of elEntriesInDirectory that represents the number of zipped files is ‘1’ instead of ‘2.’ Therefore, it can be assumed that the attacker archived *.jpg and *.exe each into ZIP files and combined the two.

2)     elDirectoryOffset value of EndLocator

Figure 6. Comparison of DirEntry value and elDirectoryOffset value of EndLocator

Normally, elDirectoryOffset value of ZIP archive file must contain offset of DirEntry. However, the sample contains Record[1] Size(0x7630) of *exe instead of DirEntry[1] offset (0xDC66) (See Figure 6). This is clearly an abnormal value, but it is speculated that this was due to the differences in ‘handling’ of damaged (or abnormal) zip structure between each compressor. That’s why a certain program extracts *.jpg which is the uppermost data, whereas other compressor like WinRAR extracts *.exe. Some compressors recognize the file as a damaged file, which results in creating a normal zip in order to make *.jpg and *.exe files readable.

The method is very simple: it compressed both the normal image and the malicious file, then combined them. It is assumed that this was done to bypass preemptive blocking of anti-malware software and other specific software.

To detect this malware with V3, go to ‘Settings > Scan Settings > Intense Scan > Scan Target’ and check the ‘compressed files.’

To prevent infection by malware such as the one shown in the sample, users must refrain from opening attachment files and links from an unknown source, and update OS security and Anti-Virus program to the latest version.

AhnLab’s V3 products detect the internal files under the following aliases: 

  • Trojan/Win32.Vbkrypt (2020.03.28.01)
0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments