First (proof-of-concept) .NET virus
Juergen Kreileder writes "Symantec
says they've received W32.Donut, the first .NET virus: 'This virus targets EXE files that were created for the Microsoft .NET framework. W32.Donut is a concept virus. It does not have any significant chance to become wide spread. However it shows that virus writers are paying close attention to the new .NET architecture and attempting to learn how to exploit it before the Framework will be available on most systems.'"
Here's the writeup from Symantec:
.NET framework.
.NET files do not have any platform
.NET MISL (intermediate language) gets
.NET framework is installed.
.NET application executes native
.NET
.NET executables by attacking the
.reloc section with itself and nullifies the
.EXE
.NET file structure which will not be the
.NET framework
.NET
.NET.dotNET by Benny/29A
.NET header pointer in the data directory
.NET file whenever
.exe
.NET architecture and attempt
On the 9th of January a set of AV companies have
received a new virus from its author. The virus
was named "dotNET" by its creator but we decided to
add detection of it as W32.Donut instead.
The virus targets EXE files that were created for
the Microsoft
Normally
dependent code, but a small 5 byte stub. This stub
executes the mscoree.dll _CorExeMain() function and
thus the
control if the
Thus currently a
code before it will execute the platform
independent code. According to Microsoft this
native code will be removed and the operating
system itself will recognize and execute
images.
The virus infects
5 byte jump to the _CorExeMain() function. It
replaces this jump, with another one to point into
the last section of the executable, it overwrites
its
relocation directory.
Thus when an infected file is executed the virus
code will get control as a 386 application. The
virus checks the platform and only infects on
Windows 2000 and above. If so it will attempt to
infect all files in the current directory with
extension and in up to 20 directories above it. It
must be noted that there are many assumptions made
about the
case with most executables. Nonetheless many C#
complied files would have similar structure. The
virus author worked with the Beta 2
and thus checks files for the new header signature
"BSJB". The virus would therefore ignore the
Beta 1 file format. The virus will inject itself
into the file by using regular virus techniques to
get access to the API addresses it needs to
call. Most API's are referenced in the code as
CRCs. It must be noted that the virus also modifies
the checksum field of PE header's to make the image
look valid. Donut also injects a small MSIL code
and metadata into the infected file. These will
execute the payload of the virus and display the
following message box with a 1:10 chance.
This cell has been infected by dotNET virus!
Infected files will look like regular
applications. The virus will first drop a file with
a fixed
as well as the jump to the _CorExeMain() function
so the application can run as a
the Framework is installed. In this case the MSIL
code of the virus will get control and display the
above message box. When the host application
returns the virus create yet another copy of the
file and in this case the original MSIL code will
be executed and the file will run normal. During
this process the virus creates a temporary file
with the name of the host executable and a
space. For example,
runme.exe
will have temporary file
runme
W32.Donut is a concept virus. It does not have any
significant chance to become wide spread. However
it shows that virus writers are paying close
attention to the new
to learn it before the Framework will be available
on most systems.
Cantankerous old coot since 1957.
Here, here.