UI automation 응용프로그램을 위한 UIAccess

Windows Integrity

Windows Vista 이후에 달라진 Security Model 중에 Windows Integrity 라는 구조가 소개되었다. 이것은 Security Reference Monitor 라는 것을 기반으로 하는 , 이는 Object security descriptor ACL안에 접근 가능한 security access token 갖고 있는 user 또는 group SID와의 비교에 의해서 강제적으로 제어하도록 되어 있다. 이와 같이 비교 가능한 integrity level security access token 포함하며, mandatory label access control entry security descriptor system ACL 추가되어 있다. (http://msdn.microsoft.com/en-us/library/bb625963.aspx 참조) 간단히 말해 특정 계정으로 수행되는 Process 어떤 보안적인 integrity level이라는 것을 갖고 있는 , 해당 process에서는 해당 integrity level보다 과한 수준의 resource 접근할 없다는 구조이다. 예를 들어, Local System 계정은 SYSTEM level 높은 Integrity 수준을 갖고 있으며, Administrators group Admin level integrity 갖고 있다. 일반 Standard User 인증된 경우는 medium 수준의 level, 그리고, everyone 계정은 low 수준의 level 갖게 된다. 그러므로, 그에 따라 접근할 있는 resource 제약이 따를 수밖에 없다. 이에 대해서 Process Explorer 특정 Process Integrity 정보를 얻을 있다. 특정 process 속성 > Security TAB > GROUP & Flags(Integrity)).

 

User Interface Privilege Isolation (UIPI)

UIPI 낮은 수준의 권한을 갖은 Application 보다 높은 수준의 Application에서 Windows Message 보내거나 Hooks Install 하거나 하는 동작을 windows subsystem에서 못하게 하는 제약사항을 말하는 용어이다. 예를 들어, WM_GETTEXT lover-privilege 에서 Higher-privilege window 보낼 수있다. 단지, read type message 가능하다. 하지만, WM_SETTEXT 경우는 안된다. 이러한 제약사항을 받는 것은 다음과 같은 것들이다.

ü  (Higher rights 수행되는 Process) window handle validation 시도하는 경우

ü  SendMessage PostMessage 경우 (이는 API level에서 Silently 하게 Drop된다.

ü  Process 붙어 Thread Hook 사용하는 경우

ü  Process Monitoring 위해 Journal Hook 사용하는 경우

ü  DLL Injection 하여는 경우

 

UI automation 응용프로그램을 위한 UIAccess

MSAA(Microsoft Active Accessibility) 알려진 UI Automation Application User 대신하여 다른windows applications 대해 행위의 제어를 지원하도록 디자인된다. 그러므로, 일반적으로 UIPI 대한 제약사항에 적용 받을 밖에 없는 , 이에 대하여 적용 받지 않도록 구성할 있는 것이 UIAccess 대한 방식이다. UIAccess enabled Application 구성하기 위해서는 다음과 같은 방법에 의해서 가능하다.

 

1. 먼저, 아래와 같은 manifest 필요하다.

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">

  <security>

    <requestedPrivileges>

    <requestedExecutionLevel

      level="asInvoker"

      UIAccess="true" />

    </requestedPrivileges>

  </security>

</trustInfo>

 

특이한 것은 requestedExecutionLevel UIAccess = "true" enable 되어 있다. 이것은 UIPI bypass 하겠다는 것이다.



 

2. [requirement]그리고, 반드시 digital signature 가진 Application이여야 하며, 해당 Cert Local machine Trusted Root Certification Authorities Certificate store 연결되어 있어야 한다. test 위해서는 아래와 같은 절차와 같이 하면 된다. (참조: http://www.codeproject.com/KB/vista-security/UAC__The_Definitive_Guide.aspx )

 

1) trusted root certificate 생성한다.

 

   makecert -r -pe -n "CN=Test Certificate" -ss PrivateCertStore testcert.cer

 

   certmgr.exe -add testcert.cer -s -r localMachine root

 

2) UIAccess application 서명한다.

 

   SignTool sign /v /s PrivateCertStore /n "Test Certificate"

            /t http://timestamp.verisign.com/scripts/timestamp.dll

            YourApp.exe

 

3.[requirement]또한, 해당 UIAccess enabled Application 반드시 administrators group 의해서 writable 가능한 directory 위치해야 한다. 보통은 %ProgramFiles% 그의 하위 폴더, 그리고, %WinDir% 그의 하위폴더가 되겠다. 간혹, standard users 쓰기권한 설정에 의해서 일부 폴더가 가능할 수도 있다.

 

추가적으로 UIAccess 대한 몇몇 특징이 존재한다.

ü  UIAccess enabled Application(EXE) Standard users 의해서 구동이 된다.

ü  하지만, UIAccess Enabled COM EXE 경우는 Interface 통해서 (CoCreateInstance ) Launch 시킬 없다. 그러므로, ShellExecute API등을 이용하여 구동할 있다.

ü  UIAccess enabled Application High IL 갖게 된다. 그러므로, COM Server launch user 경우에, High IL Client COM Elevation Moniker(http://msdn.microsoft.com/en-us/library/ms679687(VS.85).aspx) 사용한 Medium IL Client COM Elevation Moniker 의해 elevation Level 정확히 설정된 COM Server 접근할 있다. 이는 반드시 COM Server 이미 running 상태여야만 한다.

ü  만일, UIAccess enabled COM Server 이미 running 상태라면, DCOM interactive user 설정되어 있을 , standard users(Medium IL) Administrators(Admin IL) Client에서 접근이 가능하다.

by 강세윤 | 2009/09/14 16:48 | 정리되지 않은 기술 | 트랙백 | 덧글(3)
트랙백 주소 : http://byung.egloos.com/tb/5112778
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by 정성태 at 2009/09/15 13:28
RSS 주소 서비스는 안 하시나요? ^^
아시는 지 모르겠지만, RSS 주소에 글들이 공개되어 있지 않습니다.

http://byung.egloos.com/index.xml
Commented by 강세윤 at 2009/09/15 23:56
허걱, 하고 있는 것으로 설정 되어있습니다만.. 이거 확인해봐야 할 듯 한데욧.. 근데, 어디다 확인해야 하는 지...흠냐.. 여튼, 알려주셔서 고맙습니다.
Commented by 강세윤 at 2009/09/24 13:20
복원되었군요.. 제 RSS 서비스가 ... 시간이 다소 걸렸네요.

:         :

:

비공개 덧글

< 이전페이지 다음페이지 >