Say I have a process called "EvilMalware.exe" that keeps getting restarted (i.e. I kill it and it is restarted after a few seconds).
I looked up the process that starts it and it is C:\Windows\System32\services.exe
.
This seems to be a legit windows process for starting stuff.
So how can I figure out what is telling services.exe to keep restarting "EvilMalware.exe"?
services.exe
that was running the file? Are you sure it was the real copy ofservices.exe
? Sometimes malware puts legitimate-looking files in legitimate-looking places (for example, the NACHI worm makes a file calledsvchost.exe
in\Windows\System32\WINS
which looks normal enough, but of course is not (the real file is inSystem32
, notSystem32\WINS
).So how can I figure out what is telling services.exe to keep restarting "EvilMalware.exe"?
Assuming it was the real copy ofservices.exe
running it, then you would have to figure out which service is launching it becauseservices.exe
itself does not host any services, it simply contains the Service Controller which coordinates services hosted in other files (including Windows’ own genericsvchost.exe
). You can use Process Explorer to view the list of running services that the SC has started to look for anything fishy.