Subscribe to Windows IT Pro
June 09, 2004 12:00 AM

My Trojan War Becomes a Quagmire

Windows IT Pro
InstantDoc ID #42944
Rating: (1)

For the past 2 weeks, I've been discussing my first major electronic Trojan horse attack, which appears to have lodged some sort of self-replicating code in a Windows XP Service Pack 2 (SP2)-based laptop. After describing the attack in detail last week ( http://www.winnetmag.com/article/articleid/42845/42845.html ), I received an astonishing 200+ email messages from readers, all chock-full of advice about how I might combat the Trojan. Words can't begin to express my thanks for the level and quality of these responses. I've said it before, and it's still as true as ever: Windows & .NET Magazine UPDATE readers are an incredible lot, and thanks so much for all the help.

So I spent the better part of last week going through the tips and advice one email message at a time, trying to figure out how to wipe out the Trojan without wiping out the system, a tactic I refer to sarcastically as "nuking it from space," an allusion to the 1986 sci-fi movie classic "Aliens." And frankly, I'd have wiped the partition out a week ago and started over, but I feel a certain obligation to see whether I can't fix the machine--for two reasons: Solving the problem might help others (and it's clear from all the email I've received that this sort of attack is a big concern); and Microsoft has gotten involved because it's readying the security-centric XP SP2 release, which doesn't offer a complete solution for this new type of threat (though, frankly, Windows Firewall could have prevented it from happening in the first place). I'm willing to help the company with a solution, I suppose, but it's difficult to remotely fix this sort of problem, and I'm not excited to pack up the machine and ship it to Redmond if it comes to that.

But sadly, I can't claim to have made much progress in the past week, although I've certainly tried just about everything. It's hard to explain how frustrating this problem has been, though I get the feeling many of you have experienced this same frustration, based on your email messages. What's interesting is that, though many people appear to have had similar attacks, none involved the same files, registry settings, or other attributes, suggesting that this attack is a bit more sophisticated than your standard Trojan attack.

There have been a few glimmers of hope. Eugene Curran recommended an excellent product--Tiny Software's Tiny Personal Firewall (TPF--http://www.tinysoftware.com)--that mitigates the problems the malicious software (malware) causes but doesn't remove the offending code: While TPF is running, the registry doesn't automatically spawn references to TV Media (tvm.exe) after I manually delete the references, and Microsoft Internet Explorer's (IE's) home page isn't hijacked by http://www.allaboutsearching.com, which are the two remaining symptoms at this time. But when I turn off or disable TPF, these symptoms return. TPF has given me a somewhat acceptable way to use the machine while I wait for a fix, but the offending launch code is still hiding somewhere on my machine, and it's wearing on me. (Tvm.exe doesn't exist, however, so the hidden launch code can't actually do anything.)

Here's why I think TPF works: The latest version of the firewall, TPF 5.5 build 1332, includes a unique new feature that, according to the company, "adds robust protection against all unknown spyware which based their existence on injecting malicious code into applications you normally trust." Also, TPF is a two-way firewall, compared with XP SP2's inbound-only Windows Firewall, so it prevents installed Trojans from doing any damage after the fact. This is a feature SP2's Windows Firewall sorely lacks.

Through various means, I've managed to eliminate parts of the attack's effects. The references to POLL EACH in the registry are gone and haven't returned. The inscrutable blehdefyreal toolbar in IE is also gone, although I wish that Microsoft had provided an automated way to remove such add-ons in XP SP2's new Manage Add-on tool for IE 6.0, which can only enable or disable (but not remove) IE add-ons. But the TV Media references (but not the tvm.exe application) and IE home-page hijacking, as previously mentioned, remain.

I don't understand why it's impossible to find the hidden process that's making changes to this system. With all the registry and process watchers I've tried and all the antispyware utilities I've run, it should be a fairly straightforward process to find the thing and rip it out. But I've had no luck at all.

Therefore, I'll need to postpone the conclusion to this sad little epic to yet another week: Some experts at Microsoft are investigating the problem, and I hope to have a more definitive conclusion and perhaps a step-by-step guide to fixing this sort of problem sometime soon. Again, thanks to everyone who wrote me: Your help is very much appreciated. I wish I had better news.

Users and Administrators
On a related note, several readers mentioned that they hoped I hadn't been running the laptop with an Administrator-level account. Sadly, on a nonmanaged XP machine today, it isn't realistic to run without Administrator privileges. Unlike UNIX and UNIX-like systems such as Linux and Apple Computer's Mac OS X, Windows isn't very useable with a non-Administrator account, largely because so many applications are ignorant of rights and were written to work only with Administrator-level accounts. This is particularly problematic in a home environment, in which XP Home Edition's crippled Limited Account type, designed for children and less-technical users, is virtually useless. The machines I use are all using XP Professional Edition, of course, but the net effect is the same: Unless and until Microsoft changes the way local user accounts work and gets application and driver writers to sign on board, it's not possible to take this obvious step toward securing an unmanaged Windows system unless you're willing to give up a lot of functionality.

By comparison, consider how simple tasks in Mac OS X work. Even if you log on with an Administrator account, some tasks, such as running Software Update Services (SUS) or installing applications, require you to provide your password again, interactively, when you run them. This approach is a simple yet effective way to ensure that you intend to perform an activity that will change configuration settings or potentially damage the system. In Windows, the lame Run As option, virtually hidden under a right-click menu that typical users will never know about, is a poor substitute. As with the lack of spyware tools and a true two-way firewall in XP SP2, this is an area in which Microsoft needs to invest in the future.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Apr 20, 2005

    WHAT DOES THIS HAVE TO DO WITH THE TROJAN WAR????????????????????

  • Wade Hoffarth
    8 years ago
    Jun 15, 2004

    The Trojan Wars - I have run into the same scenario as you have mentioned regarding your trojan horse which is certainly no longer a routine "run of the mill" attack. Fortunately, for me I browse for trouble on purpose on a non-linked machine on my network - but, like you, I use admin level user accounts as is typical so I can determine how destructive new attacks can be and how they affect higher level functioning machines. I've previously encountered other similiar attacks to yours and had been able to isolate a few of the running processes and had been madly figuring up new workarounds to permanent solutions but have also found that there have been obvious hidden processes running code under different names than the original offending code that was spotted using the various spyware and TH programs available. The problem sometimes is these trojans are often mutating names and properties of themselves prior to discovery or upon a scan initiation, and since such properties are discovered based on search, find and discovery methods I began to look at the triggers of such scans and how they can be manipulated to re-name and hide the original offending processes and files while allowing discovery of the old processes to lull the user into a sense of false security. The discovery process of getting to the files that are causing havoc often triggers an event that then changes the filename to another so it will allow for a recognition of the file by the scanner, and lull the user into the sense of having apparently eliminated the offender, only to have them find it re-loads again after windows re-launches. The first trojan I ever personally saw that did this was coreflood, which changed its name and identity signature upon discovery to a nonsense 8 letter and digit name that then used multiple random extensions and it re-loaded itself on startup in a different folder using standard names of files noone would normally look at as being anything but harmless. Until the next scan it sat idle and it would also insert arbitrary code intot he machine allowing for RAS laoding and use by a seperate system user who could hide thier account using superuser style method, and then destroyed its own tracks. It wasn't reported as doing this on most sites such as McAfee or Nortons sites, but it was documented as a mutating trojan and they offered inferior methods of discovery through scan methods which of course triggered the trojan to rename and re-hide itslef back into the system. the cure, reformat or hard find the files in the registry yourslef and eliminate them. Since many of these typoes of trojans place themselves into the windows\\system and system32 folders as well as other folders and does so apparently at random it is extremely difficult to comprehend the time this took to truly rid the system of this? My experience showed this particular strand one of my users had contracted would also often create a readme.txt file which sat resident as a type of logic bomb awaiting another discovery and eventual re-mutation from where it would read the code from this seemingly innocuous file (readme.txt) as needed and constinuosly reload itself into the system files. Your trojan appears to be simliar - though it is doing something slightly different - and I too have spotted the method in several new trojans that I've encountered in my googling and spidering. New strains seem to be able to detect and mutate itself as many trojans do when it is discovered, but they also seem to be doing so whenever a scan, search or find command gets run and in special note it happens whenevr the file is tagged for deletion by a spybot or ad-aware type program. The fact that these files hide their existence and processes is an obvious step up for the trojan developers who are getting more tactical about their injection methods and the multiple step sequence levels of mutations is getting a lot smarter about how to handle exceptions in discovery and re-coding methods. I have recently also noted that several new trojans are using system and even hidden superuser accounts that are being created for the purpose of allowing for remote manipulation. these surreptitiosly create new accounts allowing for remote files to inject themselves into browsers at times, and I've seen new forms of coding attacks that will modify the offending filenames when the search command or scan methods used by Spybot, Ad-Aware and others is used. If the find command is used in regedit it also appears to be creating new problems elsewhere allowing for the re-load to occur on re-boot even though the original file has been located and destroyed. The only combative measures I've found to be truly effective are carefully noting the sequence of changes as noted in the registry backups I create when I make mods or by following the notes I get whenevr I snapshot off new images or apps files for mock distribution. Recently I set up an environment to document these forms of attck by creating clean base images of my systems using Ghost, and then I began creating seperate apps packages which are Zen'd and from which I Snapshot all program installs seperately. The changes made to the registry document feeds line by line changes that are being made to the registry as well as all the program mods made and it does so in detail in the Zen process. Every app I load gets a snapshot file, and if a machine corrupts I can re-ghost it and then load out the apps on a server push which gives me a clean machine in a matter of minutes instead of days. But there have been some recent issues even with this as I have encountered which have shown that the new forms of trojans can actually transcend the imaging and snapshot installs. Until reading your column I thought I had been alone in my problem. I too searched Google and spidered many sites to try and find answers to these issues, to no avail. I began to realize that there was a mix of logic bombs and trojans that were being triggered by certain applications (namely IE being used as a specific trigger and the introduction of any spyware program to the system has had serious side affects) as well as the use of any registry find issued or use of windows search strings... among others. One particularly insidious program was loaded from a warez site which was supposedly Zone Alarm 5 and it actually infected the boot sector of my drive and modified the startup file to allow for the infection to keep recurring while allowing for apparent clean re-ghosting and snapshotting. Since the image was being loaded off a server share, it wasn't as apparent but since I moved to an absolute clean image I realize now the ghosted image was coming from a logic bomb infected machine that triggered on the search command use. It was indeed perplexing me how an apparent clean image, which had been loadsed succesfully 100's of times before could be dirty even after re-format. It was hidden all along though and there is no telling how long it would have taken to discover thi shad it not been for my obvious lack of concern or respect over the recent warez scandals of using internet based software copies without licensing? I have also now started seeing imaged machines re-create the problems realizing there has been a boot sector infection that has been propogating itself into the new images al along. Since it is part of my job (I consider) as a consultant to discover these processes and create fixes that I can apply to my clients machines I've been allowing myself to be infected by these attacks for some time now. I recently hit one that almost exactly emulated your situation when loading a game hack for my own son. It also loaded a hidden copy of Lycos sidesearch components, 1800search tool as well as programs named bridge, bargain buddy, abbeterinternet and a few others, one of which was tvm.exe. I was having major trouble ridding my machines of these. It eventually blocked all downloads of any spyware program at all and it nearly beat me out of my own box for a hard re-format and base software hand-loading session. But, I have managed to rid these infections by doing a hard look through the registry without scanning and noting all instances of changes as previously noted using the zen snapshotting process and then reading all code lines added without using any seek or find methods which I beleive were being used as triggers. Next up I imagine is a coding that willmake mods whenever a regedit is performed but I am not hopeful of seeing this anytime soon as thi slatest one almost put me down for the count. In combination with using safe mode re-boots - killing processes and undoing these changes by hand rather than doing searches or finds for the keywords it appears I have won out, but with consequences. Nearly all of these processes I've discovered were using system account privelages which could not be easily stopped and all were mutating and migrating across folder strucures to create seemingly harmless filenames such as the readme.txt scenario. I have also encountered hidden.dll files and a few others aptly named services.exe, optimize.exe. sbb.exe and a few others that had rooted themselves pretty firmly into my file structure. It has only been through sheer determination to beat these bastards and quite possibly through dumb luck too, but the files have finally stopped popping up ads and the processes have not returned in over a month now which is completely new and hopefully a good sign. Still, I have doubts? The only thing remaining is my inability to load any spyware programs post-fix. But to me this seems to be better than hard formatting my drive and losing all potential data prior to the logic bomb insertion which is only slightly documented since it is way after the fact...but I think this is a small price to pay given the fact I have my data which I can finally feel safe to load to backup and re-load on a clean new image. Since this latest fix has blocked 100% of the adware loads due to hard mods these file made to my basic setup and startup files I have found that a compromise is better than full on defeat, but maybe I'll be able to figure this out soon enough? After all, I still read your column and am hoping you will be the one to get the solve in from a reader or through your own sheer determination. Kudos on not giving up, it goes to show that the bad guys will never win out simply over sheer determination and numbers alone.

  • Jeremy Priest
    8 years ago
    Jun 11, 2004

    I quite agree. If you think back all the way to MSDOSShell, yes, I said, MSDOSShell, the basic look and overall functionality of Programs really has not changed. In fact if what I've bee told about is right, Microsoft code is so large for Windows that anybody trying to clean it or wanting to optimize it are at a loss for fear of breaking something.. :-| Of course that is a normal concern for any programmer but the base sourcecode for Windows needs to be rewritten not merged. Merging only can add more problems. But "that's life" (I don't know what the correct French spelling for it is so just think it's french :p) Yet so much is riding on Windows nowadays that I think they are afraid of changing too much to break everything. Sure the opensource community is a great help for good, reliable working (for the most part) applications, but for the most part each OS has it own problems. So take your pick and shod your armor. It's a war out here and there's no going back. (Sad as it may be)

  • Max Horkiins
    8 years ago
    Jun 11, 2004

    Two things I would definitely try: 1) Download SpyBot Search and Destroy........this is probably the most powerful spyware nuker out there. Do a Google on SpyBot and it will take you to the site. 2) I would download and run a program like "active ports" or some port monitoring software. You can see which ports are being used by every service, application, or trojan on your PC. Some programs like active ports also give you the name of the file being used to access certain ports. Very handy indeed if trying to find the culprit.

  • kjelle
    8 years ago
    Jun 10, 2004

    I have had similar problems with a couple of pc's but i've given up trying... its pretty darn scary close to the "Borg" creatures of StarTrek... "resistence is futile..."

    Anyhow, I have an idea, I guess U allready tried it but here it goes...

    On NT4 there was a practical utility to make snapshots of the registry... there has to be a similar tool around for XP. My guess is that this piece of spyware has added a string, somewhere in the registry, propably on the same line as an IE command... I don't know how it manages to place strings in the registry but its still my best guess, that when U start IE, it starts with a command to go to that hijacked url for starters...

    By comparing a "healthy" working installation (IE values & strings) with your infected comp, you should be able to make a "diff" and compare the diffrences. Hope it helps.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.