`
vanadies10
  • 浏览: 82441 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

VISTA中的变化

 
阅读更多
无语啊无语。这变化让程序结构都要变化了。

Vista Challenge I (session isolation)
We spend about 4 months on R&D and final got it working with some support of the MS helpdesk.

Vnc and all remote control softwares are having trouble withy the new Vista security model. In de old model, winlogon was always running in the same session as the services, session0



While in the new model, the winlogon run in the same session as the desktop.



The isolation of the session0, now only used for services, prevent winvnc in service mode to access session X and no interaction with the desktop in session X is possible. Using the service, you can't logon or capture the desktop.

Running winvnc in application mode ( started manual in sessionX) all seems to work as long as you don't logoff or use any system application that popup the UAC.

Solution I
Winvnc need to split exe in a service and a application part. When we run the winvnc_service in session0 and let the service start winvnc_app in the sessionX, winvnc_app can communicate with the desktop and control the mouse and keyboard.

An other problem is that sessionX have different desktop, let's take a closer look how desktop exist in Vista. (This model was already partly in use on XP, for the "Fast user switching", remember the black screen you had with VNC after switching user)

- Session 0

|  |

|   ---- WinSta0 (interactive window station)

|  |   |

|   |  ---- Default (desktop)

|  |   |

|   |   ---- Disconnect (desktop)

|  |   |

|   |   ---- Winlogon (desktop)

|   |

|   ---- winvnc Service (non-interactive window station)

|   |   |

|   |   ---- Default (desktop)

|   |

- Session 1

|  |

|   ---- WinSta0 (interactive window station)

|   |   |

|   |   ---- Default (desktop)(1**)

|   |   |

|   |   ---- Disconnect (desktop)

|   |   |

|   |   ---- Winlogon (desktop)

|   |

- Session 2

| |

| ---- WinSta0 (interactive window station)

| | |

| | ---- Default (desktop)

|

| | ---- Disconnect (desktop)

| |   |

| | ---- Winlogon (desktop)  (2**)

The service need to check the console desktop and session.
If the console desktop is (1**) the service need to start winvnc_app in session1 on the default desktop, the default desktop is the normal desktop where your application run on.
If the console desktop is (2**) the service need to start winvnc_app in session2 on the winlogon desktop, this is the secure desktop used to logon.
To avoid access problems, you best start the winvnc_app with the same security context as the desktop he is started in.
Default Desktop --> user
Winlogon Desktop -> local system
Createprocessasuser() allow the service to start the exe in the correct security context.

This method would be a complete solution to support Fast user switching and access on PC's running RDP. But Vista has other nasty tricks to prevent applications to control a desktop.

Vista Challenge II (elevation and UAC)
Security elevation
From previous MS OS's you know that permissions where based on users. If you logged on as administrator, you could simple click on an executable to start it. As normal user, you needed execute permission on that executable.
In Vista applications have a "security elevation".
Low: Iexplorere started as administrator runs in low security elevation, this block iexplorer access to many system sources and applications.
Normal: A standard application, word pad, run in normal elevation.
High: For system utilities, like service manager..
The elevation block some interaction from lower elevated application to higher. For Vnc the most important is that sendinput() is blocked. You can't control an application running in higher elevation then the elevation winvnc is running.
If you start the service manager from within VNC, VNC mouse clicks get locked by the elevated "service manager" application.
If the remote users minimize the "service manager" you have full access again, but remote you are blocked.

UAC
In older OS version you could simple start a "system application" with a double click, in Vista the UAC jumps in. The UAC popup a "OK" window in the secure desktop, he temporal switch to the winlogon desktop and ask your permission to execute that program.
The problem for VNC is that your winvnc_app running in the default desktop has no permission to access the winlogon desktop, remote the whole desktop lock and you need to ask the remote user the press the ok button to continue.

Solution II
UAC problem can be solved by restarting the winvnc_app in the winlogon desktop, to press OK, and the restarting it again in the default desktop.
Great, but now VNC lock because the "system app" has focus and sendinput() is locked because it run in "high" elevation.
No problem, should you think, we just add a manifest to the winvnc_app and tell that it need to start in "high" elevation, then it can control all application. ( elevation high has access to all elevation >=high)
This works, when you manual click on the winvnc_app.exe, it popup the UAC and you press OK, but when you start it from the service you get a permission denied, CreateprocessAsUser(CPAU) is not allowed to start elevated application......

Don't play with the manifest, the only way is to play with the token passed to CPAU and pass the full elevated token, then winvnc_app start elevated and you have access.

Vista Challenge II ( Ctrl-alt-del)
In previous OS's you could send a message from a service in the winlogon desktop to simulate the CAD sequence...
PostMessage(HWND_BROADCAST,WM_HOTKEY,0,MAKELPARAM(MOD_ALT|MOD_CONTROL,VK_DELETE));
This does not work in Vista....

Solution III
We are testing, it has to be possible, the osk (on screen keyboard) can simulate the sequence. The osk use undocumented functions, the "winlogon IPC API"...
As workaround, you can use the on screen keyboard. When you press the left/down icon it popup the keyboard and you can that to simulate CAD...
Problem solved , Ctrl-Alt-Del can be made with a separate exe "cad.exe"

分享到:
评论

相关推荐

    Vista按钮样式.rar

    Vista按钮样式是这种风格的一部分,特点是圆润的边缘、光泽效果和状态变化的过渡动画。 2. **易语言编程**:易语言是一种面向对象的、简单的中文编程语言,旨在降低编程的门槛。源码可能包含易语言的类、函数或方法...

    new windows vista apis

    《新视窗Vista API详解》 Windows Vista作为微软公司推出的全新操作系统,引入了一系列创新...理解并熟练运用这些API,不仅可以提升软件的性能和用户体验,还能确保软件在Windows Vista及后续版本中的兼容性和稳定性。

    VISTA图标IP包

    "VISTA图标IP包"是一个专门包含Windows Vista操作系统风格...不过,需要注意的是,随着时间的推移,设计趋势会变化,尽管Vista风格的图标曾经流行,现在可能需要考虑更现代的设计风格,以满足当前用户的需求和审美。

    Vistadrive

    在Windows Vista系统中,用户可能会遇到磁盘空间管理的问题,Vistadrive通过增强的可视化方式帮助用户更有效地监控和管理他们的硬盘空间。 这款软件的独特之处在于它的界面设计。传统的Windows资源管理器虽然可以...

    vista风格的日历

    【标题】"Vista风格的日历"是一种设计样式,它借鉴了微软Windows Vista操作系统中的视觉效果和用户体验元素。在编程领域,尤其是GUI(图形用户界面)设计,这种风格的实现通常涉及平滑的边角、透明度效果、玻璃质感...

    Vista_黑夜精灵桌面主题 For Xp

    在实际应用中,"Vista_黑夜精灵桌面主题"可能会包含以下组成部分: 1. **壁纸**:这是桌面的背景图像,通常与主题的主色调和设计风格保持一致。 2. **窗口边框和按钮**:这些元素会改变窗口的外观,包括标题栏、...

    windows vista壁纸更换

    在Windows Vista操作系统中,用户界面的一个显著变化是其引入了更为现代化和美观的视觉效果,包括高分辨率的壁纸。然而,相较于Windows XP,Vista默认并未提供壁纸自动更换的功能,这可能让一些习惯于XP系统中这个...

    七色很好看的Vista鼠标指针,适用XP、MAC、VISTA操作系统。Vista鼠标指针

    【标题】中的“七色很好看的Vista鼠标指针”指的是这是一款设计精美、具有七种颜色变化的鼠标指针主题,源自Windows Vista操作系统的风格。Vista系统以其独特的Aero界面设计著称,这款鼠标指针可能也融入了类似的...

    vista风格圆形文本框

    Vista系统中的水晶效果以其高光和折射著称,圆形水晶文本框可能具有类似3D的边框,边缘带有微妙的光泽变化,为用户界面增添了一份奢华和科技感。这种设计不仅美观,还能吸引用户的注意力,使文本框成为界面的焦点。 ...

    vista 风格按钮Flash 源码插件

    描述中的“vista风格按钮Flash源码插件”进一步强调了这个工具的核心功能,即为Flash项目提供与Windows Vista系统中使用的按钮样式相一致的图形和动画效果。这通常包括平滑的渐变、高光以及鼠标悬停和点击时的反馈...

    VISTA系统下USB驱动的安装说明.doc

    在Windows Vista操作系统中,安装USB驱动程序的过程可能会与其它Windows版本略有不同,因为Vista引入了一些安全特性,如Device Driver Signing Policy,这可能会影响到驱动的安装。以下是对Vista系统下USB驱动安装的...

    QT vista style 源码

    在实际应用中,开发者可以将这个Vista风格源码作为一个库来使用,只需在自己的Qt项目中导入并应用此风格,就能让应用程序具有Vista风格的外观。这对于那些希望保持与Windows Vista用户界面一致性,或者简单地想要...

    C# 写的Vista按钮的皮肤控件。。

    此外,可能还包含了对鼠标事件的支持,如鼠标进入、离开、单击等,以及可能的动画效果,如按下时的变形或颜色变化,这些都是Vista按钮的典型特征。 综上所述,这个C#编写的Vista按钮皮肤控件提供了一种简单易用的...

    VISTA硬盘图标(精美)

    在Windows Vista中,这些图标不仅在外观上有变化,还支持透明效果,这得益于Aero Glass界面的一部分,该界面是Vista的一大特色,为用户界面带来了玻璃般透明和动态的视觉效果。此外,Vista的图标设计也注重与操作...

    vista透明效果小工具

    而"**Redraw.exe**"可能是程序中负责屏幕重绘的部分,当用户进行窗口操作或者任务栏变化时,这个组件会确保透明效果的即时更新,保证用户界面的平滑和流畅。屏幕重绘是一个关键的性能优化环节,尤其是在处理动态透明...

    vista文件夹图标

    在Windows Vista中,文件夹图标的变化不仅仅是美学上的提升,还伴随着操作系统的其他改进。例如,Aero特效提供了半透明效果和动态窗口缩放,这些都与新的图标设计相辅相成,共同提升了用户体验。此外,Vista的搜索...

    WINDOWS XP下的VISTA声音集

    Vista是微软在Windows XP之后发布的一个操作系统,其声音设计相比XP有了显著的变化,更现代且具有更高的音质。 描述中的“很好很实用,值得下载”意味着这套声音集不仅质量上乘,而且对用户来说具有实际价值。用户...

    xptovista操作系统转换主题包

    Vista的图标设计更为细腻,颜色更丰富,主题包会将这些图标应用到XP系统中,使得文件、文件夹、程序等图标都呈现出Vista的风格。 登录屏幕的转换同样重要,它是用户每次启动电脑时最先看到的部分。Vista的登录界面...

    vista系统兼容性问题解决方法

    Vista系统兼容性问题主要指的是在Windows Vista操作系统中,某些应用程序或者硬件设备可能无法像在其他Windows版本中那样顺利运行。这通常是由于Vista引入了一些新的安全特性,如用户账户控制(UAC)以及对旧版API的...

    绚丽的网页vista风格的标题栏

    4. **交互设计**:Vista风格的标题栏往往结合了动态效果,如鼠标悬停时的颜色变化、按钮按下时的反馈等,这些微交互提升了用户的操作感知。 5. **响应式设计**:随着移动设备的普及,一个好的标题栏设计需要具备...

Global site tag (gtag.js) - Google Analytics