A companion virus is a complicated computer virus that stores itself in a file.This is a virus that can infect your files without changing a single byte in the infected file. The other viruses, spawning virus, and cluster virus are similar in nature where they also don’t change the bytes of infected files. Companion viruses mostly need human intervention to further infect a computer. This virus falls into three types of viruses. Resident virus, file infector virus and Direct action virus. The first known companion virus was the Globe virus, which was first detected in 1992.

How Companion Virus works

This is a type of computer virus that compromises a feature of DOS/Windows that enables software with the same name, but different extensions, to operate with different priorities.
Let me explain
The companion virus works by seeking all files with extensions ending in.EXE.  It then creates a matching file that ends in the.COM extension, which is specifically reserved for the malicious code. When the computer executes program.exe, the virus runs program.com before the program.exe is executed, thus spreading the infection in the computer, unknown to the user. The virus will infect the computer or perform malicious steps such as deleting the files on your computer hard drive.
 

How to detect companion virus

This type of virus is fairly easy to detect by the presence of the extra .COM files. Sometimes the virus attempts to hide the extra files by either placing them into a different directory (but one on the PATH) or gives them a hidden attribute so a normal DIR command will not show them.  When the virus is active in memory it can effectively hide the.COM files as well (but, unlike many viruses, a companion infector need not remain in memory to do its work).
 
The companion virus is an old type of virus that was more prominent during the MS-DOS era. It is propagated mostly through human intervention
Companion viruses are relatively easy to find and eliminate if you have a good integrity map of what should be on your disk.
Some examples of companion viruses include Terrax.1069, Stator, and Asimov.1539.