Translated ['src/pentesting-cloud/aws-security/aws-privilege-escalation/

This commit is contained in:
Translator
2025-10-23 15:00:36 +00:00
parent 89019a3a65
commit f1d7e0a79b
12 changed files with 865 additions and 367 deletions

View File

@@ -4,7 +4,7 @@
## Lambda
For more information check:
詳細は次を参照してください:
{{#ref}}
../../aws-services/aws-lambda-enum.md
@@ -12,13 +12,19 @@ For more information check:
### Exfilrtate Lambda Credentials
Lambda は実行時に環境変数を使って credentials を注入します。もしそれらにアクセスできれば(`/proc/self/environ` を読む、または脆弱な関数自体を利用するなどして)、自分で用できます。これらはデフォルトの変数名 `AWS_SESSION_TOKEN``AWS_SECRET_ACCESS_KEY``AWS_ACCESS_KEY_ID` に格納されています。
Lambda はランタイムで環境変数を使用して資格情報を注入します。もしそれらにアクセスできれば(`/proc/self/environ` を読み取るか、脆弱な関数自体を利用することで)、自分でそれらを使用できます。`AWS_SESSION_TOKEN``AWS_SECRET_ACCESS_KEY``AWS_ACCESS_KEY_ID` というデフォルトの変数名に格納されています。
By default, these will have access to write to a cloudwatch log group (the name of which is stored in `AWS_LAMBDA_LOG_GROUP_NAME`), as well as to create arbitrary log groups, however lambda functions frequently have more permissions assigned based on their intended use.
デフォルトでは、これらの資格情報は cloudwatch のロググループに書き込み権限(ロググループ名は `AWS_LAMBDA_LOG_GROUP_NAME` に保存されていますおよび任意のロググループを作成する権限を持ちます。ただし、lambda functions は用途に応じてより多くの権限が割り当てられていることがよくあります。
### `lambda:Delete*`
lambda:Delete* 権限が付与された攻撃者は、Lambda functions、versions/aliases、layers、event source mappings およびその他の関連構成を削除できます。
```bash
aws lambda delete-function \
--function-name <LAMBDA_NAME>
```
### Steal Others Lambda URL Requests
If an attacker somehow manage to get RCE inside a Lambda he will be able to steal other users HTTP requests to the lambda. If the requests contain sensitive information (cookies, credentials...) he will be able to steal them.
もし攻撃者が何らかの方法で Lambda の内部で RCE を獲得すると、他のユーザが Lambda に送る HTTP リクエストを盗むことができます。リクエストに機密情報(cookiescredentials...)が含まれている場合、それらを窃取できます。
{{#ref}}
aws-warm-lambda-persistence.md
@@ -26,7 +32,7 @@ aws-warm-lambda-persistence.md
### Steal Others Lambda URL Requests & Extensions Requests
Abusing Lambda Layers it's also possible to abuse extensions and persist in the lambda but also steal and modify requests.
Lambda Layers を悪用すると、extensions を悪用して Lambda 内に永続化し、リクエストを盗んだり改変したりすることも可能です。
{{#ref}}
../../aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
@@ -34,7 +40,7 @@ Abusing Lambda Layers it's also possible to abuse extensions and persist in the
### AWS Lambda VPC Egress Bypass
Force a Lambda function out of a restricted VPC by updating its configuration with an empty VpcConfig (SubnetIds=[], SecurityGroupIds=[]). The function will then run in the Lambda-managed networking plane, regaining outbound internet access and bypassing egress controls enforced by private VPC subnets without NAT.
空の VpcConfig (SubnetIds=[], SecurityGroupIds=[]) に設定を更新して、制限された VPC から Lambda 関数を強制的に外へ出すことができます。関数は Lambda 管理のネットワークプレーンで実行され、アウトバウンドのインターネットアクセスを回復し、NAT なしのプライベート VPC サブネットが課すイグレス制御を回避します。
{{#ref}}
aws-lambda-vpc-egress-bypass.md
@@ -42,7 +48,7 @@ aws-lambda-vpc-egress-bypass.md
### AWS Lambda Runtime Pinning/Rollback Abuse
Abuse `lambda:PutRuntimeManagementConfig` to pin a function to a specific runtime version (Manual) or freeze updates (FunctionUpdate). This preserves compatibility with malicious layers/wrappers and can keep the function on an outdated, vulnerable runtime to aid exploitation and long-term persistence.
`lambda:PutRuntimeManagementConfig` を悪用して関数を特定のランタイムバージョンにピンManualしたり、更新を凍結FunctionUpdateしたりできます。これにより悪意あるレイヤー/ラッパーとの互換性が維持され、関数を古く脆弱なランタイムに留めて悪用や長期的な永続化を助ける可能性があります。
{{#ref}}
aws-lambda-runtime-pinning-abuse.md
@@ -50,7 +56,7 @@ aws-lambda-runtime-pinning-abuse.md
### AWS Lambda Log Siphon via LoggingConfig.LogGroup Redirection
Abuse `lambda:UpdateFunctionConfiguration` advanced logging controls to redirect a functions logs to an attacker-chosen CloudWatch Logs log group. This works without changing code or the execution role (most Lambda roles already include `logs:CreateLogGroup/CreateLogStream/PutLogEvents` via `AWSLambdaBasicExecutionRole`). If the function prints secrets/request bodies or crashes with stack traces, you can collect them from the new log group.
`lambda:UpdateFunctionConfiguration` の高度なログ制御を悪用して、関数のログを攻撃者が指定した CloudWatch Logs log group にリダイレクトできます。これはコードや実行ロールを変更せずに機能します(ほとんどの Lambda ロールは `AWSLambdaBasicExecutionRole` 経由で `logs:CreateLogGroup/CreateLogStream/PutLogEvents` を既に含んでいます)。関数がシークレットやリクエストボディを出力したり、スタックトレースでクラッシュした場合は、新しいロググループからそれらを収集できます。
{{#ref}}
aws-lambda-loggingconfig-redirection.md
@@ -58,7 +64,7 @@ aws-lambda-loggingconfig-redirection.md
### AWS - Lambda Function URL Public Exposure
Turn a private Lambda Function URL into a public unauthenticated endpoint by switching the Function URL AuthType to NONE and attaching a resource-based policy that grants lambda:InvokeFunctionUrl to everyone. This enables anonymous invocation of internal functions and can expose sensitive backend operations.
Function URL AuthType NONE に切り替え、lambda:InvokeFunctionUrl を全員に付与するリソースベースポリシーをアタッチすることで、プライベートな Lambda Function URL を公開の未認証エンドポイントに変更できます。これにより内部関数の匿名呼び出しが可能になり、機密なバックエンド処理が露出する恐れがあります。
{{#ref}}
aws-lambda-function-url-public-exposure.md
@@ -66,7 +72,7 @@ aws-lambda-function-url-public-exposure.md
### AWS Lambda Event Source Mapping Target Hijack
Abuse `UpdateEventSourceMapping` to change the target Lambda function of an existing Event Source Mapping (ESM) so that records from DynamoDB Streams, Kinesis, or SQS are delivered to an attacker-controlled function. This silently diverts live data without touching producers or the original function code.
`UpdateEventSourceMapping` を悪用して既存の Event Source Mapping (ESM) のターゲット Lambda 関数を変更し、DynamoDB StreamsKinesis、または SQS からのレコードを攻撃者管理下の関数へ配信させることができます。これによりプロデューサや元の関数コードに触れずにライブデータを密かに転用できます。
{{#ref}}
aws-lambda-event-source-mapping-hijack.md
@@ -74,7 +80,7 @@ aws-lambda-event-source-mapping-hijack.md
### AWS Lambda EFS Mount Injection data exfiltration
Abuse `lambda:UpdateFunctionConfiguration` to attach an existing EFS Access Point to a Lambda, then deploy trivial code that lists/reads files from the mounted path to exfiltrate shared secrets/config that the function previously couldnt access.
`lambda:UpdateFunctionConfiguration` を悪用して既存の EFS Access Point Lambda にアタッチし、マウントされたパスからファイルを列挙/読み取る簡単なコードをデプロイして、関数が以前はアクセスできなかった共有シークレットや設定を外部へ持ち出すことができます。
{{#ref}}
aws-lambda-efs-mount-injection.md