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. C / C++ / MFC
  4. Help Needed !!!

Help Needed !!!

Scheduled Pinned Locked Moved C / C++ / MFC
toolsperformancehelpquestiondiscussion
4 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.
  • S Offline
    S Offline
    SelvaKr
    wrote on last edited by
    #1

    Hi all, I am trying to read a particular bit on the kernel memory. That page belongs to a driver, say cdrom.sys. Jus before proceeding further, i jus tried to read the contents in the physical memory where the driver is loaded. i.e. i found the driver load address and tried reading that location from kernel memory. But it simply returns 'FF'. Any thoughts??? I am using ZwOpenSection to open the memory and lock the pages, then read. Is there any other way of doing it.. Are there any tools which can read the kernel memory location.... Thanks in advance....

    Selva

    J 1 Reply Last reply
    0
    • S SelvaKr

      Hi all, I am trying to read a particular bit on the kernel memory. That page belongs to a driver, say cdrom.sys. Jus before proceeding further, i jus tried to read the contents in the physical memory where the driver is loaded. i.e. i found the driver load address and tried reading that location from kernel memory. But it simply returns 'FF'. Any thoughts??? I am using ZwOpenSection to open the memory and lock the pages, then read. Is there any other way of doing it.. Are there any tools which can read the kernel memory location.... Thanks in advance....

      Selva

      J Offline
      J Offline
      JudyL_MD
      wrote on last edited by
      #2

      It doesn't work because the OS is designed so that it doesn't work. User mode programs cannot access kernel mode areas except through the exposed interfaces. In general, those interfaces do not give direct access to the kernel area but copy kernel info into a user space address. The only time user mode can directly access kernel mode is with the help of a cooperating driver and, even then, user mode can only safely direct access the kernel area of the specific driver. General answer - can't do it. Judy

      S 1 Reply Last reply
      0
      • J JudyL_MD

        It doesn't work because the OS is designed so that it doesn't work. User mode programs cannot access kernel mode areas except through the exposed interfaces. In general, those interfaces do not give direct access to the kernel area but copy kernel info into a user space address. The only time user mode can directly access kernel mode is with the help of a cooperating driver and, even then, user mode can only safely direct access the kernel area of the specific driver. General answer - can't do it. Judy

        S Offline
        S Offline
        SelvaKr
        wrote on last edited by
        #3

        Thanks for your reply Judy, But i am reading the kernel only thru a driver (created for physical memory reading).. all the functions are returning true (analyzed thru dbgview).. any thoughts???

        Selva

        J 1 Reply Last reply
        0
        • S SelvaKr

          Thanks for your reply Judy, But i am reading the kernel only thru a driver (created for physical memory reading).. all the functions are returning true (analyzed thru dbgview).. any thoughts???

          Selva

          J Offline
          J Offline
          JudyL_MD
          wrote on last edited by
          #4

          Not without seeing your code and, even then, I probably can't provide too much help since this is something I haven't done. Also, your problem is probably in the driver and drivers are not within the purview of this site. Try a driver development site. If you do go to a driver site, be warned: Providing unfettered user access to kernel memory is highly frowned upon since it is a huge security hole and invites BSODs. There is almost always a better safer way and one of the first responses you will get will be "why this way instead of the proper way". Judy

          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