Ask Leo! by Leo A. Notenboom

Svchost and Svchost.exe - Crashs, CPU maximization, viruses, exploits and more.

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows » Windows Components

Summary: Svchost (and Svchost.exe) is a required Windows component that often shows up in errors caused by viruses. Review Svchost, Svchost.exe, and how to stay safe.

Svchost and Svchost.exe - Crashes, CPU maximization, viruses, exploits and more.

I've discussed Svchost, aka Svchost.exe, in previous articles on Ask Leo!. Many people are witnessing a svchost.exe crash and it's actually quite amazing. Unfortunately, there's no single point of reference for svchost related problems. Rather than answering one single question, I'll try to cover a theme that can best be summed up as:

What's The Deal with SVCHOST?

Symptoms

Do any of these symptoms sound familiar?

  • Your system becomes sluggish and you find that something called svchost or dllhost is taking nearly 100% of your CPU.
  • Your system reports that svchost has performed an illegal operation and will be terminated. After that, various things fail to work properly, if at all.
  • After you log in, your system automatically reboots in one minute.

If so, then it's almost certain that you either have a virus or your system is currently vulnerable to a particular type of exploit known as the "RPC buffer overflow". We'll look at addressing both.

But just what is svchost?

Let me tell you what it is not: On Windows XP, 2000, and 2003, svchost is not a virus. On those systems, svchost is a required system component. If you happen to successfully delete it, your system will not run. You'll be much worse off than before. (Win95, 98, and Me users, see Note 1.)

Do not delete svchost.exe. Don't even think about it. [Important: do not confuse svchost, which we are discussing here, with scvhost, which has two letters transposed. They are not the same thing. The presence of scvhost may indicate a virus.]

Svchost, which is short for "service host", is a core part of the operating system that provides support to many of the required services that are Windows. You can see all the copies of svchost and what services they are running by typing "tasklist / svc" in a command window. If you don't have tasklist, or just prefer not to use the command shell, you can use SysInternals Process Explorer instead. (Check out my previous article "What is Tasklist.exe, and why don't I have it?" for details.) On my machine, one copy of svchost is responsible for 30 separate services, another is hosting 4, and the remaining 3 host one service apiece.

"On Windows XP, 2000, and 2003, svchost is not a virus. On those systems, svchost is a required system component."

What about this "RPC" thing that has vulnerabilities?

Same story. RPC, for Remote Procedure Call, is a core operating system service. Windows won't run without it. If you happen to successfully disable it, you're in deep trouble.

Do not disable the RPC service. Don't even think about it. (If you already did, see Note 2.)

So what do you do?

First, we have to understand that there are two possible problems:

  • You could be infected with a virus.

  • You could be under "attack" from an outside source attempting to exploit the RPC vulnerability.

It'll do you no good to get things all cleaned up only to get hit again the moment you connect to the internet, so we'll deal with the second point first.

Block the Vulnerability

The very first thing we have to do is plug the vulnerability. This will prevent some forms of re-infection, as well as some forms of attack, both of which can cause the problems we've been talking about.

If you're running Windows XP, you can turn on the Internet Connection Firewall. In Control Panel, select Network Connections, select the connection that corresponds to your internet connection, right click on that and select Properties, select the Advanced tab, and make sure that Protect my computer and network by limiting or preventing access to this computer from the Internet is checked.

If you're running behind a NAT router, you're probably already safe, but make sure that ports 135, 139, and 445 are not being forwarded to any computer on your network.

If you have some other kind of firewall, ensure that those same ports are blocked.

Update Your System

Install all of the latest service packs and patches. For Windows 2000, that means getting the latest service pack, as well as any additional patches. For Windows XP, that also means getting the latest service pack and any additional patches. (Note: If you've installed Windows XP Service Pack 1, Microsoft now recommends installing Service Pack 1a that corrects a couple of problems.) The whole process can be simplified to this: visit Windows Update, let it analyze your system, and then download and install all the updates suggested.

The single, most important update relating to our svchost / RPC problem is this one: A Buffer Overrun in RPCSS Could Allow an Attacker to Run Malicious Programs. Make certain that the patches listed there have been installed.

You're not done.

Scan for Viruses

To put it more completely, update your virus signatures to the latest possible and then scan for viruses. In fact, experience is showing that not all virus scanners are catching all viruses, so it would be in your best interest to use a second virus scanner as well.

You may not have a virus. But you may have contracted one as a result of the vulnerability.

There are several viruses that may result from this vulnerability. Some cannot be removed by the virus scanners' traditional mechanisms. If that happens to you then you'll need to download a special tool to remove that particular virus. Take the name of the virus identified by your scanner, visit the Symantec Anti-Virus Center, and search on that virus. Chances are, if there's a tool to remove they virus, they have it.

Scan for Spyware

There is anecdotal evidence that Spyware can also be associated with svchost related problems. Even if that's not accurate, it's a good idea to scan regularly anyway. Grab a copy of a tool such as Spybot Search and Destroy, or Ad-Aware.

Notes:

Note 1: Windows 95, 98, and Me users: Most of this article does not apply to you at all. You shouldn't be seeing the symptoms described here. If you do, or if you find svchost.exe on your machine, then you likely have a virus and should scan and clean immediately.

Note 2: If you've already disabled the RPC service, then Black Viper has a possible way to restore it. He also has instructions for stopping the 60 second shutdown as well.

Note 3: If you have a firewall such as ZoneAlarm, it may ask if it's ok for svchost to access the internet. It's probably ok to allow it. There is at least one legitimate service that svchost supports that does need to access the internet: the time service. It connects to time servers on the internet to ensure your clock is correct.

Updates

Finally, check back here for updates. SVCHOST has been the source of a lot of frustration for people, and I'll try to update this article as new information becomes available.

Related Links:

Article C1927 - April 19, 2004

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
377 Comments

I found that the best way to fix this problem is to format the hard drive and install Linux.

Posted by: TUX at May 8, 2007 9:53 AM

Along with the numerous people, I myself has experienced the same problem. First, we turn on the computer. All good. Second we log in and wait patiently as svchost.exe runs SYSTEM runs up to 100%. The only way to take it down and access any kind of program is to shut it down from the windows task manager. This takes out the sound and sometimes messes up the dial-up phone book. I have downloaded countless programs to scan and prevent further happenings, but still the problem consists. Crashing the computer with a baseball bat seems the better alternative to a virus crashing it. What to do?

Posted by: brandon at May 8, 2007 5:20 PM

Morning,

I have the problem listed above, svchost is running when I am connected to the internet. It clogs up all my CPU and if I want to be able to do anything at all I need to end that process (I have numerous svchosts running, of which one is taking up 99% cpu).

anyway, I tried to use your advice and turn on the "Protect my computer and network by limiting..." however I don't have a check mark for it only a [settings] box. when I click that it asks me if I want to install it and when I click yes it gives me some sort of error.

I first got this problem this morning when I booted up my computer...I have never seen it before to this extent.

Help! =)

thanks much,
~kyle

Posted by: Kyle at May 9, 2007 6:29 AM

I am being driven mad by this svchost pest,and followed the step by step procedure hoping to counteract it.like the previous guy i had exactly the same problem with the "Protect my computer and network by limiting" check, and furthermore I had a problem with the "A buffer overrun in RPCSS could allow an attacker to run malicious programs" - basicly I need the 32-bit version ,which seems not to exsist.

Posted by: Michael at May 9, 2007 6:46 AM

Reading comments posted here is reassuring because its apparent this is a serious and common problem. It started for me a month or so ago and I got temporary releif using a program called RegCure but now its back, and I am again deleting the busiest svchost in Task Manager. Before I give up, and swap to my spare hard drive I'll try the fixes I've read here related to killing the Microsoft Automatic updates and also use Process Explorer with hopes of locating a file that its latching onto to. Before I thought the problem would ony arise when connecting to the internet but now it happens whether connected or not.

Posted by: Noramn at May 9, 2007 7:08 AM

I found (after many hours) that if you run the windows update when you are not using the PC you can get the updates and return the svchost.exe back to 'normal'. Youll have to at least wait to get past the 'Do you want to install these updates' option, then go to bed. Let it run all night while you are sleepin.

This is sad however, that I can't find a MS fix for this.

Posted by: ^Lestat at May 9, 2007 9:14 AM

I had problems with svchost hogging cpu that I traced to Windows Update. I found that the Remove and Reinstall of Windows Updates at http://www.amset.info/windows/auto-updates.asp#Reset%20Automatic%20Updates
solved the problem, at least for now. So thanks, Marko!

Posted by: Louis at May 9, 2007 9:29 AM

I just got this problem bad this morning when I restarted my laptop from hibernation. Although, network access had been getting really slow over the last two weeks, so for me at least, it's been an incrementally worse problem until I got hit hard this morning.

Microsoft thinks they have a fix for this problem. The article is ID 903737 and can be found at:
http://support.microsoft.com/kb/903737#appliesto

But you must contact their phone support to have them email a link to where you can download it from.

I installed their 'fix', and it did absolutely nothing initially. However, I had some other pending MS updates that I then installed and rebooted a second time. After the second reboot, svchost only ran wild for 3 minutes after I logged in (quite an improvement from running wild for over an hour before I just gave up and pulled the battery out of the laptop). Who knows, maybe this will help your situation, too.

As a confidence builder, MS has had this fix since July 2006, and has yet to roll it into any of their numerous updates...

Maybe Louis' fix will work for me and get rid of that initial 3 minute lockup after login? We'll see

Posted by: Lance at May 9, 2007 10:16 AM

The Remove and Reinstall of Windows Updates really does work. I just tried it, and not only is svchost acting normal again, but my windows firewall is also back an running after it was refusing to turn on.
http://www.amset.info/windows/auto-updates.asp#Reset%20Automatic%20Updates

Posted by: penn919 at May 9, 2007 11:41 AM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm closing comments on this article simply due to the sheer volume.

I've created a new article:
http://ask-leo.com/how_do_i_fix_this_high_cpu_usage_svchost_virus_or_whatever_it_is.html
that deals with the current "100% CPU Usage" issue that so many people seem to
be experiencing.

Many thanks to all the commentors here who added value to the thread for others
to come and find.

Leo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)

iD8DBQFGQnIZCMEe9B/8oqERAgFTAJ0Vp60xlHDBO/98voKQqI/6DnnDIACdGjg1
fwzk4RuL2SWWR8HmxMQ47G8=
=LFak
-----END PGP SIGNATURE-----

Posted by: Leo A. Notenboom at May 9, 2007 6:14 PM

Question? Ask Leo!