AWS - DataPipeline, CodePipeline & CodeCommit Enum

Support HackTricks

DataPipeline

AWS Data Pipelineは、データのアクセス、変換、および効率的な転送を大規模に促進するように設計されています。以下の操作を実行できます:

  1. データが保存されている場所にアクセス: 様々なAWSサービスに保存されているデータにシームレスにアクセスできます。

  2. 大規模での変換と処理: 大規模なデータ処理と変換タスクが効率的に処理されます。

  3. 結果を効率的に転送: 処理されたデータは、以下の複数のAWSサービスに効率的に転送できます:

  • Amazon S3

  • Amazon RDS

  • Amazon DynamoDB

  • Amazon EMR

本質的に、AWS Data Pipelineは、指定された間隔で異なるAWSコンピューティングおよびストレージサービス、ならびにオンプレミスのデータソース間でのデータの移動と処理を合理化します。

Enumeration

aws datapipeline list-pipelines
aws datapipeline describe-pipelines --pipeline-ids <ID>
aws datapipeline list-runs --pipeline-id <ID>
aws datapipeline get-pipeline-definition --pipeline-id <ID>

Privesc

次のページでは、datapipelineの権限を悪用して特権を昇格させる方法を確認できます:

CodePipeline

AWS CodePipelineは、継続的デリバリーサービスを完全に管理されたもので、リリースパイプラインを自動化して、迅速かつ信頼性の高いアプリケーションおよびインフラストラクチャの更新を支援します。CodePipelineは、リリースモデルに基づいて、コード変更があるたびにリリースプロセスのビルド、テスト、デプロイフェーズを自動化します。

Enumeration

aws codepipeline list-pipelines
aws codepipeline get-pipeline --name <pipeline_name>
aws codepipeline list-action-executions --pipeline-name <pl_name>
aws codepipeline list-pipeline-executions --pipeline-name <pl_name>
aws codepipeline list-webhooks
aws codepipeline get-pipeline-state --name <pipeline_name>

Privesc

次のページでは、codepipelineの権限を悪用して特権を昇格させる方法を確認できます:

CodeCommit

これは、Amazonによってホストされ完全に管理されているバージョン管理サービスであり、データ(文書、バイナリファイル、ソースコード)をプライベートに保存し、クラウドで管理するために使用できます。

ユーザーがGitを知っている必要がなく、自分のソース管理システムを管理することや、インフラをスケールアップまたはダウンすることを心配する必要がなくなります。Codecommitは、Gitに見られるすべての標準的な機能をサポートしており、ユーザーの現在のGitベースのツールと問題なく連携します。

Enumeration

# Repos
aws codecommit list-repositories
aws codecommit get-repository --repository-name <name>
aws codecommit get-repository-triggers --repository-name <name>
aws codecommit list-branches --repository-name <name>
aws codecommit list-pull-requests --repository-name <name>

# Approval rules
aws codecommit list-approval-rule-templates
aws codecommit get-approval-rule-template --approval-rule-template-name <name>
aws codecommit list-associated-approval-rule-templates-for-repository --repository-name <name>

# Get & Put files
## Get a file
aws codecommit get-file --repository-name backend-api --file-path app.py
## Put a file
aws codecommit get-branch --repository-name backend-api --branch-name master
aws codecommit put-file --repository-name backend-api --branch-name master --file-content fileb://./app.py --file-path app.py --parent-commit-id <commit-id>

# SSH Keys & Clone repo
## Get codecommit keys
aws iam list-ssh-public-keys #User keys for CodeCommit
aws iam get-ssh-public-key --user-name <username> --ssh-public-key-id <id> --encoding SSH #Get public key with metadata
# The previous command will give you the fingerprint of the ssh key
# With the next command you can check the fingerprint of an ssh key and compare them
ssh-keygen -f .ssh/id_rsa -l -E md5

# Clone repo
git clone ssh://<SSH-KEY-ID>@git-codecommit.<REGION>.amazonaws.com/v1/repos/<repo-name>

参考文献

HackTricksをサポートする

Last updated