I need help with a simple test case of executing a CLI command through PowerShell which has already been encoded in Base64.
Suppose Get-ChildItem has been converted in advance to Base64 string R2V0LUNoaWxkSXRlbQ==.
Further suppose I have a DOS CLI instance open, and I want to test executing this string in powershell:
C:>\ powershell.exe -enc R2V0LUNoaWxkSXRlbQ==
Run Code Online (Sandbox Code Playgroud)
However, I receive the following error:
The term '???????' is not recognized as the name of a cmdlet, function, script file, or operable …Run Code Online (Sandbox Code Playgroud) 我有一个关于 PS 如何缩写各种命令的问题,特别是在初始化 PS 会话时。
假设我们从 Windows DOS 提示符开始:
C:\> powershell -exec bypass
Run Code Online (Sandbox Code Playgroud)
我似乎注意到您还可以键入以下内容,但它似乎仍在运行:
C:\> powershell -execution bypass
C:\> powershell -exec by
C:\> powershell -exec b
Run Code Online (Sandbox Code Playgroud)
如果键入的内容足够独特以匹配已知的有效命令/选项/标志/参数,PowerShell 是否会“猜测”用户尝试运行的命令?如果有任何文献可以解释这里发生的事情,那将非常有帮助。谢谢!
powershell ×2