mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-06 04:41:21 -08:00
Translated ['src/pentesting-cloud/aws-security/aws-post-exploitation/aws
This commit is contained in:
@@ -111,6 +111,7 @@
|
||||
- [GCP - Add Custom SSH Metadata](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-compute-privesc/gcp-add-custom-ssh-metadata.md)
|
||||
- [GCP - Composer Privesc](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-composer-privesc.md)
|
||||
- [GCP - Container Privesc](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-container-privesc.md)
|
||||
- [GCP - Dataproc Privesc](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-dataproc-privesc.md)
|
||||
- [GCP - Deploymentmaneger Privesc](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-deploymentmaneger-privesc.md)
|
||||
- [GCP - IAM Privesc](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-iam-privesc.md)
|
||||
- [GCP - KMS Privesc](pentesting-cloud/gcp-security/gcp-privilege-escalation/gcp-kms-privesc.md)
|
||||
@@ -161,6 +162,7 @@
|
||||
- [GCP - VPC & Networking](pentesting-cloud/gcp-security/gcp-services/gcp-compute-instances-enum/gcp-vpc-and-networking.md)
|
||||
- [GCP - Composer Enum](pentesting-cloud/gcp-security/gcp-services/gcp-composer-enum.md)
|
||||
- [GCP - Containers & GKE Enum](pentesting-cloud/gcp-security/gcp-services/gcp-containers-gke-and-composer-enum.md)
|
||||
- [GCP - Dataproc Enum](pentesting-cloud/gcp-security/gcp-services/gcp-dataproc-enum.md)
|
||||
- [GCP - DNS Enum](pentesting-cloud/gcp-security/gcp-services/gcp-dns-enum.md)
|
||||
- [GCP - Filestore Enum](pentesting-cloud/gcp-security/gcp-services/gcp-filestore-enum.md)
|
||||
- [GCP - Firebase Enum](pentesting-cloud/gcp-security/gcp-services/gcp-firebase-enum.md)
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
`fileb://` 및 `file://`는 AWS CLI 명령에서 로컬 파일의 경로를 지정하는 데 사용되는 URI 스킴입니다:
|
||||
|
||||
- `fileb://:` 이진 모드로 파일을 읽습니다. 일반적으로 비텍스트 파일에 사용됩니다.
|
||||
- `file://:` 텍스트 모드로 파일을 읽습니다. 일반적으로 일반 텍스트 파일, 스크립트 또는 특별한 인코딩 요구 사항이 없는 JSON에 사용됩니다.
|
||||
- `fileb://:` 파일을 이진 모드로 읽습니다. 일반적으로 비텍스트 파일에 사용됩니다.
|
||||
- `file://:` 파일을 텍스트 모드로 읽습니다. 일반적으로 일반 텍스트 파일, 스크립트 또는 특별한 인코딩 요구 사항이 없는 JSON에 사용됩니다.
|
||||
|
||||
> [!TIP]
|
||||
> 파일 내의 데이터를 복호화하려면 파일이 base64로 인코딩된 데이터가 아닌 이진 데이터를 포함해야 합니다. (fileb://)
|
||||
@@ -62,7 +62,7 @@ aws kms decrypt \
|
||||
|
||||
KMS에 대한 권한이 있는 공격자는 키의 KMS 정책을 수정하고 **자신의 계정에 대한 액세스를 부여**하여 정당한 계정에 부여된 액세스를 제거할 수 있습니다.
|
||||
|
||||
그런 다음, 정당한 계정 사용자는 해당 키로 암호화된 서비스의 정보에 접근할 수 없게 되어 계정에 대한 쉽지만 효과적인 랜섬웨어가 생성됩니다.
|
||||
그런 다음, 정당한 계정 사용자는 이러한 키로 암호화된 서비스의 정보에 접근할 수 없게 되어 계정에 대한 쉽지만 효과적인 랜섬웨어가 생성됩니다.
|
||||
|
||||
> [!WARNING]
|
||||
> **AWS 관리 키는** 이 공격의 영향을 받지 않으며, **고객 관리 키만** 영향을 받습니다.
|
||||
@@ -92,22 +92,22 @@ aws kms put-key-policy --key-id mrk-c10357313a644d69b4b28b88523ef20c \
|
||||
}
|
||||
```
|
||||
> [!CAUTION]
|
||||
> 정책을 변경하고 외부 계정에만 액세스를 부여하면, 이 외부 계정에서 **원래 계정으로 액세스를 다시 부여하는 새로운 정책을 설정하려고 해도 할 수 없습니다**.
|
||||
> Note that if you change that policy and only give access to an external account, and then from this external account you try to set a new policy to **원래 계정에 대한 액세스를 다시 제공하려고 하면, Put Policy 작업은 교차 계정에서 수행할 수 없기 때문에 할 수 없습니다**.
|
||||
|
||||
<figure><img src="../../../images/image (77).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### 일반 KMS 랜섬웨어
|
||||
### Generic KMS Ransomware
|
||||
|
||||
#### 글로벌 KMS 랜섬웨어
|
||||
#### Global KMS Ransomware
|
||||
|
||||
글로벌 KMS 랜섬웨어를 수행하는 또 다른 방법이 있으며, 다음 단계를 포함합니다:
|
||||
There is another way to perform a global KMS Ransomware, which would involve the following steps:
|
||||
|
||||
- 공격자가 가져온 **키 자료로 새 키를 생성**
|
||||
- 이전 버전으로 암호화된 **구 데이터를 새 키로 재암호화**
|
||||
- Create a new **key with a key material** imported by the attacker
|
||||
- **이전 버전으로 암호화된 오래된 데이터 재암호화** 새로운 것으로.
|
||||
- **KMS 키 삭제**
|
||||
- 이제 원래 키 자료를 가진 공격자만 암호화된 데이터를 복호화할 수 있습니다.
|
||||
- Now only the attacker, who has the original key material could be able to decrypt the encrypted data
|
||||
|
||||
### 키 파괴
|
||||
### Destroy keys
|
||||
```bash
|
||||
# Destoy they key material previously imported making the key useless
|
||||
aws kms delete-imported-key-material --key-id 1234abcd-12ab-34cd-56ef-1234567890ab
|
||||
|
||||
Reference in New Issue
Block a user