服务名与可执行路径不匹配是低成本高命中的排查点。
windows持久化检测
We had a Windows machine where one process kept coming back after every reboot.
At first, it looked like normal Windows activity because the service name was:
WindowsTelemetry
That sounds believable enough.
Windows has plenty of telemetry components, so if you are checking quickly, you might not even stop there.
But I checked the full service configuration.
The executable path was:
C:\Users\kevin\AppData\Roaming\Microsoft\Telemetry\telemetry.exe
That did not make sense.
A service running as LocalSystem should not normally be launching an unsigned executable from a user’s AppData folder.
I checked the file signature.
NotSigned
Then I checked when the service was installed.
Event ID 7045 in the System log showed that WindowsTelemetry had been created the previous night around 11:08 PM.
The service was configured to start automatically and run as LocalSystem.
That meant the binary was not just persistent.
It was running with very high privileges.
I pulled the PID for the service and checked its network activity.
The process had an established HTTPS connection to an external IP address.
At that point, we isolated the machine.
The interesting part for me was how normal the service looked from the name alone.
WindowsTelemetry
Microsoft\Telemetry
telemetry.exe
Everything was named to make you move past it.
But once you looked at the path, signature and service account, the picture changed completely.
This is why when I am reviewing Windows services, I do not only look for strange names.
I check what they actually execute.
I check where the file lives.
I check who signed it.
And I check which account the service runs under.
A malicious service does not need a suspicious name.
Sometimes it just needs a name boring enough that nobody bothers to open the properties.