Elevate process permissions to debug permissions

Source: Internet
Author: User

On the internet also saw some of the promotion process token function but not very good, finally I still from a hacker backdoor source code to extract a better process token function, dare not exclusive, share with you. The back door was really good.
Hysia prompts you:
This function is very good in dealing with the virus program, only to elevate their own permissions to kill the virus process I have written to try to end the Winlogon process, the result is that my computer immediately after the blue screen restart!

Elevate process permissions to debug permissions
Procedure Setprivilege;
Var
Oldtokenprivileges, Tokenprivileges:ttokenprivileges;
Returnlength:dword;
Htoken:thandle;
Luid:int64;
Begin
OpenProcessToken (GetCurrentProcess, Token_adjust_privileges, Htoken);
Lookupprivilegevalue (Nil, ' SeDebugPrivilege ', Luid);
Tokenprivileges.privileges[0].luid: = Luid;
Tokenprivileges.privilegecount: = 1;
Tokenprivileges.privileges[0]. Attributes: = 0;
AdjustTokenPrivileges (Htoken, False, Tokenprivileges, SizeOf (ttokenprivileges), oldtokenprivileges, ReturnLength);
Oldtokenprivileges.privileges[0].luid: = Luid;
Oldtokenprivileges.privilegecount: = 1;
Oldtokenprivileges.privileges[0]. Attributes: = Tokenprivileges.privileges[0]. Attributes or se_privilege_enabled;
AdjustTokenPrivileges (Htoken, False, Oldtokenprivileges, Returnlength, ptokenprivileges (nil) ^, returnlength);
End

The usage is needless to say,

Procedure Tform1.formcreate (Sender:tobject);

Begin Setprivilege; ...

In a word, the program is promoted to debug permissions, and then you can casually end other processes.

Good things to share with you!

Http://www.lsworks.net/article/9.html

Elevate process permissions to debug permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.