Kayaker
January 14th, 2009, 00:32
Hi
A couple of notes about this, one reassuring, the other not.
To start with, for reference the latest (last?) version of RKU is here:
http://www.rootkit.com/vault/DiabloNova/RkU3.8.342.554.rar
http://www.rootkit.com/blog.php?newsid=912
First, in case anyone sees some "funny" stuff in their system logs and gets worried and goes off chasing ghosts, as I did... when you select Scan from the Files tab of RKU, it creates a separate service. The filename will be a random 8 hexadecimal character name temporarily created as ../windows/system32/********.exe
The action will be logged by ZoneAlarm, or probably by any other process monitor you may have active. As well, the Windows System Event Log will record the events through the Service Control Manager (SCM). For example:
The 2F07D778 service was successfully sent a start control.
The 2F07D778 service entered the running state.
The 2F07D778 service entered the stopped state.
The 2F07D778 service was successfully sent a stop control.
If you are quick you can grab a copy of the file in the system32 directory before it deletes itself. If you are even quicker you can set a breakpoint on StartServiceCtrlDispatcherW and live trace the actions of the service. I see no problems with this file, in fact it's quite interesting to analyse.
I'm sorry, but I find no evidence of "backdoors" in RKU
I've read most of the garbage surrounding RKU from the last couple of years, and it's seems to be just that - the usual internet flame war garbage we've all seen before.
However, I do have one major concern about RKU at this point. I saw it mentioned in one Sysinternals forum thread that the RKU driver has changed from a randomly named one in recent versions to a constantly named one, i.e. karlchen.sys. If you read between the lines of the flames, this appears to be an inside joke and slap of the face at a certain moderator on that forum, ..whatever.
That's all fine and dandy, but it appears to me that this is a MAJOR vulnerability to the covertness of RKU against malware, primarily because loading of karlchen.sys can now be detected through a PsSetLoadImageNotifyRoutine callback.
I have my own app (which I'll release + source soon btw) for detecting, dumping and optionally preventing execution of drivers through such a callback routine. I've already determined that I can detect the RKU driver loading, suspend execution of the callback thread, and notify usermode of the fact. If I was a malware I would then have unlimited time to clean up any userland hooks or send an IOCTL to my driver to clean up kernelmode hooks.
Immediately after sending an event to resume execution of the callback thread (and continue loading of the RKU driver), as a test I modified my code to then remove my PsSetLoadImageNotifyRoutine callback and terminate my app. By the time RKU has started fully it should see no trace of me, and indeed no longer records the PsSetLoadImageNotifyRoutine in its list.
So, if I can be so bold to say, I would NOT fully put my faith in RKU that your system is clean, unless you FIRST determine independantly that you have no covert PsSetLoadImageNotifyRoutine callbacks running.
I don't know of any other app that lists these system callbacks (PsSetLoadImageNotifyRoutine, PsSetCreateProcessNotifyRoutine, PsSetCreateThreadNotifyRoutine) that you could use independantly. I've described how to manually find one of them, somewhere else on this board (I believe the
Ring 0 anti-debugger code in Daemon Tools thread), but I myself have never gotten around to coding an app to do that.
This kind of preventative measure (if a rootkit malware detects it might be being scanned it simply removes itself from active duty), has been talked about before of course so it's nothing new. Unfortunately, the fact that RKU now uses a "known" driver name has made it vulnerable to this action. So that is the point of my writing this cautionary warning.
Hopefully there is a good future for all this. If MS now owns the "VX" version of RKU, as it sounds, the innovations might be incorporated in a new/improved RootkitRevealer at some point. Then we can all rest easier knowing the only "backdoors" will come from MS itself.
Cheers,
Kayaker