Getting in ring 0 on winXp
I am writing a program in 16 bit x86 assembly which has to work on NT based systems.
Now unlike in win9x, I read one cannot do certain low-level operations in user mode like using int 13h which is exactly what I have to use.
Various sources say to write a virtual device driver (VxD) which then runs in ring 0, but that goes beyond my capabilities (I think). I have not really found what I'm looking for.
Can somebody explain how I get in ring 0 (kernel privileges). A code example of the most simple program with such privileges would be very helpful.
Anyway, I only need to be able to use int 13h.
Thank you
EDIT: apparantly, VxD is obsolete and has been replaced by WDM:
Wikipedia says:
In computing WDM stands for Windows Driver Model. It provides a framework for device drivers that operate under Microsoft Windows 98/ME/2000/XP and Server 2003. WDM is a successor of VxD, which was used on older versions of Windows. WDM drivers are layered in a complex hierarchy and communicate with each other via IO Request Packets IRPs.
Do I really need to write a WDM to use int 13 ?
Re: Getting in ring 0 on winXp
Quote:
Originally posted here by el-half
[B]I am writing a program in 16 bit x86 assembly which has to work on NT based systems.
So you are targetting NTVDM then, the NT virtual dos machine. It only has a subset of DOS functions which are safe to implement in Windows.
Quote:
Now unlike in win9x, I read one cannot do certain low-level operations in user mode like using int 13h which is exactly what I have to use.
For raw block device access? Use win32 CreateFile with physical devices.
Quote:
Various sources say to write a virtual device driver (VxD) which then runs in ring 0...
They lie. VXDs are only for the old win9x systems and do not work on WinNT.
To get ring0 in NT you need to write an NT device driver, which is definitely different from a VXD (it's a .sys file, for a start)
Quote:
Can somebody explain how I get in ring 0 (kernel privileges). A code example of the most simple program with such privileges would be very helpful.
You can't, without writing a NT device driver.
Quote:
Anyway, I only need to be able to use int 13h.
Surely performing the int13 functions in some other way would be acceptable?
Slarty