Чуть не забыл про обещание выложить ответ тех.поддержки по поводу проблематики, изложенной в Секреты Software Restriction Policies (часть 5). Вот какой я получил ответ от них:
Hello Vadims, My name is Rahul and I am from the Windows Core Team at GTSC. I have been looking at this case for the Software Restriction Policy. After some testing we have been able to recreate the behaviour that you are noticing: This seems to be by design. On the Explorer.exe side, everything seems to be running ok. We cannot launch the file types restricted via policy. This is because when ShellExecute comes into play, we enforce SRP policies. This is also true for the Windows Script Host, which does it's own checks apart from the shell. Specifically regarding mshta.exe, we have the following situation: - Since the shell is allowed to run lnk files, we do it ok; - Since there's a specific additional rule that will allow us to run anything located under %windir%\system32, the shell can't enforce any SRP policy, since lnk files can be run. - The shell starts mshta.exe, which, by its own, doesn't enforce the SRP policy, allowing the file to run. This behaviour is by design.
Hello Vadims,
My name is Rahul and I am from the Windows Core Team at GTSC. I have been looking at this case for the Software Restriction Policy.
After some testing we have been able to recreate the behaviour that you are noticing:
This seems to be by design. On the Explorer.exe side, everything seems to be running ok. We cannot launch the file types restricted via policy. This is because when ShellExecute comes into play, we enforce SRP policies. This is also true for the Windows Script Host, which does it's own checks apart from the shell. Specifically regarding mshta.exe, we have the following situation:
- Since the shell is allowed to run lnk files, we do it ok;
- Since there's a specific additional rule that will allow us to run anything located under %windir%\system32, the shell can't enforce any SRP policy, since lnk files can be run.
- The shell starts mshta.exe, which, by its own, doesn't enforce the SRP policy, allowing the file to run.
This behaviour is by design.
итого, мы имеем следующее: как выяснилось, политика SRP не очень плотно накладывается на систему и внешние приложения должны сами проверять открытие своих файлов на соответствие правилам SRP. Если мы запускаем файлы через ярлыки. Что с успехом делают cmd.exe, msiexec.exe и cmd.exe. Но такие приложения, как regedit.exe, mshta.exe, hh.exe, mmc.exe ничего не знают о существовании SRP и неспособны произвести такую проверку. Понятно, что это by design (в чём я и не сомневался), но какой-то не очень удачный design. Вот так.
Remember Me