UJP - 技術情報2 バックアップ : PowerShell/ConstrainedLanguage の変更点

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

1: 2020-02-10 (月) 23:31:16 nobuaki ソース バックアップ No.1 を復元して編集 現: 2020-02-11 (火) 00:03:27 nobuaki ソース 編集
Line 14: Line 14:
 Hello World🈁  Hello World🈁
 PS C:\Users\ujpadmin>  PS C:\Users\ujpadmin>
 + 
 表示された.  表示された.
Line 45: Line 45:
     + CategoryInfo          : InvalidOperation: (:) []、RuntimeException      + CategoryInfo          : InvalidOperation: (:) []、RuntimeException
     + FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage      + FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
 + 
 PS C:\Users\ujpadmin>  PS C:\Users\ujpadmin>
Line 60: Line 60:
     + CategoryInfo          : InvalidOperation: (:) []、RuntimeException      + CategoryInfo          : InvalidOperation: (:) []、RuntimeException
     + FullyQualifiedErrorId : PropertySetterNotSupportedInConstrainedLanguage      + FullyQualifiedErrorId : PropertySetterNotSupportedInConstrainedLanguage
 + 
 PS C:\Users\ujpadmin>  PS C:\Users\ujpadmin>
Line 66: Line 66:
 でも良く見れば分かる通り,これはSessionState,セッション毎の設定なので,新しくWindows PowerShellを起動すれば,FullLanguageに戻る.  でも良く見れば分かる通り,これはSessionState,セッション毎の設定なので,新しくWindows PowerShellを起動すれば,FullLanguageに戻る.
 +
 +**何が制限されるのか [#jcc0d647]
 +
 + 何が許されて何が制限されるのか,よくわからないので,以下のドキュメントを簡単に和訳しながら,理解していこうと思う.
 +
 +
 +PowerShell Constrained Language Mode
 +https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/
 +
 +
 +-PowerShell module script files must explicitly export functions by name without the use of wildcard characters.
 +--PowerShellモジュールスクリプトファイルは、ワイルドカード文字を使用せずに関数を名前で明示的にエクスポートする必要があります。
 +--This is to prevent inadvertently exposing powerful helper function not meant to be used publicly.
 +---これは、公的に使用されることを意図していない強力なヘルパー機能を誤って公開することを防ぐためです。
 +-PowerShell module manifest files must explicitly export functions by name without the use of wildcards.
 +--PowerShellモジュールマニフェストファイルは、ワイルドカードを使用せずに関数を名前で明示的にエクスポートする必要があります。
 +--Again, to prevent inadvertent exposure of functions.
 +---繰り返しますが、機能の不注意な露出を防ぐためです。
 +-COM objects are blocked.
 +--COMオブジェクトはブロックされます。
 +--They can expose Win32 APIs that have likely never been rigorously hardened as part of an attack surface.
 +---攻撃対象の一部として厳密に強化されたことのないWin32 APIを公開できます。
 +-Only approved .NET types are allowed.
 +--承認された.NETタイプだけは許されます。
 +--Many .NET types can be used to invoke arbitrary Win32 APIs. As a result only specific whitelisted types are allowed.
 +---多くの.NETタイプは、任意のWin32 APIを呼び出すのに用いられることができます。その結果、特定のホワイトリストされたタイプだけは許されます。
 +-Add-Type is blocked.
 +--Add-Typeは妨げられます。
 +--It allows the creation of arbitrary types defined in different languages.
 +---それは、任意のタイプの作成が異なる言語で定められるのを許します。
 +-The use of PowerShell classes are disallowed.
 +--PowerShellクラスの使用は、認められません。
 +--PowerShell classes are just arbitrary C# type definitions.
 +---PowerShellクラスは、ただ任意のC#タイプ定義です。
 +-PowerShell type conversion is not allowed.
 +--PowerShell型変換は、許されません。
 +--Type conversion implicitly creates types and runs type constructors.
 +---型変換は、暗黙のうちにタイプを構築して、タイプ建造者を立候補させます。
 +-Dot sourcing across language modes is disallowed.
 +--言語全体でモードを供給している点は、認められません。
 +--Dot sourcing a script file brings all functions, variables, aliases from that script into the current scope.
 +---スクリプト・ファイルを供給している点は、現在の範囲にそのスクリプトからすべての機能、変数、別名を持ってきます。
 +--So this blocks a trusted script from being dot sourced into an untrusted script and exposing all of its internal functions.
 +---それで、これは、信頼できないスクリプトに供給されて、その内部の機能の全てを露出させている点であることから、信頼されたスクリプトをブロックします。
 +--Similarly, an untrusted script is prevented from being dot sourced into a trusted script so that it cannot pollute the trusted scope.
 +---同様に、それが信頼された範囲を汚染することができないように、信頼できないスクリプトは信頼されたスクリプトに供給される点であるのを防がれます。
 +-Command resolution automatically hides commands you cannot run.
 +--司令部決定は、あなたが経営することができない司令部を自動的に隠します。
 +--For example, a function created in Constrained Language mode is not visible to script running in Full Language mode.
 +---たとえば、圧迫された言語モードで作成される機能は、完全な言語モードで動作しているスクリプトに見えません。
 +-XAML based workflows are blocked since they cannot be constrained by PowerShell.
 +--彼らがPowerShellによって束縛されることができないので、XAMLに拠点を置くワークフローは妨げられます。
 +--But script based workflows and trusted XAML based workflows shipped in-box are allowed.
 +---スクリプト・ベースのワークフローと信頼されたXAMLに拠点を置くワークフローがイン・ボックスを出荷したことは、許されます。
 +-The SupportedCommand parameter for Import-LocalizedData is disabled.
 +--輸入LocalizedDataのSupportedCommandパラメータは、使用不能です。
 +--It allows additional commands prevented by Constrained Language.
 +---それは、さらなる命令が圧迫された言語によって防がれるのを許します。
 +-Invoke-Expression cmdlet always runs in Constrained Language.
 +--Invoke-Expression cmdletは、常に圧迫された言語で動作します。
 +--Invoke-Expression cannot validate input as trusted.
 +---Invoke-Expressionは、信頼される入力を確認することができません。
 +-Set-PSBreakpoint command is blocked unless there is a system-wide lockdown through UMCI.
 +--システムに広がる監禁がUMCIを通してない限り、セットされたPSBreakpoint命令はブロックされます。
 +-Command completers are always run in Constrained Language.
 +--completersが常に代々起こられるという命令は、言語を束縛しました。
 +--Command completers are not validated as trustworthy.
 +---命令completersは、信頼できるように、確認されません。
 +-Commands and script run within the script debugger will always be run in Constrained Language if there is a system-wide lockdown.
 +--システムに広がる監禁があるならば、スクリプト・デバッガーの範囲内で動く命令とスクリプトは常に圧迫された言語で動きます。
 +-The DSC Configuration keyword is disabled.
 +--DSC構成キーワードは使用不能です。
 +-Supported commands and Statements are not allowed in script DATA sections.
 +--サポートされたコマンドと声明は、スクリプトDATA部で許されません。
 +-Start-Job is unavailable if the system is not locked-down.
 +--システムがロックされないで下でないならば、スタート-の仕事は利用できません。
 +--Start-Job starts PowerShell in a new process and if the system is not locked-down the new process runs in Full Language mode.
 +---スタート-の仕事は新しいプロセスにPowerShellを始めます、そして、システムがロックされないで下でないならば、新しいプロセスは完全な言語モードで動作します。
 +
 + んー.直訳してそのまま載せたら,ちょっと意味わからんな.


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom
Counter: 4126, today: 1, yesterday: 8

広告スペース
Google