Rugrat is the first known virus that targets the 64-bit Windows
platform. The size of the virus suggests that it was hand-written
in IA64 assembly.
Rugrat uses the Thread Local Storage feature of Windows executables
to gain execution. It adds a TLS entry to the executable which
contains a callback pointer to the virus code. This has the unusual
side effect that often the virus will run only after the host has
exited, which is exactly opposite to the way parasitic infectors are
normally activated.
The virus code is a minimal direct-action infector routine. It first
imports a number of Windows API functions using checksums.
From NTDLL.DLL:
LdrGetDllHandle
RtlAddVectoredExceptionHandler
RtlRemoveVectoredExceptionHandler
which are used to install a Vectored Exception Handler to catch all
exceptions during the infection process.
From KERNEL32.DLL the usual functions are imported:
CloseHandle
CreateFileMappingA
CreateFileW
FindClose
FindFirstFileW
FindNextFileW
GetFullPathNameW
GetTickCount
GlobalAlloc
GlobalFree
LoadLibraryA
MapViewOfFile
SetCurrentDirectoryW
SetFileAttributesW
SetFileTime
UnmapViewOfFile