• XSS.stack #1 – первый литературный журнал от юзеров форума

golang set critical process (BSOD)

stars4

RAID-массив
Забанен
Регистрация
05.08.2023
Сообщения
70
Реакции
12
Пожалуйста, обратите внимание, что пользователь заблокирован
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 !!
Код:
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())
     }
}
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх