gogo023 发表于 2010-9-26 14:43:13

提升为系统进程。

本帖最后由 gogo023 于 2010-9-26 14:45 编辑

#include <LocalSecurityAuthority.au3>

_RaiseToSystem()

Func _RaiseToSystem()
      Local $sApp, $sArg, $hToken, $pUserThread, $pUserLogged

      $pUserLogged = _LookupAccountName(_LsaGetUserName(False))
      $hToken = _OpenProcessToken(-1)
      $pUserThread = _LookupAccountName(_GetTokenUser($hToken))
      _LsaCloseHandle($hToken)

      If _EqualSid($pUserLogged, $pUserThread) Then
                If @Compiled Then
                        $sApp = @ScriptFullPath
                        $sArg = " " & $CmdLineRaw
                Else
                        $sApp = @AutoItExe
                        $sArg = " " & FileGetShortName(@ScriptFullPath) & " " & $CmdLineRaw
                EndIf
                _CreateProcessAsSystem($sApp, $sArg, "Winlogon.exe")
                Exit(_HeapFree($pUserLogged) or _HeapFree($pUserThread))
      EndIf
      Return _HeapFree($pUserLogged) or _HeapFree($pUserThread)
EndFunc      ;==>_RaiseToSystem

pusofalse大哥写的这里的这段代码。提升出来的系统进程,一样的会在进程管理器里被结束掉。

itljl 发表于 2010-9-26 15:01:08

提升为系统进程本身就是可以被结束的啊。

liufenglg 发表于 2010-9-26 15:14:34

没有通过一定手段被保护的进程都会被结束掉吧

gogo023 发表于 2010-9-26 15:27:14

这样的代码写出来。虽然是SYSTEM的用户,但不能真正达到系统级进程无法结束的效果啊。

einkhe98 发表于 2010-9-27 16:31:59

LocalSecurityAuthority.au3-- 谁能提供下, 谢谢!

这个对我有用, 因为我的环境里, 普通用户都不具有本地管理员权限, 他们应该就无法结束被提升为SYSTEM权限的进程了.

yang3114 发表于 2010-9-28 12:24:19

{:face (427):}{:face (427):}
页: [1]
查看完整版本: 提升为系统进程。