原文链接:https://persistence-info.github.io/
收集有关 Windows 持久性机制的信息,以使保护/检测更加高效。大多数信息多年来都是众所周知的,在各种场景中被积极使用。
1.“Run” and “RunOnce” registry keys
位置:
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
分类:
Criteria | Value |
---|---|
Permissions | User |
Security context | User |
Persistence type | Registry |
Code type | EXE; Other; Fileless |
Launch type | Same logon required |
Impact | Non-destructive |
OS Version | All OS versions |
Dependencies | OS only |
Toolset | Scriptable |
描述:
众所周知的KEY,由许多应用程序使用。在注册表值中指定的任何文件路径都将由资源管理器用于指定的文件.exe当用户登录时。可以存在多个值。ShellExecute()
引用:
2.Task Scheduler
位置:
N/A
分类:
Criteria | Value |
---|---|
Permissions | User; Admin |
Security context | User; System |
Persistence type | Other |
Code type | EXE; DLL; Fileless; Other |
Launch type | Automatic; Other |
Impact | Non-destructive |
OS Version | All OS versions |
Dependencies | OS only |
Toolset | Scriptable |
描述:
计划任务可用于在许多不同的方案中运行自定义任务。通常,最终用户可以创建在其安全上下文中执行的任务,管理员可以创建作为 System 运行的任务。
引用:
https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page
备注:
- 任务数据存储在注册表中,但 API 访问似乎在所有情况下都更合理.
3.Image File Execution Options
位置:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\
分类:
Criteria | Value |
---|---|
Permissions | Admin |
Security context | User; System1 |
Persistence type | Registry |
Code type | EXE |
Launch type | Automatic; Any logon required; User initiated2 |
Impact | Destructive3 |
OS Version | All OS versions |
Dependencies | OS only |
Toolset | Scriptable |
描述:
众所周知的key。如果存在名称与 exe 文件名匹配的子项,则将读取REG_SZ值,并使用作为参数传递的原始 exe 启动该值。实际上,它会导致映像劫持,因为配置的exe是启动的,而不是所需的exe。Debugger
引用:
https://blog.malwarebytes.com/101/2015/12/an-introduction-to-image-file-execution-options/
备注:
- 取决于被劫持的image
- 取决于被劫持的image
- 原始 exe 无法启动
4.Windows Services
位置:
HKLM\SYSTEM\CurrentControlSet\Services
分类:
Criteria | Value |
---|---|
Permissions | Admin |
Security context | System |
Persistence type | Registry |
Code type | EXE, DLL, Other |
Launch type | Automatic |
Impact | Non-destructive |
OS Version | All OS versions |
Dependencies | OS only |
Toolset | Scriptable1 |
描述:
Windows 服务是最广为人知和广泛使用的持久性机制之一。基于 EXE 的方法最广为人知,但 加载的 DLL 也被使用(也被恶意执行组件使用)。
通常,必须在子项中指示 DLL,但实际上它不是必需的,这使得检测更加困难。2 svchost.exe
Parameters
引用:
Remarks:
- Also remotely with
sc.exe
↩ - https://twitter.com/0gtweet/status/1535156885179047936 ↩
5.AeDebug
位置:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
分类:
Criteria | Value |
---|---|
Permissions | Admin |
Security context | User; System1 |
Persistence type | Registry |
Code type | EXE |
Launch type | Other |
Impact | Non-destructive2 |
OS Version | All OS versions |
Dependencies | OS only |
Toolset | Scriptable |
描述:
众所周知的key。使用指定调试器命令行的 REG_SZ 字符串添加或编辑值。Debugger
如果希望在没有用户交互的情况下调用调试器,请使用REG_SZ字符串添加或编辑 Auto 值,该字符串指定在调用调试器之前系统是否应向用户显示对话框。字符串“1”禁用对话框;字符串“0”启用对话框。
在应用程序崩溃时启动,这可能不够可靠。
破坏父子链,使其更难检测。
引用:
https://docs.microsoft.com/en-us/windows/win32/debug/configuring-automatic-debugging