AWS - DataPipeline, CodePipeline & CodeCommit Enum

支持 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

它是一个版本控制服务,由亚马逊托管和完全管理,可用于私密存储数据(文档、二进制文件、源代码)并在云中管理它们。

消除了用户需要了解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