Yeah, funny that they used this trick only now. The same stuff were working great for about 1.5 years.
Below is pseudo code from the mentioned in article TDL3 killer plugin.
Code: Select allTDL_cfg = wcsstr(v6, L"cfg.ini");
if ( TDL_cfg )
{
InitializeObjectAttributes(&attr, (LPWSTR)&TDL_path);
fnKillTDLFile(&attr);
wcscpy(TDL_cmd, L"cmd.dll");
InitializeObjectAttributes(&attr, (LPWSTR)&TDL_cmd);
fnKillTDLFile(&attr);
Code: Select allNTSTATUS NTAPI fnKillTDLFile(OBJECT_ATTRIBUTES *pattr)
{
NTSTATUS status;
HANDLE hObject;
IO_STATUS_BLOCK iost;
status = ZwCreateFile(&hObject, SYNCHRONIZE | FILE_WRITE_DATA | FILE_APPEND_DATA, pattr, &iost, 0, 0, 0, FILE_OVERWRITE_IF, FILE_SYNCHRONOUS_IO_NONALERT, 0, 0);
if ( NT_SUCCESS(status) )
{
ZwWriteFile(hObject, 0, 0, 0, &iost, fnKillTDLFile, PAGE_SIZE, 0, 0);
status = ZwClose(a1);
}
return status;
}
Killing performed by a special dll injected in the same processes, which were used by TDL3/4 cmd.dll.
It looks for TDL specific data in memory and analyzes it, then overwrite config, C&C dll, and finally doing hard reboot by using - NtRaiseHardError. After reboot - rootkit still active, but totally unworkable. TDL killing scheme is known since October 2009.