Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Writing a Kernel Driver Just for the Intelligence

Writing a Kernel Driver Just for the Intelligence

Scheduled Pinned Locked Moved Hardware & Devices
testingbeta-testingquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Baltoro
    wrote on last edited by
    #1

    Hi, As a concept, I would like to write a kernel driver just to read kernel structure data and send the information back to a user mode application (in Windows XP). I have absolutely no experience doing this kind of thing, and, in all honesty, it scares the hell out of me. I have read much of the available literature (Windows Internals, and the documentation that comes with the Microsoft DDK), but, the kernel is a murky, nebulous region of the cosmos, and I am extremely reluctant to invade it without, say, a God-like sense of comprehension. Initially, my appraoch is to use the source examples provided with the DDK, but, I'm wondering if testing something like that can destroy or damage my operating system, or the device drivers currently residing there. If this is an evolutionary process, I don't want to become bytestream roadkill. Any good suggestions from those of you have survived the development process, besides reading the forum posts at OSR and Sysinternals?

    L 2 Replies Last reply
    0
    • B Baltoro

      Hi, As a concept, I would like to write a kernel driver just to read kernel structure data and send the information back to a user mode application (in Windows XP). I have absolutely no experience doing this kind of thing, and, in all honesty, it scares the hell out of me. I have read much of the available literature (Windows Internals, and the documentation that comes with the Microsoft DDK), but, the kernel is a murky, nebulous region of the cosmos, and I am extremely reluctant to invade it without, say, a God-like sense of comprehension. Initially, my appraoch is to use the source examples provided with the DDK, but, I'm wondering if testing something like that can destroy or damage my operating system, or the device drivers currently residing there. If this is an evolutionary process, I don't want to become bytestream roadkill. Any good suggestions from those of you have survived the development process, besides reading the forum posts at OSR and Sysinternals?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Baltoro wrote:

      Initially, my appraoch is to use the source examples provided with the DDK, but, I'm wondering if testing something like that can destroy or damage my operating system, or the device drivers currently residing there.

      Yes, in fact when I first started developing device drivers I was locked out of my operating system several times. It was quite embarrassing. I would highly recommend testing your device drivers in VMWare or VirtualPC. It is extremely easy to create a race condition in device drivers. It can be a challenge to repair the OS when a faulty driver is installed. Once I had to edit the registry from a boot CD to prevent an upper level filter driver from attaching. No more driver development outside of VMWare for me! I have since learned my lesson! :) There are additional benefits to running your test drivers in a virtual environment. It makes debugging the driver much easier. There is a gentleman named Dana Epp[^] who has a site dedicated to those seeking ring-0[^]. He has written a tutorial showing how to use WinDbg with VMWare[^]. I have found the following blogs to sometimes contain useful information: A Hole In My Head[^] Pointless Blathering[^] It Goes To Eleven[^] OSR online[^] is also a great resource. There are many knowledgeable engineers there who are willing to help out. I would highly recommend joining the discussion lists. See you there! Best Wishes, -David Delaune

      B 1 Reply Last reply
      0
      • L Lost User

        Baltoro wrote:

        Initially, my appraoch is to use the source examples provided with the DDK, but, I'm wondering if testing something like that can destroy or damage my operating system, or the device drivers currently residing there.

        Yes, in fact when I first started developing device drivers I was locked out of my operating system several times. It was quite embarrassing. I would highly recommend testing your device drivers in VMWare or VirtualPC. It is extremely easy to create a race condition in device drivers. It can be a challenge to repair the OS when a faulty driver is installed. Once I had to edit the registry from a boot CD to prevent an upper level filter driver from attaching. No more driver development outside of VMWare for me! I have since learned my lesson! :) There are additional benefits to running your test drivers in a virtual environment. It makes debugging the driver much easier. There is a gentleman named Dana Epp[^] who has a site dedicated to those seeking ring-0[^]. He has written a tutorial showing how to use WinDbg with VMWare[^]. I have found the following blogs to sometimes contain useful information: A Hole In My Head[^] Pointless Blathering[^] It Goes To Eleven[^] OSR online[^] is also a great resource. There are many knowledgeable engineers there who are willing to help out. I would highly recommend joining the discussion lists. See you there! Best Wishes, -David Delaune

        B Offline
        B Offline
        Baltoro
        wrote on last edited by
        #3

        David Delaune, Thank you very much for the excellent suggestions, that is exactly the type of information I was looking for, but, was completely oblivious to.

        1 Reply Last reply
        0
        • B Baltoro

          Hi, As a concept, I would like to write a kernel driver just to read kernel structure data and send the information back to a user mode application (in Windows XP). I have absolutely no experience doing this kind of thing, and, in all honesty, it scares the hell out of me. I have read much of the available literature (Windows Internals, and the documentation that comes with the Microsoft DDK), but, the kernel is a murky, nebulous region of the cosmos, and I am extremely reluctant to invade it without, say, a God-like sense of comprehension. Initially, my appraoch is to use the source examples provided with the DDK, but, I'm wondering if testing something like that can destroy or damage my operating system, or the device drivers currently residing there. If this is an evolutionary process, I don't want to become bytestream roadkill. Any good suggestions from those of you have survived the development process, besides reading the forum posts at OSR and Sysinternals?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Baltoro wrote:

          I'm wondering if testing something like that can destroy or damage my operating system

          Oh yes! :)

          Baltoro wrote:

          or the device drivers currently residing there

          Deffinitely!

          Baltoro wrote:

          If this is an evolutionary process

          And about as slow. But more painfull.

          Baltoro wrote:

          Any good suggestions

          1. Ghost your system. You are going to need it. 2) Never set a test driver to auto start. You can get into a boot-bsod-boot-bsod loop. 3) Get Walter Oneys book. 4) Use a DDK sample to start with. Say, a simple IO, or a write to buffer/read from same buffer driver to het a feel if you like. I have spent about 10 years writing drivers, still learning stuff!

          Morality is indistinguishable from social proscription

          B 1 Reply Last reply
          0
          • L Lost User

            Baltoro wrote:

            I'm wondering if testing something like that can destroy or damage my operating system

            Oh yes! :)

            Baltoro wrote:

            or the device drivers currently residing there

            Deffinitely!

            Baltoro wrote:

            If this is an evolutionary process

            And about as slow. But more painfull.

            Baltoro wrote:

            Any good suggestions

            1. Ghost your system. You are going to need it. 2) Never set a test driver to auto start. You can get into a boot-bsod-boot-bsod loop. 3) Get Walter Oneys book. 4) Use a DDK sample to start with. Say, a simple IO, or a write to buffer/read from same buffer driver to het a feel if you like. I have spent about 10 years writing drivers, still learning stuff!

            Morality is indistinguishable from social proscription

            B Offline
            B Offline
            Baltoro
            wrote on last edited by
            #5

            fat_boy, Thanks, I was worried about actually loading and executing, and the potential for irrevocably damaging essential components. Now, I know,... Thanks again, I really appreciate it.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups