I am trying to make some changes to our legacy product to support IE EPM in BHO. I managed to load it, and various methods are called - SetSite, DocumentComplete, etc.
It seems like I'm trying to connect to a server called pipe running inside a windows service.
We have already made changes to allow IE BHO to access the named pipe server in protected mode - using LOW_INTEGRITY_SDDL_SACL ("S: (ML ;; NW ;;; LW)"). Inside the code, we used the creation of a security descriptor using the ConvertStringSecurityDescriptorToSecurityDescriptor method, and then executed SetSecurityDescriptorSacl on the actual SD object or SECURITY_ATTRIBUTES. This allowed the BHO code to access named pipe servers hosted in the SYSTEM service.
I mentioned several articles and probably the most useful of them: Is there a way to create a named pipe from AppHontainer BHO in IE11?
I made some changes to the SDDL, so now it looks like
Basically it gives full access to files for everyone, ALL APPLICATION PARAMETERS and SYSTEMS in the DACL part. I know this is too permissive, but I expected this should at least work when I used SetSecurityDescriptorDacl :-)
In any case, the code that installs SD now looks like this. Did I miss something?
if (!ConvertStringSecurityDescriptorToSecurityDescriptor(EPM_INTEGRITY_SDDL, SDDL_REVISION_1, &pLISD, NULL)) { OutputDebugString(L"Unable to get the app-container integrity security descriptor"); return false; } PACL pAcl = 0; BOOL bAclPresent = FALSE; BOOL bAclDefaulted = FALSE; if (!GetSecurityDescriptorSacl(pLISD, &bAclPresent, &pAcl, &bAclDefaulted) || !bAclPresent) { return false; } if (!SetSecurityDescriptorSacl(pSecurityDesc, TRUE, pAcl, FALSE)) { return false; } pAcl = 0; bAclPresent = FALSE; bAclDefaulted = FALSE; if (!GetSecurityDescriptorDacl(pLISD, &bAclPresent, &pAcl, &bAclDefaulted) || !bAclPresent) { OutputDebugString(L"Setting to low integrity : No DACL Available"); return false; } if (!SetSecurityDescriptorDacl(pSecurityDesc, TRUE, pAcl, FALSE)) { OutputDebugString(L"Setting to low integrity : Unable to set the DACL"); return false; }