You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
Azure Devops Server 2022.0.1
Operation system
windows server 2022 /2019/2016
Question
hi
recently we faced a new problem and our antivirus blocked the Winrm iis web management task in a remote machine.
I look into the extension (https://github.com/microsoft/azure-pipelines-extensions/tree/master/Extensions/IISWebAppDeploy/Src/Tasks/IISWebAppMgmt/IISWebAppMgmtV3) and understand the reasons of the block is Invoke-expression command that exists inside on of the PowerShell in extension files.
now I wanna know, why that just happened.
What's the problem?why AV must block this command?is it a risky command for Windows?NOTICE: the brand of our AN is BitDefenderNOTICE: our BitDefender use AMSI of the windows
The text was updated successfully, but these errors were encountered:
Hi @Am-Na-D
Generally, your defender identifies the potential vulnerability correctly.
The use of Invoke-Expression in PowerShell can be risky, particularly when incorporating unsanitized user input:
# Simulated user input that includes an injection attempt$userInput="Get-Date && Remove-Item -Path C:\SensitiveFile -Force"# Dangerous use of Invoke-Expression with user inputInvoke-Expression"Write-Output 'The current date is: ';$userInput"
As the example shows, the command executed by Invoke-Expression might contain some malicious command, attaches via && operator. So, it's not recommended to use Invoke-Expression.
From our side we're trying to minimize its usage as much as we can. Also, we have built in sanitization for commands, we're executing, which prevents potential code injections.
Hope I answered your question😊
If you don't have any other questions - feel free to close this issue.
Extension name
Winrm IIS Web App Management
Extension version
3.*
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
Azure Devops Server 2022.0.1
Operation system
windows server 2022 /2019/2016
Question
The text was updated successfully, but these errors were encountered: