TDL3 The Worst Best Rookit Ever
Occasionally, I do computer repair.
At one point it was my primary source of income after I quit a job where I wasn't valued as an employee. (I am sure we've all been there once.) In my many years of doing computer repairs, I occasionally would run into that one piece of malware that would throw a wrench in the spokes and just make me stop dead in my tracks. Whether it was in awe of innovation or frustration in removal, there have been those few moments where I just had to step back and re-evaluate my troubleshooting methodology, adjust my dropped jaw or walk away before I made smash smash like bam-bam. The last time I had a moment like that happened when I had my first rootkit run-in 2 to 3 years ago. If you don't know what a rootkit is ( are you living under a rock???) read here. It was after a few years elapsed from Greg Hoglund's NT based rootkit. It's cited as the first rootkit for NT systems but I believe otherwise as there is always someone who beat you to innovation- if you want to call it that. You know, kind of like how Alexander Graham Bell and Tesla were gamed on for credit by Thomas Edison for various inventions- but I digress. The community evolved over night and some of the more elitist computer repair community saw the rootkit as a mythical creature that just couldn't exist (whether by cognitive dissonance or otherwise) and went the route of the ostrich with it's head in the sand until it couldn't be ignored anymore.
Then it happened. An arrogrant Sony/BMG wrote some DRM software that caused quite a ruckus and shook things up while propelling the term "rootkit" into the media spotlight like so many Britney Spear's head shaving incidents: Sony included a rootkit on music cds as a means to combat piracy with much fail. The rootkit served to enable malware writers to cloak objects from windows with little effort and thus the class action lawsuits started rolling in like seaweed after a hurricane as a new era of malicious code got some traction.
Yesterday (♫ Virus removal was such an easy game to play ♫)
Yesterday (well this post has been drafted for a week or so- not quite yesterday anymore), I had the moment I spoke of above where I had to re-evaluate my methodology. I have seen some pretty ridiculous infections in my time but this one takes the cake as of December 14, 2010- the worst piece of malware I have ever had the displeasure of removing but credit for innovation. The customer dropped the PC off on a Friday. Generally, with my experience I can fix almost any issue inside of 20mins to an hour depending on the pc's specs and infection severity. Mostly, the issues I see are of the spyware/malware/trojan series and are easy to remedy. This include your occasional rootkit.
Troubleshooting
Generally when I am fixing computers I ask a line of questions to deduce how much the customer is computer savy, if they know enough to get themselves in trouble, then ask about the symptoms. Based on their responses you can usually make an educated guess of what you are dealing with and what tools you will be focusing on using to fix the pc. When I troubleshoot a system, the very first thing I do is boot the machine up and see how it behaves. Can I replicate the symptoms that the customer described? If I can then I am on the right track. If not, then perhaps the problem is intermittent, customer gave bad information, problem is different than as described or a combination of all of the above.
As a rule of thumb, I NEVER EVER, I really mean NEVER EVER using any removable writable media when working on a system. It is amateur, irresponsible and common place for many shoddy computer repairmen/repairwomen. Rather, I will burn CD's with my toolkit and the most up-to-date revisions. (Thanks be to scripting and wget.)
The troubleshooting work-flow is generally as follows (AND I DO MEAN VERY GENERAL):
- Boot machine normally. Observe. Replicate symptoms? Disable system restore.(If password protected backup SAM and remediate password in PE environment. restore when finished fixing machine)
- Google symptoms for known issues but don't waste time on anything but exact string matches. (works 20% of the time)
- Run combofix
- Boot machine from PE Environment / Hirens BootCD
- mount registry hive for OS
- Run autoruns to see what is on the startup, it's location, etc.
- Google suspicious entries
- Disable suspicious entries without false positive info.
- Disable all non-microsoft startup items.
- Scan machine for viruses/malware with third party utilities
- Boot machine in safe mode with networking.
- run combofix again
- Run Autoruns - check startup entries, Process Explorer - check hooked dll's and Tcpview - currently active connections --- to monitor for strange activities.
- Restart normally.
- Run Autoruns, Process Explorer and Tcpview to monitor for strange activities. Look for removed startup entries back on startup.
- Cleanup pc, defrag and update all AV and Windows Updates after taking System Restore snapshot.
- Return to customer.
This generally succeeds in fixing 98% of the issues that I run into with computers. When I tried to run procexp.exe it would instantly terminate. Hmmm.
Now, if it had of ran, I would have see that the context switch delta on atapi.sys was awfully high because of TDL3 among other anomalies but I am getting ahead of myself. I thought I might have not double clicked it, so I click again twice and get an error that I don't have permissions to run this executable. Okay, probably a dirty malware dll that has an MD5 on my utility and is blocking it accordingly. I run HxD and hex edit a section of plain-text to alter the MD5 of the executable and rename it. Once again it appears to have started but quit. I attempt to run again and... can you guess the error message? Correct, I do not have permissions to run this executable.
For about 5 seconds I stopped and thought about what I might have missed.
I run cacls and change the permission on the utility to everyone. It runs once then the permission error occurs again.
From this I deduce that my phantom malware is observing what system dll's are getting called by the utility and terminating the utility based on those calls then changing permissions on the executable. This is getting to be a complete pain in the ass whereas I normally would have been home free and now it is apparent that I am dealing with something a little more "advanced" then my run of the mill malware.
It's time to change tactics.
Knowing that there is a low likely hood that I will be able to run some of my more advanced utilities, I try anyway. I theorize that some of this more advanced activity is related to a rootkit and I run GMER and Rootkit Unhooker.
And that is when I discover the name of the rootkit via google. TDL3. After removing the associated driver and restoring order in the operating system there is one last surprise waiting for me.
GRLDR is missing or cannot be found.
Wouldn't you know it, the rootkit create it's own MBR that then bootstraps the OS. Only, it's much more cooler and technical than that.
You can find a full dissection of TDL3 here.
To fix the last part of this rootkit you need to restore the MBR. Run fixboot and fixmbr and you'll be home free.
“Priority Domain Availability Notice”
Domain Scams
Domain scamming has been around since ICANN started and was a "legitimate business" for some time where squatters would do all kinds of stuff morally and ethically in question. For example, a business would lapse on their domain name registration and the squatter would register the lapsed domain name and hold the business at ransom.
So I got a funny email this morning and I thought I would share it.
Folks, if you own a similar domain to one listed in an email scam use the common sense to say "this is obviously a scam on some level". A quick google finds even the most basic information and tell tale signs such as the article here.
The lesson here is that if you think you're going to get screwed, don't bend over willing.
Arthur Simmon, InTrust Domain, 1206AM.com are scammy. Steer clear!
Layout 2.0
In the coming months I'll finally get around to skinning this blog appropriately and getting away from this template. I have a few projects in the pipe-line and I am slowly making progress on all of them. Between prototyping a pet project I will reveal in the future (have to register the company name and the product name) and working on the domain for my own personal website, I'll get it finished at some point. For now though, enjoy this antiquated, bland layout.
PHPIDS
Well, well.
It certainly has been a while since I've had any really meaningful posts. The truth is that I have been super busy working, studying or being lazy and playing Call of Duty: Black Ops. You know, 'Tango sucka!!"
At any rate, I've neglected to post on my blog for quite some time so I figured why not post about what I am working on currently.
Mein Kampf ("My Struggle" for the uninitiated)
I run a phpbb3 bulletin board system (not going to mention it here) and one of the struggles I deal with are the unknown hacks that malicious people in the darkest corners of the internet use to create un-approved users in the board db and post spam, steal email accounts to spam later or just be general jerks.
Actual screen shot from phpbb3 administration console. Note that the joined date is showing October 11th 2007, 12AM. Those users were created in the db on June 4th 2010 at 9:00pm. Very sneaky although amateur as user pruning would have removed these accounts next time it ran. The hack performed did not specify post counts and recent posts in the database and as a result user pruning takes a look and says "Who hasn't posted in X amount of days?" then prunes everyone who hasn't. (Prune means deletes the accounts or deactivates them depending on your forum's individual settings.)
The solution up to this point has been to ban APNIC, LAPNIC, RIPE via htaccess and constantly update revisions of phpbb3. Basically, a determination is made like this:
"Your not from the United States? No entry for you."
This reduced the spam issues I was having drastically in addition to not completely scaring me away from phpbb3 for insecurity. I also disabled new user requests since I personally know everyone on the board. This way it's invitation only no exceptions. My concern however is with the other fraction of ruffians hammering away from their computers in the United States or overseas kiddies proxying through US computers/botnets to do nefarious things. I see it everyday in my profession as I monitor intrusion attempts and attacks on networks.
I asked myself the other day if a guy who's profession is in the information security sector gets his WordPress hacked or his bulletin board system is defaced, does that make him bad at his job? Do others look down on him?
The truth is that, it happens. I've been fairly lucky thus far but the inevitability is that compromises can and will occur. The answer depends on whether or not there are known good backups, layered security and adherence to policy. What I mean by adherence to policy: no weak passwords, password cycling, log checking, etc.
For everything else, there is phpids.
Enter PHPIDS
PHPIDS acts as a filter over input that will do regular expressions and treating on that input then flag suspicious tags, keywords, etc and take action according to your configuration. Using php.ini and pre-append you can setup phpids pretty quickly. The project has good support through the forums and a pretty loyal following of the most hardcore security guru's to average Joe.
Initially, false positives were a problem, but that was easily remedied by utilizing the white listing function adding the post and pm message fields.
This is a really great tool for the developers out there who have security concerns and would like to do something about them. Even with the "proper" sanitization of user supplied input, your adding of an additional layer of security that will keep you aware of one-off's and steady attacks as well as the newest attacks that might circumvent the common methodology.
Repairing A Flat Iron ( Thermal Fuse Fun! )
My fiance mentioned this morning that her imitation "Chi" was borked' after less then a year of use.
For those of you who aren't in the know ( aka male ), the Chi is a highly regarded flat-iron that many women claim are known to be reliable.
Where's that scientific data when you need it eh?
When I bought the generic flat iron for my fiance, I did so because I couldn't justify the expense of a CHI. ( It just figures that I drive a Honda S2000 ). Anyways, I was able to repair the flat iron and I have detailed how to perform the repair below.
WARNING / DISCLAIMER: If you don't know what a soldering gun is or better yet don't have one, steer clear of performing this repair. Bottom line is I am not responsible what-so-ever for your actions. By continuing beyond this point you agree to the above terms.
Great, so I see you agree. Let's get to it.
The problem at hand with most flat irons "breaking" is that once the thermal fuse goes (ie. Excessive heat from being left on all day / overnight / etc), the circuit is open, the ceramic plates will not heat and you will have a broken flat iron.
Tools:
Wire Crimps or a Soldering Iron & Electrical Solder
Phillips screwdriver
Thermal Cutoff Fuse (depends on Iron. See details below)
Volt Meter
Troubleshooting
To begin, we need to confirm that the issue is the thermal cutoff fuse. The thermal cutoff fuse is a little electrical component fuse that will open the circuit when a certain temperature is exceeded.
This is what it looks like:
Taking apart the imitation CHI is fairly simple and straight forward. As you get it apart you'll find that the ceramic plate has a plastic backing that slips on and in the space between the thermal fuse is housed. In the picture below, you can see the thermal fuse inside a protective (plastic??) housing with thermal paste pressed against the back plate. In the picture below, I have taken of the plastic backing and exposed the thermal fuse.
To test the fuse, I set my volt meter for continuity and tested the thermal fuse. As you can see below, no continuity.
From here you need to identify what the flat irons thermal fuse specifications are by reading the part number and googling it. In my case, the thermal fuse was available at the local Radio Shack.
I soldered it it and was good to go. My thermal fuse was SEFUSE SF226E rated for 227°C, 10A and 250V~.
IMPORTANT!!!
My soldering gun is battery powered and is just below what the fuse is rated however I would recommend using crimps instead as an extremely hot soldering iron will destroy the fuse before your wife / girlfriend / mother get's a chance to use it.
UPDATE: Over at JoeDotCom.Com there is a great write up on fixing a switch of a flat iron.
Tell me what you think?









