home *** CD-ROM | disk | FTP | other *** search
- This is very detailed (although stopping short of a disassembly of course)
- description of ArchieVirus. It is strongly recommended reading, if only to
- give you a better understanding of how the virus operates.
-
- ArchieVirus technical information
- ---------------------------------
-
- This is a piece of ARM code that is appended to executables with the Absolute
- (&FF8) filetype. It is 920 (&398) bytes long and has a tell-tale 4-character
- string at the end of its code, "1210", which is used as an "already-infected"
- flag. The first instruction of the original executable is saved near the end
- of the virus code space and is replaced by a branch to the first instruction
- of the ArchieVirus code.
-
- Here's a complete run-down of what ArchieVirus does when first run:
-
- 1. Attempts to infect executables (Absolute filetype) with the filespecs "@.*"
- and "%.*". In other words, all executables in the current and library
- directory are attacked.
-
- 2. Uses OS_File 36 as a "semaphore" to see if it is lodged in RMA. If a call
- to OS_File 36 returns with an error, then it hasn't infected the RMA yet,
- so it proceeds to claim 920 bytes of RMA, copy itself into there and
- points a claim of the OS_File vector to its new RMA location.
- NOTE: A *RMTidy command effectively releases this OS_File claim and is
- an easy manual way of removing ArchieVirus from the RMA.
-
- 3. The time is checked to see if it is the 13th of the month. If so, the
- code loops indefinitely, displaying the 45-character message:
-
- Hehe...ArchieVirus strikes again...
-
- Since there is no linefeed present, this will fill the screen with a fast
- scrolling blur :-) Obviously, Shift-Ctrl will allow mere humans to read it.
- Interestingly, this is the only place that the virus name, ArchieVirus,
- is found and this is tricky to spot because it is EORed with &64.
-
- 4. Assuming it wasn't the 13th of the month (and NO, it doesn't check for a
- Friday !), then the original first instruction of the executable is replaced
- and the original normal code continues from &8000 onwards.
-
- The OS_File vector claim is quite important, because this serves two purposes:
-
- a. It allows OS_File 36 to return without an error, signalling that the RMA
- is already infected.
-
- b. It checks for OS_Files 0 and 10 (Save memory to file), 11 (create empty
- file) and 12,14,16 and 255 (Load file). If any of these are encountered
- then an infection attack is activated (see step 1 above).
-
- ArchieVirus Decrement Count
- ---------------------------
-
- Yet again, this is a virus that has a strange way of keeping track of infect-
- ions. A count is DECREMENTED after a successful infection, which is strange
- indeed. It's as if the author was considering a "limiter" in the code (when
- count = 0, don't infect anymore), but decided not to include one at the last
- minute. Of course, it could just be a warped mind - only the author knows the
- original value of the count, so a simple subtraction will give ONLY HIM the
- number of infections. By the way, the copy of ArchieVirus I have has its
- decrement count at 1 in case you're interested. VKiller will displayed this
- Decrement Count when the ArchieVirus is detected.
-
- Possibly serious problems with ArchieVirus
- ------------------------------------------
-
- The version of ArchieVirus I was given has a constant &A718 at offset &20
- from the start of the ArchieVirus code. This constant is *supposed* to
- indicate the start address of the ArchieVirus code + 12. However, this
- constant NEVER changes and the code incorrectly uses it for a copy reference
- point when duplicating itself into RMA. Hence, any calls to OS_File once this
- faulty ArchieVirus code is installed will cause an "Address exception" or
- "Undefined instruction" error depending on what rubbish has been copied into
- the RMA.
-
- Ironically, I have patched one instruction in my own personal copy of Archie-
- Virus to use a relative address and the code is now stable and no longer
- crashes :-) I have done this because I suspect the original author of Archie-
- Virus may have spotted the bug and patched the code in a similar way to me.
-
- As is very typical with many viruses, the ArchieVirus code does very little
- file error checking and frequently reports "Not open for update" if the file
- is locked or the disk is write-protected whilst attempting an infection.
-
- ArchieVirus Innoculation
- ------------------------
-
- The 4 character ASCII string "1210" at the end of the executable is checked
- for existence by ArchieVirus to decide if it has infected the executable yet.
-
- It is therefore easy to innoculate against ArchieVirus in two steps:
- 1) Replace the first instruction of the original executable with the copy
- held in the virus code area and
- 2) Remove the 920 bytes of virus code and replace it with the 8 character
- string "Hypo1210" (this was the string originally used by Hugo Fiennes'
- "Hypothermic" innoculator so I've decided to stick with his convention).
-
- Hence, the executable will shrink back in size to only 8 bytes longer than
- its original length and will have been innoculated too.
-