Masaw wrote on 2024-05-23, 15:14:
There is no such antivirus that will detect all "known" DOS viruses.
There would exist a simple antivirus algorithm that will detect all file and boot sector tampering viruses on a vintage DOS system.
1. Install the antivirus software to a pristine DOS installation that you know to be good. (e.g. new formatted system)
2. On the first boot of the system, store a mirror copy or a hash of the boot sector.
3. On subsequent boots, if the mirror/hash differs from the actual boot sector, report that a modification has occurred.
4. Hook into DOS mechanism that starts up .EXE and .COM files.
5. Whenever a new .EXE or a .COM file is launched, record its hash and its path.
6. Whenever an existing .EXE or a .COM file is launched that already has a hash for that path, compare the hash. If it differs, then report that a modification has occurred.
That is, the good old Microsoft Anti-Virus CHKLIST.MS algorithm.
However, CHKLIST.MS files became weaker since viruses knew to attack MSAV and those files. (the cat and mouse problem)
But now since DOS viruses are obsolete, a novel CHKLIST.MS style anti-virus approach would work just fine, and track all viruses that are based on infecting files or boot sectors.