Description
By default, App Services can be deployed over FTP. If FTP is required for an essential deployment workflow, FTPS should be required for FTP logins on all App Services.
If FTPS is not expressly required for the App, the recommended setting is Disabled.
Rationaleโ
FTP is an unencrypted network protocol that transmits data, including passwords, in clear text. The use of this protocol can lead to both data and credential compromise and can present opportunities for exfiltration, persistence, and lateral movement.
Impactโ
Any deployment workflows that rely on FTP or FTPS rather than the WebDeploy or HTTPS endpoints may be affected.
Auditโ
From Azure Portalโ
- Go to the Azure portal.
- Select
App Services. - Select an app.
- Select
Settingsand thenConfiguration. - Under
General Settings, inPlatform Settings, theFTP stateshould not be set toAll allowed.
From Azure CLIโ
List web apps to obtain the IDs:
az webapp list
List the publish profiles to obtain the username, password, and FTP server URL:
az webapp deployment list-publishing-profiles \
--ids {{app-service-ids}}
{
"publishUrl": "<URL_FOR_WEB_APP>",
"userName": "<USER_NAME>",
"userPWD": "<USER_PASSWORD>",
}
From PowerShellโ
List all Web Apps:
Get-AzWebApp
For each app:
Get-AzWebApp `
-ResourceGroupName {{resource-group-name}} `
-Name {{app-name}} |
Select-Object -ExpandProperty SiteConfig
In the output, look for the value of FtpsState. If its value is AllAllowed, the setting is out of compliance. Any other value is considered in compliance with this check.
From Azure Policyโ
If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure.
- Policy ID: 399b2637-a50f-4f95-96f8-3a145476eb15 - Name:
Function apps should require FTPS only - Policy ID: 4d24b6d4-5e53-4a4f-a7f4-618fa573ee4b - Name:
App Service apps should require FTPS only
Default Valueโ
By default, FTP-based deployment is All allowed.
Referencesโ
- https://docs.microsoft.com/en-us/azure/app-service/deploy-ftp
- https://docs.microsoft.com/en-us/azure/app-service/overview-security
- https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-4-encrypt-sensitive-information-in-transit
- https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities
- https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/create-or-update-configuration#ftpsstate