Mail Archives: djgpp/2000/03/15/10:43:35
On Wed, 15 Mar 2000, nimrod a. abing wrote:
> I was just curious about this. If the code
> segment is not writable, it seems to imply some
> sort of immunity to viruses for DJGPP programs.
The viruses don't attach themselves to the protected-mode code produced
by DJGPP, they attach themselves to the short DOS stub prepended to DJGPP
programs. And since the COFF header follows that short stub, the virus
has good chances overwriting the COFF magic signature, which will cause
the startup code refuse to run the infected program.
So the fact that CS is write-protected has no importance here.
> With so many viruses spreading around, does
> this mean that DJGPP programs are safer from
> viruses?
The above-mentioned features do allow an early detection of an
infection. But more importantly, the viruses have all but abandoned DOS
programs as their target. They now concentrate on Windows programs, so
any DOS program is probably more safe.
- Raw text -