AWS - DataPipeline, CodePipeline & CodeCommit Enum

从零开始学习AWS黑客技术,成为专家 htARTE(HackTricks AWS红队专家)

支持HackTricks的其他方式:

DataPipeline

AWS Data Pipeline旨在促进大规模数据的访问、转换和高效传输。它允许执行以下操作:

  1. 访问存储数据的位置:可以无缝访问存储在各种AWS服务中的数据。

  2. 大规模转换和处理:高效处理大规模数据处理和转换任务。

  3. 高效传输结果:处理后的数据可以高效地传输到多个AWS服务,包括:

  • Amazon S3

  • Amazon RDS

  • Amazon DynamoDB

  • Amazon EMR

实质上,AWS Data Pipeline简化了在不同AWS计算和存储服务以及指定时间间隔内在本地数据源之间移动和处理数据的流程。

枚举

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>

提权

您可以查看以下页面,了解如何滥用datapipeline权限以提升特权

AWS - Datapipeline Privesc

CodePipeline

AWS CodePipeline是一个完全托管的持续交付服务,可帮助您自动化发布流水线,实现快速可靠的应用程序和基础设施更新。CodePipeline根据您定义的发布模型,每次代码更改时自动化执行发布流程的构建、测试和部署阶段

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>

提权

您可以查看以下页面,了解如何滥用 codepipeline 权限以提升特权

AWS - Codepipeline Privesc

CodeCommit

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

消除了用户需要了解 Git 和管理自己的源代码控制系统或担心扩展或缩减基础架构的要求。Codecommit 支持 Git 中可以找到的所有标准功能,这意味着它可以轻松与用户当前基于 Git 的工具配合使用。

枚举

# 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>

参考

从零开始学习AWS黑客技术,成为专家 htARTE(HackTricks AWS红队专家)

支持HackTricks的其他方式:

Last updated