Prevent Online Threats

MTZ.Pink.508

Details
MTZ.Pink.5081

This is a memory resident parasitic stealth polymorphic virus. On installation it checks DOS version and does not install itself if DOS is not 5.0 or higher. It is necessary because the virus uses high memory on installing. Then the virus checks the system memory for already installed virus copy by “Are you here?” INT 21h call with AX=3056h, BX=4D54h, CX=5A21h, DX=3933h (”MTZ!0V93″). The memory resident virus returns 4F4Bh (”OK”) in AX register.
While allocating a block of the system memory the virus uses new (DOS 5.0 and higher) INT 21h functions. It allows the virus to install itself in Upper Memory Blocks if there is enough of free space. In another case or if there is not upper memory in use, the viruses install themselves to the top of conventional memory by ordinary manner.
The installation is continued by INT 21h tracing routine. This is quite complex routine that uses new tricks which never were used in other viruses. That routine is described below.
Then the virus hooks INT 21h and INT 13h vectors and returns control to host program. INT 21h is used for file infection and stealth, INT 13h are used for stealth only.
On DOS call Open File Handle the virus checks the file and disinfects the file if it is infected. This is stealth algorithm and it causes impossibility of detection of infected files without disinfection of system memory.
On DOS calls Execute (AH=4B00h) or Close File Handle (AH=3Dh) the virus calls infection routine. This routine checks the file name with extension and does not infect the files with the names TB*.EXE, SC*.EXE, F-*.EXE, VS*.EXE, CL*.EXE, CP*.EXE (TBAV, SCAN, F_PROT, VSHIELD and VSTOP, CLEAN, CPAV). The virus infects the files with .EXE extensions only. Then the virus calls the polymorphic routine and writes the decryptor and encrypted virus body at the file end.
While installing its TSR copy the virus searches for original address of INT 21h handler. That handler (together with other DOS interrupt handlers) is placed in DOS code and data area. To calculate INT 21h handler address the virus uses quite interesting tricks. As the beginning it gets segment address of DOS area by undocumented function of INT 2Fh, then it gets the segment address of the first memory block occupied by some program (usually that block contains system drivers are described in CONFIG.SYS file). That block follows the DOS area. So the virus “knows” the segment address of DOS system area and its length.
Then the virus allocates block of XMS memory, copies whole DOS code and data into this block, hooks INT 6 (Undefined Opcode), fills (erase!) DOS area by FFh byte and call INT 21h with function Get DOS Version.
The system should halt after such manipulations because any call to system functions should be passed to area that is erased by FFh bytes. Moreover, there are not assembler instruction that consists of bytes FFh,FFh. On execution of such code i286+ chips generate INT 6 (Undefined Opcode interrupt).
The virus uses that feature of Intel processor and hooks INT 6 call to intercept the moment of execution of bytes FFh,FFh. The virus stores the address from where INT 6 call that was performed, restores DOS data and code (moves it back from XMS buffer) and free XMS block.
And which address was intercepted by the virus on INT 6? It is exactly address of original INT 21h handler. On INT 21h call the control is passed from instruction to instruction, from one memory resident program to another one up to moment when control is passed to DOS area. And there is FFFFh code in erased DOS area which causes INT 06h and stops execution of sequence of instructions.
Of course, that method is too complex to be the reliable one, but it works. This is the question, how it will work in multitasking mode, under MS-Windows or new xx-DOS versions, but it works without problems under single MS-DOS 5.0 and 6.0.
The virus contains three stealth routines, the first one is called on DOS Find First and Find Next calls (the virus substitutes the length of file), the second routine is called on file opening (the virus disinfects the file). These routines hide the infected files on access via standard DOS calls.
But there are several antiviral scanner that scan the disks via low level functions - by INT 13h (Absolute Disk Read). The virus uses third stealth routine here. It checks the address of the sector is read via INT 13h and if number of this sector is equal to number of first sector of infected file the virus terminates that call. That stealth routine returns error code (Data CRC Error) instead of reading the beginning of the infected file.
This virus contains the text strings:
- The Pink Panther 2 (*The Last One*) - (c) MTZ ‘1 Jan 1994′ Italy
Dedicated to Federica!
[MTZ 1994]
On December, 31th the virus displays this text.

Related Posts

  • MTZ.Pink.451
  • I-Worm.Mapson
  • Leave a Reply


    Spyware Removal Spyware Protection Tools