dmaasland / proxyshell-poc

378 stars 109 forks source link

Get shell but unable to execute any commands #11

Closed jsdhasfeds closed 3 years ago

jsdhasfeds commented 3 years ago

Hi,

Thank you for your effort writing this POC!

However, when I try this against Exchange Server 2019 CU 8 I get a shell but no commands work. If I try executing "whoami" the error I get is "The term 'whoami.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again". If I try checking if constrained language mode is enabled using "$ExecutionContext.SessionState.LanguageMode" I get the error "A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null.". This reply is strange since I have double checked if constrained language mode is enabled on the Exchange server and it is not.

See the attached picture for more information.

error

Is there anything I can do to fix this?

Thanks!

antonbek89 commented 3 years ago

Hi

Did you success run command ?

I have same issue here