AWS - DataPipeline, CodePipeline & CodeCommit Enum
Reading time: 4 minutes
tip
AWS 해킹 배우기 및 연습하기:HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 배우기 및 연습하기: HackTricks Training GCP Red Team Expert (GRTE)
Azure 해킹 배우기 및 연습하기:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks 지원하기
- 구독 계획 확인하기!
- **💬 Discord 그룹 또는 텔레그램 그룹에 참여하거나 Twitter 🐦 @hacktricks_live를 팔로우하세요.
- HackTricks 및 HackTricks Cloud 깃허브 리포지토리에 PR을 제출하여 해킹 트릭을 공유하세요.
DataPipeline
AWS Data Pipeline은 대규모 데이터의 접근, 변환 및 효율적인 전송을 용이하게 하기 위해 설계되었습니다. 다음과 같은 작업을 수행할 수 있습니다:
- 데이터가 저장된 위치에서 접근: 다양한 AWS 서비스에 저장된 데이터에 원활하게 접근할 수 있습니다.
- 대규모에서 변환 및 처리: 대규모 데이터 처리 및 변환 작업이 효율적으로 처리됩니다.
- 결과를 효율적으로 전송: 처리된 데이터는 다음을 포함한 여러 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>
참고 문헌
tip
AWS 해킹 배우기 및 연습하기:HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 배우기 및 연습하기: HackTricks Training GCP Red Team Expert (GRTE)
Azure 해킹 배우기 및 연습하기:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks 지원하기
- 구독 계획 확인하기!
- **💬 Discord 그룹 또는 텔레그램 그룹에 참여하거나 Twitter 🐦 @hacktricks_live를 팔로우하세요.
- HackTricks 및 HackTricks Cloud 깃허브 리포지토리에 PR을 제출하여 해킹 트릭을 공유하세요.