Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

undetectable rootkit infection


  • This topic is locked This topic is locked
4 replies to this topic

#1 summerloud

summerloud

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:10:44 AM

Posted 21 October 2011 - 08:35 AM

i got the laptop of a friend, which constantly copied autorun.inf and 4 shortcuts on usb drives when connected, so it was obviously infected by a virus. the virus seemed to be ramnit.a, with the text in the autorun.inf only being "rmn"

the weird thing was that i didnt see any suspicious processes running on the laptop. could this be my first encounter with rootkits? netstat showed ip connections being made to some russian ip 91.220.62.30), so there was definitely a trojan installed

i found a pretty obvious entry in hklm\...\winlogon\userinit, where it tried to run this program as well as userinit.exe: program files/microsoft/watermark.exe

it was of course impossible to remove the registry entry as it was continuisly re-written, but i just used reg.exe to write the correct information into the key and took away all write access for all users simultaneously, and on the third try, this worked - the userinit key only started userinit.exe and the virus couldnt change it any more

after a reboot i deleted the watermark.exe and created a dummy watermark.exe and also removed all writing privileges for all users on this file

this is where it started to get interesting. the main payload seemed to be destroyed, but at system startup there was now an error message because the fake watermark.exe that i created (an empty file) obviously could not be executed, but ntvdm.exe still tried to run this watermark.exe at system startup, and there were also still a ton of seemingly infected .exe files, that if you ran them would also try to start watermark.exe via ntvdm.exe

at this point i did many different things, tried out a ton of different spyware removal utilities and rootkit scanners, but they all only detected some infected files, but i never got to the heart of the matter - the rootkit

somewhere at this point the machine stopped working and i had to reboot, which only resulted in a BSOD both in regular and safe mode. i used an usb-bootable linux (tails) to boot and luckily found an only one-week old backup of the registry files, which i copied back over the new ones, and the system booted again (tbh i could hardly believe my luck, we are also sitting basically in the middle of the jungle without a windows 7 disk to run repair install, and this was the first time i could fix a BSOD in this manner...)

so the system was working again and i decided not to bleep with it any more. the virus was broken but the rootkit still installed and undetectable. not a good situation but the laptop (which is very important to my friend) was working at least. some processes would spawn ntvdm.exe windows that tried to run the fake watermark.exe, but i just reinstalled stuff as i went along, also norton power deleter deleted a lot of infected files (but not all, and also gave me no trace of the actual rootkit)

i tried some methods (filemon, regmon, etc) to find out what was starting ntvdm.exe but to no avail - the real thing has to be much deeper, and its actively hiding itself

then today things got even weirder - after firefox.exe crashed on the laptop completely (had to hardware reboot), the system again only came up with BSOD on normal and safe mode - this time it said smr210.sys was corrupted.

now comes the weirdest part, which made me freak out so much that i decided to post about it here: i booted again with the tails linux from the usb stick, i was able to fix the system again with copy back of the registry files, BUT: when i tried to touch the smr210.sys (in system32/drivers) I COULD NOT DELETE IT EVEN RUNNING LINUX FROM THE USB DRIVE. what the bleep is going on? when i tried to rename it it would only create copies of the file. how on earth can it prevent me from deleting this files when im running a different OS from a bootable USB drive? completely beats me.

this is the most sophisticated piece of malware ive ever seen in my life, and its become some kind of personal challenge for me to be able to kill it, any input would be appreciated, mainly i would like somebody to explain how it is possible to prevent the deletion of those files from linux? maybe it infected the keyboard or i/o drivers or mbr of the bootable usb drive as well? can it really be that sophisticated? or is it hardware based?

i think at this point that this has been pre-installed on the system or came through pirated applications sold here (im in cambodia, there is no copyright law here, pirated software is being sold openly everywhere)

is there such a thing as a completely undetectable rootkit? is there anything else i could do? is there an alternative explanation as to why i cannot access the smr210.sys even from linux? is it maybe using corrupted sectors on the hard drive? im really way out of my depth here...

thanks for any help

BC AdBot (Login to Remove)

 


#2 Elise

Elise

    Bleepin' Blonde


  • Malware Study Hall Admin
  • 60,933 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Romania
  • Local time:06:44 AM

Posted 21 October 2011 - 11:13 AM

Watermark.exe is part of a Ramnit infection, which is a file infector, not a rootkit.


Win32/Ramnit (and related variants) is a dangerous file infector with IRCBot functionality which infects .exe, and .HTML/HTM files, and opens a back door that compromises your computer. Using this backdoor, a remote attacker can access and instruct the infected computer to download and execute more malicious files. The infected .HTML or .HTM files may be detected as The infected .HTML or .HTM files may be detected as Virus:VBS/Ramnit.A or VBS/Generic. Win32/Ramnit.A!dll is a related file infector often seen with this infection. It too has IRCBot functionality which infects .exe, .dll and .HTML/HTM files and opens a back door that compromises your computer. This component is injected into the default web browser by Worm:Win32/Ramnit.A which is dropped by a Ramnit infected executable file.

-- Note: As with most malware infections, the threat name may be different depending on the anti-virus or anti-malware program which detected it. Each security vendor uses their own naming conventions to identify various types of malware.With this particular infection the safest solution and only sure way to remove it effectively is to reformat and reinstall the OS.

Why? The malware injects code in legitimate files similar to the Virut virus and in many cases the infected files (which could number in the thousands) cannot be disinfected properly by your anti-virus. When disinfection is attempted, the files often become corrupted and the system may become unstable or irreparable. The longer Ramnit.A remains on a computer, the more files it infects and corrupts so the degree of damage can vary.

Ramnit is commonly spread via a flash drive (usb, pen, thumb, jump) infection where it copies Worm:Win32/Ramnit.A with a random file name. The infection is often contracted by visiting remote, crack and keygen sites. These type of sites are infested with a smörgåsbord of malware and a major source of system infection.

In my opinion, Ramnit is not effectively disinfectable, so your best option is to perform a full reformat as there is no guarantee this infection can be completely removed. In most instances it may have caused so much damage to your system files that it cannot be completely cleaned or repaired. Security vendors that claim to be able to remove file infectors cannot guarantee that all traces of it will be removed as they may not find all the remnants. If something goes awry during the malware removal process there is always a risk the computer may become unstable or unbootable and you could loose access to all your data.

Further, your machine has likely been compromised by the backdoor Trojan and there is no way to be sure the computer can ever be trusted again. It is dangerous and incorrect to assume the computer is secure even if your anti-virus reports that the malware appears to have been removed.

Many experts in the security community believe that once infected with this type of malware, the best course of action is to wipe the drive clean, reformat and reinstall the OS. Please read:

Whenever a system has been compromised by a backdoor payload, it is impossible to know if or how much the backdoor has been used to affect your system...There are only a few ways to return a compromised system to a confident security configuration. These include:
• Reimaging the system
• Restoring the entire system using a full system backup from before the backdoor infection
• Reformatting and reinstalling the system

Backdoors and What They Mean to You

This is what security expert miekiemoes has to say: Virut and other File infectors - Throwing in the Towel?

If I guide someone with Virut (or any other File Infector) present and their Antivirus cannot properly disinfect it, then I recommend a format and reinstall...dealing with such infections is a waste of time and that's why I prefer the fastest and safest solution - which is a format and reinstall...After all, I think it would be irresponsible to let the malware "stew" (download/spread/run more malware) for another couple of days/weeks if you already know it's a lost case.

This is what Jesper M. Johansson at Microsoft TechNet has to say: Help: I Got Hacked. Now What Do I Do?.

The only way to clean a compromised system is to flatten and rebuild. That’s right. If you have a system that has been completely compromised, the only thing you can do is to flatten the system (reformat the system disk) and rebuild it from scratch (reinstall Windows and your applications).


regards, Elise


"Now faith is the substance of things hoped for, the evidence of things not seen."

 

Follow BleepingComputer on: Facebook | Twitter | Google+ | lockerdome

 

Malware analyst @ Emsisoft


#3 summerloud

summerloud
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:10:44 AM

Posted 22 October 2011 - 02:47 AM

what about the strange behavior of the smr210.sys? this is mainly what i was posting about since am curious what type of mechanism could cause this behavior. i cannot send the files because even when i boot from usb linux i cannot even copy them. are they just corrupted and im reading too much into this or is something still blocking access to these files?

#4 Elise

Elise

    Bleepin' Blonde


  • Malware Study Hall Admin
  • 60,933 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Romania
  • Local time:06:44 AM

Posted 22 October 2011 - 05:13 AM

No rootkit can do this; if the file could not be cleaned using a live CD, it means most likely the file system or disk structure has become corrupted. A disk check usually fixes this.

regards, Elise


"Now faith is the substance of things hoped for, the evidence of things not seen."

 

Follow BleepingComputer on: Facebook | Twitter | Google+ | lockerdome

 

Malware analyst @ Emsisoft


#5 Elise

Elise

    Bleepin' Blonde


  • Malware Study Hall Admin
  • 60,933 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Romania
  • Local time:06:44 AM

Posted 22 November 2011 - 06:55 AM

Due to the lack of feedback, this topic is now closed.In the event you still have problems, please send me or any Moderator a Private Message and ask them to reopen this topic within the next 5 days. Please include a link to your topic in the Private Message. Thank you.

regards, Elise


"Now faith is the substance of things hoped for, the evidence of things not seen."

 

Follow BleepingComputer on: Facebook | Twitter | Google+ | lockerdome

 

Malware analyst @ Emsisoft





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users