Пожалуйста, обратите внимание, что пользователь заблокирован
hello, this is my source code writen in golang for set my own process as critical, using RtlSetProcessIsCritical winapi function, if you kill the process using taskkill or any other program, the killed process generate BSOD after killing the process, this
program require Admin privileges !!
program require Admin privileges !!
Код:
package main
import (
"os"
"fmt"
"time"
"unsafe"
"syscall"
)
var (
critical = syscall.MustLoadDLL("ntdll.dll").MustFindProc("RtlSetProcessIsCritical")
debug = syscall.MustLoadDLL("ntdll.dll").MustFindProc("RtlAdjustPrivilege")
)
func SetCriticalProcess() {
b := []byte{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
_,_,a := debug.Call(uintptr(0x14), uintptr(1), uintptr(0), uintptr(unsafe.Pointer(&b)))
fmt.Println(a)
_,_,e := critical.Call(uintptr(1), uintptr(0), uintptr(0))
fmt.Println(e)
}
func SleepMode() {
time.Sleep(time.Second)
}
func main() {
SetCriticalProcess()
for {
SleepMode()
fmt.Println(os.Getpid())
}
}