Exchange of experience - about the virus in the game Last Battle. How to write a virus.

Adventurer #06
              B & R Y C Li



     Discussed in this article goes on progpammah VIRUS and 
VIRUS II, but about the present computer viruses, well, 
straight as to iBM PC!


     It was long thought that in the TR-DOS viruses can not be 
(which, in Basically, right). Rather, generally believed that 
viruses - it is destiny PC. And now there was information that 
the game LAST BATTLE there is a virus! " Checking the 
information, I discovered that. 

     In fact, viruses in TR-DOS is not quite
correct, these viruses of all kinds
on SPECCY can be arranged only in the
systems iS-DOS and CP / M (not sewn in
ROM). Except for the model SCORPION,
ATM, PENTAGON 512K + "shadow RAM" instead of
PZUshki printer, then in the TR-DOS

You can write only file viruses,
run before the execution of an infected program. Resident 
viruses in a standard SPECCY impossible. 

     Due to the nature and SPECCY TRDOS (ie, run only 
BASIC-files) contamination of code blocks is unrealistic and 
possibly infecting BASIC-only files. Technology infection is 
simple: 1) is sought BASIC file;

2) to scan for viruses and if
it is not already there, then a blank space on
disk is stored the body of the virus in the file header changes 
the length and initial Track / sector file and stored in the 
body virus, the normal length and the track / sector.

Then, in the first line of BASIC is entered
transition to a launch of the virus. Oposlya changed 
information is written to disk, and returns control to the 
program from is caused by a virus.


     Disadvantages of such a virus is obvious.
These include changes in length
BASIC-file (in sectors), the inability to

infect programs on another drive (on the
systems with a single drive) and inability to infect other 
programs, if no hard drive space or data on disk is shown that 
there is no free space. Also, If you implement a virus on the 
above scheme, it is copying to another drive will not work. At 
Last Battle virus works on several other

scheme, although very similar. Once launched, the virus, he 
primarily looks for boot and tries to infect it, and only

then makes his case further, ie,
BASIC-looking files. When looking for is
check the file length in sectors and if
length is large enough, then the transmission is
Occurs (that's the answer to those who wrote
except for "bottle" has some game in
monoloaderah). In carrying out not
scrutiny, it was determined that
size in 18 sectors and is large enough that the program has 
acquired immunity. If the file is suitable in size, it

checked for infection (in the verification

involve only three bytes) and if not infected, then the fun 
begins. The first line of bend varies with the fact

to ensure the launch of the virus, the virus body is generated, 
connects to infects programs into a block equal to the length 
BASIC'a sectors + 8, and writes it the case for free space. 
After this is corrected directory of the drive and all

repeated again, until then, until the directory is reached. In 
theory the virus of the "bottle" is capable of infecting once

all BASIC-files on the disk.

     As you can see the virus in general, simple,
but even in the form as it is now, he can
bring trouble. To cite one example of life: come to us from 
Flash'ey CDs sistemkami, and found that several (maybe at the 
beginning of one) are infected with "drunken genie" (my name 
for this virus / I think it sounds'). Although he with them 
does not show, RAY, having sad experiences with the "drunken 
genie", decided to produce a course of treatment. Those ogy was 
simple: start the BASIC, slowing down it, and if you get what

We expect to see, then ship our BASIC in
blank disc. That's all treatments. Who does not
able to disinfect itself, bring
(Send) us, we can help.

     To summarize: Viruses on the Spectrum
there. Known for a virus written
HACKER SQUAD ("Drunk genie"). Distinguishing features: an 
increase in length by 8 (in sectors), infection with only short

BASIC-files, increasing the load time
an infected program. First appeared
in the game "Last Battle". Editorial Board
invites everyone to vyskazatsya
about viruses on the page ADVENTURER'a.

ADV: By the way, we have a packed and
obezvirusennaya (in, skazanul!) version
LAST BATTLE. If anyone should ...



               (C) SHRSOFT