在 Windows 中查找服务创建日期?

Luc*_*man 13 forensics

如果在受感染的系统上您尝试分析新安装的服务或安装服务的时间,您将如何做。我在哪里可以找到 Windows 注册表中某个服务的创建日期?

Fly*_*lyk 21

无法确定特定 Windows 服务的创建日期,因为服务小程序和 Windows 注册表都不存储与创建相关的任何日期。

但是,有一个上次修改日期隐藏在视图之外(包括在 Windows 注册表编辑器中),但可以使用RegQueryInfoKey访问。由于所有 Windows 服务都存储在注册表中,因此您可以通过查看与相关服务相关的注册表项来检查上次修改日期HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

或者,如果您将需要其信息的注册表项导出为文本文件,则每个项的最后修改日期将写入文本文件中。

在此处输入图片说明

最后,Stack Overflow 上已经讨论了使用 PowerShell 返回上次修改日期解决方案


nob*_*ody 10

从 Vista 开始,服务创建会记录到“系统”事件日志中的服务控制管理器事件 ID 7045 下。

例如,以下命令:

C:\>sc create hello binpath= notepad.exe
[SC] CreateService SUCCESS
Run Code Online (Sandbox Code Playgroud)

产生了以下事件日志条目:

Log Name:      System
Source:        Service Control Manager
Date:          12/16/2014 3:00:00 PM
Event ID:      7045
Task Category: None
Level:         Information
Keywords:      Classic
User:          DOMAIN\username
Computer:      WORKSTATION.DOMAIN.local
Description:
A service was installed in the system.

Service Name:  hello
Service File Name:  notepad.exe
Service Type:  user mode service
Service Start Type:  demand start
Service Account:  LocalSystem
Run Code Online (Sandbox Code Playgroud)