Virus.BAT.Batalia6

Class Virus
Platform BAT
Description

Technical Details

It is the harmless nonmemory resident polymorphic parasitic BAT virus. It searches for BAT files in the current directory, then infects them. While infecting a file the virus runs the ARJ archiver to pack the necessary files. If there are no ARJ.EXE file in PATH, the virus fails to replicate itself.

The infected batch file contains two parts of code and data. The first part (the header) contains five DOS commands, the second part (the rest) contains a random named BAT file that is compressed by using the ARJ archiver and a password. Thus the infected file contains the text strings (DOS commands) and the binary data (ARJ archive).

That BAT file also contains two parts: the main virus code (batch commands) and the compressed data. The compressed data contains several files: the host file, the virus data and code files. The infected files look as ARJ archive within ARJ archive:

+--------------------+
�BAT instructions    � - Header 1, startup virus code
�--------------------�
�  ARJ archive:      � - Random named BAT file packed with ARJ
� +----------------+ �
� �BAT instructions� � - Header 2, main virus code
� �----------------� �
� �  ARJ archive:  � � - The set of files
� � +------------+ � �
� � �BATALIA6.BAT� � � - Infection, polymorphic and random generator
� � �            � � �   routines
� � �hostfile.BAT� � � - The original host file
� � �ZAGL        � � � - Virus data file
� � �RULZ        � � � - Virus data file
� � �FINAL.BAT   � � � - Deletes the temporary files and subdirectory
� � +------------+ � �
� +----------------+ �
+--------------------+

Header 1 contains five commands that are selected from several variants and have different lengths, for example:

@echo off
rem arj e %0 %compec% -g5
C:COMMAND.COM nul /carj x %0 -g2
:nul arj x %0 -g7 C:COMMAND.COM
w HOST.BAT

@EcHo OfF
rem COMMAND.COM nul /carj x %0 -g1
%comspec% nul /c arj e HOST.BAT -g3
:echo C:COMMAND.COM nul /carj x %0
i HOST.BAT

The ARJ archive is encrypted with a random selected password, so the virus does not contain constant bytes, and as a result it is the first known polymorphic BAT virus.

When executed, the virus (header 1) runs ARJ archiver, extracts the second part (BAT file) and executes it. The code of the second part creates the temporary directory, extracts the files from the second archive to the temporary directory, then runs the searching, infecting and polymorphic routines, then executes the host file and deletes the temporary files and temporary directory.

The code of the virus contains the following text strings:

: Death Virii Crew  &  Stealth Group World Wide
:            P R E S E N T S
:       First Mutation Engine for BAT !
:              Without ASM !
:      [BATalia6] & FMEB (c) by Reminder

:              //         __                  _
: +--------  /// ------+ ___     Magazine     _    for VirMakers
: �+++-++- // // -+-+++� ___ ________________ _ ___________________ _ ________
: �++ � � /////  � � ���  __ ___ ___ ___ ___ ___ ___ ___    � _ ___ _ ___ ___
: �++ - +  ///// ++- ++�   _ _ _ __  __  _    _  __  _ _    _ _ _ _ _ _   _
: +------ // // -------+   _ _ _ _   ___ ___  _  ___ ___     __ ___ _ ___ ____
: GROUP  // // WORLDWIDE   _ _________________ _______________________________
:
: Box 10, Kiev   252148
: Box 15, Moscow 125080
: Box 11, Lutsk  263020
:
:               R E A D    I N F E C T E D    V O I C E
:
:                                             (c) by Reminder (May 22, 1996)