Virus:W32/Small.AJ infects Windows PE-files (Portable Executable) with .EXE extensions.
The virus skips folders starting with the letters "SYST". The purpose of this is in all likelihood to avoid infecting Windows system files in folders such as C:\Windows\System32.
Small.AJ appends itself to the last section of the infected host file. To ensure its execution, the virus patches the header of the file to have the address of entry point start the infected file's execution from the first instruction of the virus.
The virus changes the size of the last section as well as the total size of the executable image to match the slight increase in size. The characteristics of the last section are altered to make it writable.
To ensure each file is infected just once, an infection marker (_757) is added to an unused part in the file headers. Due to the way the virus checks the size of the last section of the host file, the virus in some cases ends up overwriting a part of the host file instead of appending to it.
The virus also preserves the last modification date of the infected files in an attempt to better hide the infection.
The actual file-infecting part of the virus body is executed as a separate thread to be run simultaneously with the host to prevent a long delay before the actual host file is executed. The virus does not stay memory resident, the malicious thread exits once it has traversed through logical drives and infected all as of yet uninfected files.
The total size of the virus is 1277 bytes, of which 733 are encrypted with a simple XOR-encryption using the same key for every infection.
The code of the virus indicates that its sole purpose is simply to spread itself. However, due to an oversight in the code there is often likely to be collateral damage when the virus overwrites part of a host file. Overwritten files have a slightly unorthodox file structure. Such overwritten files will usually fail to run.