1 / 12
文档名称:

ring0权限秘诀.doc

格式:doc   大小:239KB   页数:12页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

ring0权限秘诀.doc

上传人:tmm958758 2018/11/30 文件大小:239 KB

下载得到文件列表

ring0权限秘诀.doc

相关文档

文档介绍

文档介绍:Posted: Fri Dec 12, 2003 2:02 pm 
User
Joined: Sat Nov 29, 2003 8:49 pm
Posts: 43
Hi,
I wonder if any of you FASM ASM programmers can help me on this one.
Basically Im writting a program that I wish to distribute with a license key protection. I've done this in the past and found the software cracked and on a news group in less than a month Still I recently purchased a book that shows a number of ASM techniques for preventing (or at least making it harder) cracking. One of these techniques requires the program to drop into Ring0 (basically the license key checking/encryption is done in Ring0) .
Now Im no ASM guru and I know little or nothing about FASM - however having read all 66 truncated pages of the FASM manual I came up with the following code - however I get an error saying 'Privilaged Insturction Exception' when pile and run - the whole point of the code is to drop into Ring0 and execute mand I know to be only executable in Ring0 (duh!) to prove that the program is in Ring0 . I could then continue and write some code for license key checking.
Please find my example code bellow...any assistance on what Im doing wrong or pointers to more FASM examples/tutorials/manuals will be much appreciated.
;
; Sample program to demonstrate a technique for software protection
; Basically if you can drop into ring0 you can prevent debugging by SoftICE and other
; debugging tools
;
; This can also be used for inappropriate behaviour (Read viruses!)
; so please dont!
;
; Inline ASM to pop into Ring 0 execute a Ring mand and return to Ring 3 execution
; A variable to store our ecx value
= 0
= 0
! rdmsr ;rdmsr loads the contents of a 64–bit MSR (model specific register) of the
; address specified in the ecx register into registers edx And eax
! MOV [v_edxprevious], edx ; save the value of our current edx
! MOV [v_eaxprevious], eax ; save the value of our current eax
! MOV ecx,[l_ring0_routine] ; move the location of