응답이없는 이미 설명 공유하십시오 아직???
어쨌든 해결책을 찾았습니다. 먼저 문제를 이해해야합니다.
IE가 보호 모드에서 실행되는 경우 IE에서 보안 개체 사용을 피하기 위해 IE 프로세스를 저 순도 수준으로 가져옵니다. 따라서 Kernal Object (메모리 맵 파일)가 Highty-Integrity Process (예 : 콘솔 또는 창 응용 프로그램)에서 생성 된 경우 보호 모드에서 IE에서 액세스하지 않습니다.
이 작업을 수행하려면 높은 무결성 프로세스에서 Kernal 개체를 낮은 무결성 수준으로 표시해야합니다.이 개체는 무결성 수준 프로세스에서도 액세스 할 수 있지만 개체가 취약해질 수도 있습니다. 내가 (here) 발견 오랜 연구 후
하여 낮은 무결성 수준에 커널 인 객체를 설정하는 VC++ 코드를 다음
LPCWSTR LOW_INTEGRITY_SDDL_SACL_W = L"S:(ML;;NW;;;LW)";
bool SetObjectToLowIntegrity(HANDLE hObject, SE_OBJECT_TYPE type = SE_KERNEL_OBJECT)
{
bool bRet = false;
DWORD dwErr = ERROR_SUCCESS;
PSECURITY_DESCRIPTOR pSD = NULL;
PACL pSacl = NULL;
BOOL fSaclPresent = FALSE;
BOOL fSaclDefaulted = FALSE;
if (ConvertStringSecurityDescriptorToSecurityDescriptorW (LOW_INTEGRITY_SDDL_SACL_W, SDDL_REVISION_1, &pSD, NULL))
{
if (GetSecurityDescriptorSacl (
pSD, &fSaclPresent, &pSacl, &fSaclDefaulted))
{
dwErr = SetSecurityInfo (
hObject, type, LABEL_SECURITY_INFORMATION,
NULL, NULL, NULL, pSacl);
bRet = (ERROR_SUCCESS == dwErr);
}
LocalFree (pSD);
}
return bRet;
}
는 C#에서 그것을 실행할 수 있도록 나는 다음과 같은 C 번호로 윈도우 API를 위의 변환;
public const int LABEL_SECURITY_INFORMATION = 0x00000010;
public enum SE_OBJECT_TYPE
{
SE_UNKNOWN_OBJECT_TYPE = 0,
SE_FILE_OBJECT,
SE_SERVICE,
SE_PRINTER,
SE_REGISTRY_KEY,
SE_LMSHARE,
SE_KERNEL_OBJECT,
SE_WINDOW_OBJECT,
SE_DS_OBJECT,
SE_DS_OBJECT_ALL,
SE_PROVIDER_DEFINED_OBJECT,
SE_WMIGUID_OBJECT,
SE_REGISTRY_WOW64_32KEY
}
public static bool SetLowIntegrityLevel(IntPtr hObject)
{
bool bResult = false;
IntPtr pSD = IntPtr.Zero;
IntPtr pSacl = IntPtr.Zero;
IntPtr lpbSaclPresent = IntPtr.Zero;
IntPtr lpbSaclDefaulted = IntPtr.Zero;
uint securityDescriptorSize = 0;
if (ConvertStringSecurityDescriptorToSecurityDescriptorW("S:(ML;;NW;;;LW)", 1, ref pSD, ref securityDescriptorSize))
{
if (GetSecurityDescriptorSacl(pSD, out lpbSaclPresent, out pSacl, out lpbSaclDefaulted))
{
int result = SetSecurityInfo(hObject,
SE_OBJECT_TYPE.SE_KERNEL_OBJECT,
LABEL_SECURITY_INFORMATION,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
pSacl);
bResult = (result == 0);
}
LocalFree(pSD);
}
return bResult;
}
[DllImport("Advapi32.dll", EntryPoint = "SetSecurityInfo")]
public static extern int SetSecurityInfo(IntPtr hFileMappingObject,
SE_OBJECT_TYPE objectType,
Int32 securityInfo,
IntPtr psidOwner,
IntPtr psidGroup,
IntPtr pDacl,
IntPtr pSacl);
[DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorSacl")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern Boolean GetSecurityDescriptorSacl(
IntPtr pSecurityDescriptor,
out IntPtr lpbSaclPresent,
out IntPtr pSacl,
out IntPtr lpbSaclDefaulted);
[DllImport("advapi32.dll", EntryPoint = "ConvertStringSecurityDescriptorToSecurityDescriptorW")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern Boolean ConvertStringSecurityDescriptorToSecurityDescriptorW(
[MarshalAs(UnmanagedType.LPWStr)] String strSecurityDescriptor,
UInt32 sDRevision,
ref IntPtr securityDescriptor,
ref UInt32 securityDescriptorSize);
[DllImport("kernel32.dll", EntryPoint = "LocalFree")]
public static extern UInt32 LocalFree(IntPtr hMem);