Home
%3CLINGO-SUB%20id%3D%22lingo-sub-724007%22%20slang%3D%22en-US%22%3EThe%20Case%20of%20the%20Unusable%20System%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-724007%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TechNet%20on%20Mar%2013%2C%202011%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThis%20post%20continues%20in%20the%20malware%20hunting%20theme%20of%20the%20%3CA%20href%3D%22http%3A%2F%2Fblogs.technet.com%2Fb%2Fmarkrussinovich%2Farchive%2F2011%2F03%2F08%2F3392087.aspx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20last%20couple%20of%20posts%20%3C%2FA%3E%20as%20%3CA%20href%3D%22http%3A%2F%2Fwww.zerodaythebook.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Zero%20Day%20%3C%2FA%3E%20availability%20draws%20near%20(it%E2%80%99s%20available%20tomorrow!).%20It%20began%20when%20a%20friend%20of%20mine%20at%20Microsoft%20told%20me%20that%20a%20neighbor%20of%20hers%20had%20a%20laptop%20that%20malware%20had%20rendered%20unusable%20and%20asked%20if%20as%20a%20favor%20I%E2%80%99d%20be%20willing%20to%20take%20a%20look.%20Her%20friend%20was%20desperate%20because%20she%20had%20important%20files%2C%20including%20documents%20and%20pictures%2C%20on%20the%20laptop%20and%20had%20no%20backup.%3C%2FP%3E%0A%20%20%3CP%3EUnlike%20most%20people%20in%20the%20computer%20industry%20that%20view%20the%20requests%20of%20friends%20and%20family%20for%20troubleshooting%20help%20as%20a%20burden%20to%20be%20avoided%2C%20I%20embrace%20the%20challenge.%20When%20fixing%20a%20system%20or%20application%20problem%2C%20it%E2%80%99s%20me%20against%20the%20computer%20and%20success%20is%20satisfying%20and%20always%20a%20learning%20experience.%20But%20that%20success%20also%20has%20an%20academic%20feel.%20With%20malware%2C%20it%20becomes%20personal%2C%20pitting%20me%20against%20the%20minds%20of%20criminal%20hackers.%20Defeating%20malware%20is%20a%20victory%20of%20good%20over%20evil.%20I%20should%20print%20a%20t-shirt%20that%20says%20%E2%80%9CYes%2C%20I%20will%20fix%20your%20computer!%E2%80%9D.%20I%20immediately%20agreed%20and%20we%20made%20arrangements%20to%20get%20the%20laptop%20dropped%20off%20at%20my%20office.%3C%2FP%3E%0A%20%20%3CP%3EWhen%20I%20had%20a%20few%20free%20minutes%20the%20next%20day%20I%20powered%20on%20the%20laptop%2C%20logged%20in%2C%20and%20within%20seconds%20was%20greeted%20with%20a%20torrent%20of%20warning%20dialogs%20announcing%20that%20the%20computer%20was%20infested%20with%20malware%20and%20that%20it%20was%20under%20attack%20from%20the%20Internet%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22360%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F5165.image_5F00_thumb.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121296i7641C68519D6CC75%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22550%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20also%20saw%20a%20barrage%20of%20warnings%20that%20various%20applications%20had%20been%20stopped%20from%20launching%20because%20they%20were%20infected%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22131%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F4101.image_5F00_thumb_5F00_1.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121297iD9016A927EC2AEC3%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22385%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20hadn%E2%80%99t%20seen%20scareware%20this%20aggressive.%20After%20a%20minute%20the%20appearance%20of%20new%20warnings%20ceased%20and%20I%20began%20my%20investigation.%20Starting%20with%20the%20insertion%20of%20a%20USB%20key%20containing%20the%20Sysinternals%20tools%2C%20I%20tried%20launching%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2Fbb896653%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Process%20Explorer%20%3C%2FA%3E%20.%20However%2C%20I%20found%20that%20trying%20to%20run%20anything%20-%20whether%20part%20of%20Windows%20or%20third-party%20-%20resulted%20not%20in%20the%20execution%20of%20the%20application%2C%20but%20in%20the%20display%20of%20the%20same%20%E2%80%9CSecurity%20Warning%E2%80%9D%20dialog%20reporting%20that%20the%20application%20was%20infected.%20This%20system%20was%20truly%20unusable.%3C%2FP%3E%0A%20%20%3CP%3EThe%20infected%20account%20was%20the%20only%20one%20configured%2C%20so%20that%20ruled%20out%20trying%20to%20clean%20from%20a%20different%20account%20in%20the%20hope%20that%20it%20might%20not%20be%20infected.%20I%20was%20afraid%20that%20cleaning%20the%20malware%20might%20require%20off-line%20access%20to%20the%20system%20via%20a%20boot%20CD%20installed%20with%20the%20%3CA%20href%3D%22http%3A%2F%2Fwww.microsoft.com%2Fwindows%2Fenterprise%2Fproducts%2Fmdop%2Fdart.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Microsoft%20Diagnostic%20and%20Repair%20Toolset%20%3C%2FA%3E%20(the%20Microsoft%20product%20that%E2%80%99s%20the%20descendent%20of%20%3CA%20href%3D%22http%3A%2F%2Fwww.techrepublic.com%2Farticle%2Fwinternals-softwares-erd-commander-2005-simplifies-system-repair%2F6094245%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20ERD%20Commander%20%3C%2FA%3E%20%2C%20the%20product%20I%20created%20at%20%3CA%20href%3D%22http%3A%2F%2Fwww.microsoft.com%2Fpresspass%2Fpress%2F2006%2Fjul06%2F07-18winternalspr.mspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Winternals%20Software%20%3C%2FA%3E%20).%20My%20MSDaRT%20CD%20was%20at%20home%20and%20I%E2%80%99d%20have%20to%20burn%20a%20new%20one.%20But%20I%20had%20noticed%20when%20I%20logged%20on%20that%20it%20was%205-10%20seconds%20before%20the%20first%20popups%20started%20appearing.%20If%20the%20malware%20didn%E2%80%99t%20block%20running%20applications%20during%20that%20time%20window%2C%20either%20because%20it%20was%20initializing%20or%20just%20letting%20the%20first%20few%20logon%20applications%20run%20so%20that%20the%20Explorer%20could%20fully%20start%2C%20I%20might%20be%20able%20to%20sneak%20Process%20Explorer%20and%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2Fbb963902%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Autoruns%20%3C%2FA%3E%20in%20before%20the%20lock%20down.%20That%20would%20save%20me%20the%20time%20and%20trouble%20of%20burning%20a%20CD.%20It%20was%20worth%20a%20try.%3C%2FP%3E%0A%20%20%3CP%3EBefore%20logging%20off%2C%20I%20copied%20Process%20Explorer%20and%20Autoruns%20to%20the%20desktop%20for%20easy%20access.%20I%20logged%20on%20and%20double-clicked%20the%20icons%20in%20quick%20succession.%20There%20was%20a%20short%20pause%20and%20then%20both%20applications%20appeared.%20It%20had%20worked!%20I%20had%20to%20wait%20for%20the%20avalanche%20of%20warning%20dialogs%20to%20stop%20and%20then%20turned%20my%20attention%20to%20Process%20Explorer.%20Sure%20enough%2C%20one%20process%20stood%20out%2C%20hgobsysguard.exe%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%2275%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F4505.image_5F00_thumb_5F00_2.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121298i2530A319E0EB4D68%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22554%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20explain%20the%20common%20characteristics%20of%20malware%20in%20my%20%3CA%20href%3D%22http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Fsysinternals%2FVideo%2Fgg618529%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Advanced%20Malware%20Cleaning%20%3C%2FA%3E%20presentation%20and%20this%20sample%20had%20all%20the%20telltale%20signs%3A%3C%2FP%3E%0A%20%20%3CUL%3E%0A%20%20%20%3CLI%3E%3CSTRONG%3ERandom%20or%20unusual%20name%3A%20%3C%2FSTRONG%3E%20hgobsysguard.exe%20seems%20like%20it%20might%20be%20legitimate%2C%20but%20I%20had%20never%20seen%20or%20heard%20of%20it%20and%20the%20name%20revealed%20nothing%20of%20its%20purpose%20or%20origin%3C%2FLI%3E%0A%20%20%20%3CLI%3E%3CSTRONG%3ENo%20company%20name%20or%20description%3A%20%3C%2FSTRONG%3E%20legitimate%20software%20almost%20always%20includes%20a%20company%20name%20and%20description%20in%20the%20version%20resource%20of%20their%20executables.%20Malware%20often%20omits%20this%20since%20most%20users%20never%20run%20tools%20that%20show%20this%20information.%3C%2FLI%3E%0A%20%20%20%3CLI%3E%3CSTRONG%3EInstalled%20somewhere%20other%20than%20the%20%5CProgram%20Files%20directory%3A%20%3C%2FSTRONG%3E%20you%20should%20add%20software%20not%20installed%20in%20the%20%5CProgram%20Files%20directory%20to%20the%20list%20of%20suspects%20for%20closer%20inspection.%20In%20this%20case%20the%20executable%20was%20installed%20in%20the%20user%E2%80%99s%20profile%2C%20another%20sign%20of%20malware.%3C%2FLI%3E%0A%20%20%20%3CLI%3E%3CSTRONG%3EEncrypted%20or%20compressed%3A%20%3C%2FSTRONG%3E%20In%20order%20to%20avoid%20detection%20by%20antivirus%20and%20make%20analysis%20more%20difficult%2C%20malware%20authors%20often%20encrypt%20their%20executables.%20Process%20Explorer%20uses%20heuristics%20to%20try%20to%20identity%20encrypted%20executables%2C%20which%20it%20refers%20to%20as%20%E2%80%9Cpacked%E2%80%9D%2C%20and%20it%20highlights%20them%20in%20purple%20like%20it%20did%20for%20this%20one.%3C%2FLI%3E%0A%20%20%3C%2FUL%3E%0A%20%20%3CP%3EI%20carefully%20studied%20the%20other%20running%20executables%2C%20including%20the%20services%20running%20within%20the%20various%20Svchost.exe%20hosting%20processes%2C%20but%20I%20didn%E2%80%99t%20see%20anything%20else%20that%20looked%20suspicious.%20Sometimes%20malware%20employs%20the%20%E2%80%9Cbuddy%20system%E2%80%9D%2C%20where%20it%20uses%20two%20processes%2C%20each%20watching%20the%20other%20so%20that%20if%20either%20terminates%2C%20the%20other%20restarts%20it%2C%20making%20it%20virtually%20impossible%20to%20terminate%20them.%20When%20I%20see%20that%20I%20use%20Process%20Explorer%E2%80%99s%20suspend%20feature%20to%20put%20both%20to%20sleep%20and%20then%20kill%20them%20(which%20is%20also%20arguably%20more%20humane).%20Here%20all%20I%20had%20was%20one%20malicious%20process%2C%20so%20I%20just%20terminated%20it.%20It%20didn%E2%80%99t%20reappear%2C%20which%20was%20a%20good%20sign%20that%20there%20wasn%E2%80%99t%20a%20buddy%20lurking%20within%20another%20process%20as%20a%20DLL.%20I%20then%20navigated%20to%20the%20malware%E2%80%99s%20install%20directory%20and%20deleted%20its%20files.%3C%2FP%3E%0A%20%20%3CP%3EWith%20the%20process%20and%20executables%20out%20of%20the%20way%2C%20the%20next%20step%20was%20to%20determine%20how%20the%20malware%20activated%20and%20delete%20its%20autostart%20entries.%20I%20switched%20to%20Autoruns%2C%20which%20had%20finished%20its%20scan%20in%20the%20meantime%2C%20and%20spotted%20two%20entries%20pointing%20at%20the%20malware%E2%80%99s%20executable.%20Both%20entries%20had%20names%20that%20appeared%20to%20have%20been%20randomly%20generated%2C%20consistent%20with%20typical%20malware%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22203%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fcfs-file.ashx%2F__key%2FCommunityServer-Blogs-Components-WeblogFiles%2F00-00-00-52-36-metablogapi%2F6747.image_5F00_thumb_5F00_5.png%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121299i51901ADC9D6E3089%22%20style%3D%22border-right-width%3A%200px%3B%20display%3A%20inline%3B%20border-top-width%3A%200px%3B%20border-bottom-width%3A%200px%3B%20border-left-width%3A%200px%22%20title%3D%22image%22%20width%3D%22554%22%20%2F%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20deleted%20the%20entries%2C%20studied%20the%20rest%20in%20case%20there%20was%20some%20other%20component%20that%20wasn%E2%80%99t%20so%20obvious%2C%20and%20did%20some%20standard%20crapware%20cleanup%20while%20I%20was%20there.%20I%20rebooted%20the%20system%20and%20logged%20back%20on%20to%20confirm%20it%20was%20clean.%20This%20time%20there%20were%20no%20popups%2C%20I%20was%20able%20to%20run%20software%20as%20normal%2C%20and%20neither%20Process%20Explorer%20nor%20Autoruns%20showed%20any%20sign%20of%20more%20infection.%20I%20had%20spent%20a%20total%20of%20five%20minutes%20and%20had%20some%20fun%20outwitting%20the%20malware%20to%20avoid%20offline%20cleaning.%20Case%20closed.%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-724007%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TechNet%20on%20Mar%2013%2C%202011%20This%20post%20continues%20in%20the%20malware%20hunting%20theme%20of%20the%20last%20couple%20of%20posts%20as%20Zero%20Day%20availability%20draws%20near%20(it%E2%80%99s%20available%20tomorrow!).%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-724007%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMark%20Russinovich%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on TechNet on Mar 13, 2011

This post continues in the malware hunting theme of the last couple of posts as Zero Day availability draws near (it’s available tomorrow!). It began when a friend of mine at Microsoft told me that a neighbor of hers had a laptop that malware had rendered unusable and asked if as a favor I’d be willing to take a look. Her friend was desperate because she had important files, including documents and pictures, on the laptop and had no backup.

Unlike most people in the computer industry that view the requests of friends and family for troubleshooting help as a burden to be avoided, I embrace the challenge. When fixing a system or application problem, it’s me against the computer and success is satisfying and always a learning experience. But that success also has an academic feel. With malware, it becomes personal, pitting me against the minds of criminal hackers. Defeating malware is a victory of good over evil. I should print a t-shirt that says “Yes, I will fix your computer!”. I immediately agreed and we made arrangements to get the laptop dropped off at my office.

When I had a few free minutes the next day I powered on the laptop, logged in, and within seconds was greeted with a torrent of warning dialogs announcing that the computer was infested with malware and that it was under attack from the Internet:

image

I also saw a barrage of warnings that various applications had been stopped from launching because they were infected:

image

I hadn’t seen scareware this aggressive. After a minute the appearance of new warnings ceased and I began my investigation. Starting with the insertion of a USB key containing the Sysinternals tools, I tried launching Process Explorer . However, I found that trying to run anything - whether part of Windows or third-party - resulted not in the execution of the application, but in the display of the same “Security Warning” dialog reporting that the application was infected. This system was truly unusable.

The infected account was the only one configured, so that ruled out trying to clean from a different account in the hope that it might not be infected. I was afraid that cleaning the malware might require off-line access to the system via a boot CD installed with the Microsoft Diagnostic and Repair Toolset (the Microsoft product that’s the descendent of ERD Commander , the product I created at Winternals Software ). My MSDaRT CD was at home and I’d have to burn a new one. But I had noticed when I logged on that it was 5-10 seconds before the first popups started appearing. If the malware didn’t block running applications during that time window, either because it was initializing or just letting the first few logon applications run so that the Explorer could fully start, I might be able to sneak Process Explorer and Autoruns in before the lock down. That would save me the time and trouble of burning a CD. It was worth a try.

Before logging off, I copied Process Explorer and Autoruns to the desktop for easy access. I logged on and double-clicked the icons in quick succession. There was a short pause and then both applications appeared. It had worked! I had to wait for the avalanche of warning dialogs to stop and then turned my attention to Process Explorer. Sure enough, one process stood out, hgobsysguard.exe:

image

I explain the common characteristics of malware in my Advanced Malware Cleaning presentation and this sample had all the telltale signs:

  • Random or unusual name: hgobsysguard.exe seems like it might be legitimate, but I had never seen or heard of it and the name revealed nothing of its purpose or origin
  • No company name or description: legitimate software almost always includes a company name and description in the version resource of their executables. Malware often omits this since most users never run tools that show this information.
  • Installed somewhere other than the \Program Files directory: you should add software not installed in the \Program Files directory to the list of suspects for closer inspection. In this case the executable was installed in the user’s profile, another sign of malware.
  • Encrypted or compressed: In order to avoid detection by antivirus and make analysis more difficult, malware authors often encrypt their executables. Process Explorer uses heuristics to try to identity encrypted executables, which it refers to as “packed”, and it highlights them in purple like it did for this one.

I carefully studied the other running executables, including the services running within the various Svchost.exe hosting processes, but I didn’t see anything else that looked suspicious. Sometimes malware employs the “buddy system”, where it uses two processes, each watching the other so that if either terminates, the other restarts it, making it virtually impossible to terminate them. When I see that I use Process Explorer’s suspend feature to put both to sleep and then kill them (which is also arguably more humane). Here all I had was one malicious process, so I just terminated it. It didn’t reappear, which was a good sign that there wasn’t a buddy lurking within another process as a DLL. I then navigated to the malware’s install directory and deleted its files.

With the process and executables out of the way, the next step was to determine how the malware activated and delete its autostart entries. I switched to Autoruns, which had finished its scan in the meantime, and spotted two entries pointing at the malware’s executable. Both entries had names that appeared to have been randomly generated, consistent with typical malware:

image

I deleted the entries, studied the rest in case there was some other component that wasn’t so obvious, and did some standard crapware cleanup while I was there. I rebooted the system and logged back on to confirm it was clean. This time there were no popups, I was able to run software as normal, and neither Process Explorer nor Autoruns showed any sign of more infection. I had spent a total of five minutes and had some fun outwitting the malware to avoid offline cleaning. Case closed.