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. Windows API
  4. Lowering resource Integrity Level

Lowering resource Integrity Level

Scheduled Pinned Locked Moved Windows API
questionsecurityperformancehelp
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.
  • K Offline
    K Offline
    Kharfax
    wrote on last edited by
    #1

    Hi, I'm working in a Single Sign On App, and I need to comunicate a BHO with it's controller App, I'm using a memory mapped file for that. If the BHO is the one who creates the mapped file, everything works fine (The mapped file is LI) If the controller app creates the mapped file, the BHO fails to open the mapped file (The Mapped file is MI ) So I decided to lower the maped file integrity using the code provided by MS in the paper "Understanding and working in protected mode internet explorer". But that code doesnt work, and I have seen in this forum that a lot of people is having problems with that code, and I can't find any documentation about this at MSDN In resume: How can I lower a resource integrity level? Can someone help me or give me a hint? Here is the code I'm using to create the mapped file and lower the it's Integrity level: Notice that I replaced the values SDDL_REVISION_1 by 1 and LABEL_SECURITY_INFORMATION by 0x00000010L because I cant find where are defined. Thanks in advance HANDLE m_hMapVars = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, //&sa, PAGE_READWRITE, 0, 1024, "F31B3896-3455-4d0d-1234-2389346239874"); //Security Descriptor #define LOW_INTEGRITY_SDDL_SACL "S:(ML;;NW;;;LW)" PSECURITY_DESCRIPTOR pSd = NULL; PACL pSacl = NULL; BOOL fSaclPresent = FALSE; BOOL fSaclDefaulted = FALSE; if(ConvertStringSecurityDescriptorToSecurityDescriptor(LOW_INTEGRITY_SDDL_SACL, 1, &pSd , NULL)) { if(GetSecurityDescriptorSacl(pSd, &fSaclPresent, &pSacl, &fSaclDefaulted)) { if(ERROR_SUCCESS != SetSecurityInfo(m_hMapVars, SE_FILE_OBJECT, 0x00000010L , NULL,NULL,NULL, pSacl)) } } }

    M 1 Reply Last reply
    0
    • K Kharfax

      Hi, I'm working in a Single Sign On App, and I need to comunicate a BHO with it's controller App, I'm using a memory mapped file for that. If the BHO is the one who creates the mapped file, everything works fine (The mapped file is LI) If the controller app creates the mapped file, the BHO fails to open the mapped file (The Mapped file is MI ) So I decided to lower the maped file integrity using the code provided by MS in the paper "Understanding and working in protected mode internet explorer". But that code doesnt work, and I have seen in this forum that a lot of people is having problems with that code, and I can't find any documentation about this at MSDN In resume: How can I lower a resource integrity level? Can someone help me or give me a hint? Here is the code I'm using to create the mapped file and lower the it's Integrity level: Notice that I replaced the values SDDL_REVISION_1 by 1 and LABEL_SECURITY_INFORMATION by 0x00000010L because I cant find where are defined. Thanks in advance HANDLE m_hMapVars = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, //&sa, PAGE_READWRITE, 0, 1024, "F31B3896-3455-4d0d-1234-2389346239874"); //Security Descriptor #define LOW_INTEGRITY_SDDL_SACL "S:(ML;;NW;;;LW)" PSECURITY_DESCRIPTOR pSd = NULL; PACL pSacl = NULL; BOOL fSaclPresent = FALSE; BOOL fSaclDefaulted = FALSE; if(ConvertStringSecurityDescriptorToSecurityDescriptor(LOW_INTEGRITY_SDDL_SACL, 1, &pSd , NULL)) { if(GetSecurityDescriptorSacl(pSd, &fSaclPresent, &pSacl, &fSaclDefaulted)) { if(ERROR_SUCCESS != SetSecurityInfo(m_hMapVars, SE_FILE_OBJECT, 0x00000010L , NULL,NULL,NULL, pSacl)) } } }

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Use SE_KERNEL_OBJECT, not SE_FILE_OBJECT.

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

      K 2 Replies Last reply
      0
      • M Michael Dunn

        Use SE_KERNEL_OBJECT, not SE_FILE_OBJECT.

        --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

        K Offline
        K Offline
        Kharfax
        wrote on last edited by
        #3

        Thanks a lot Michael, I'll check it and post the results :D

        1 Reply Last reply
        0
        • M Michael Dunn

          Use SE_KERNEL_OBJECT, not SE_FILE_OBJECT.

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

          K Offline
          K Offline
          Kharfax
          wrote on last edited by
          #4

          Didn't work either :S I don't know what else to do. If I open the controller app first, my BHO cant communicate. Worst of all, when I use setsecurityinfo, I get no errors. And my app works, because if I turn off protected mode or open IE before my controller app it works fine. A lot of BHO developers are asking their clients to turn off protected mode in order to use their soft, I think I'll need to do the same :( -- modified at 9:42 Monday 30th April, 2007 I FIXED IT!! Thanks mate, using SE_KERNEL_OBJECT and don't allowing the BHO dll to init if is in the controller app address space it started to work :D

          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