能力值:
( LV9,RANK:380 )
|
-
-
2 楼
汇编的
http://forum.eviloctal.com/read-htm-tid-26402.html
|
能力值:
( LV9,RANK:170 )
|
-
-
3 楼
我利用其它程序的代码已经进入到ring 0层了,当写那个代码段还是显示
异常,不允许写.
那个代码段是一个服务程序, 用start来进行调入执行.代码的属性值是 RO的 只读 .
各位兄弟有什么好方法吗? 比如我降低当前代码段的权限或提升,有用吗??
我用了网上直接的提升权限的代码.
见下:
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;
|
|
|