From 14e9d2c8b9bc5fa37ea7584a351fe4b652611922 Mon Sep 17 00:00:00 2001 From: Translator Date: Thu, 13 Feb 2025 09:54:35 +0000 Subject: [PATCH] Translated ['src/pentesting-cloud/aws-security/aws-privilege-escalation/ --- .../aws-macie-privesc.md | 25 ++++++++++ .../aws-services/aws-macie-enum.md | 48 +++++++++++++++++++ theme/ht_searcher.js | 5 +- theme/index.hbs | 1 + 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-macie-privesc.md create mode 100644 src/pentesting-cloud/aws-security/aws-services/aws-macie-enum.md diff --git a/src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-macie-privesc.md b/src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-macie-privesc.md new file mode 100644 index 000000000..a61220369 --- /dev/null +++ b/src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-macie-privesc.md @@ -0,0 +1,25 @@ +# Amazon Macie - Bypass `Reveal Sample` Integrity Check + +AWS Macie एक सुरक्षा सेवा है जो स्वचालित रूप से AWS वातावरण में संवेदनशील डेटा का पता लगाती है, जैसे कि क्रेडेंशियल, व्यक्तिगत पहचान योग्य जानकारी (PII), और अन्य गोपनीय डेटा। जब Macie एक संवेदनशील क्रेडेंशियल की पहचान करता है, जैसे कि S3 बकेट में संग्रहीत AWS सीक्रेट की, तो यह एक खोज उत्पन्न करता है जो मालिक को पता लगाए गए डेटा का "नमूना" देखने की अनुमति देता है। आमतौर पर, एक बार जब संवेदनशील फ़ाइल S3 बकेट से हटा दी जाती है, तो यह अपेक्षित होता है कि सीक्रेट को फिर से प्राप्त नहीं किया जा सकता। + +हालांकि, एक **बायपास** की पहचान की गई है जहां एक हमलावर जिसके पास पर्याप्त अनुमतियाँ हैं, **एक ही नाम के साथ एक फ़ाइल को फिर से अपलोड कर सकता है** लेकिन जिसमें विभिन्न, गैर-संवेदनशील डमी डेटा हो। इससे Macie को नई अपलोड की गई फ़ाइल को मूल खोज के साथ जोड़ने का कारण बनता है, जिससे हमलावर **"Reveal Sample" फीचर** का उपयोग करके पहले से पता लगाए गए सीक्रेट को निकाल सकता है। यह समस्या एक महत्वपूर्ण सुरक्षा जोखिम प्रस्तुत करती है, क्योंकि जो सीक्रेट हटाए गए थे वे इस विधि के माध्यम से पुनः प्राप्त किए जा सकते हैं। + + + +## Steps To Reproduce: + +1. एक फ़ाइल (जैसे, `test-secret.txt`) को संवेदनशील डेटा के साथ S3 बकेट में अपलोड करें, जैसे कि AWS सीक्रेट की। AWS Macie के स्कैन और खोज उत्पन्न होने की प्रतीक्षा करें। + +2. AWS Macie Findings पर जाएं, उत्पन्न खोज को खोजें, और पता लगाए गए सीक्रेट को देखने के लिए **Reveal Sample** फीचर का उपयोग करें। + +3. S3 बकेट से `test-secret.txt` को हटा दें और सत्यापित करें कि यह अब मौजूद नहीं है। + +4. डमी डेटा के साथ `test-secret.txt` नाम की एक नई फ़ाइल बनाएं और इसे **हमलावर के खाते** का उपयोग करके उसी S3 बकेट में फिर से अपलोड करें। + +5. AWS Macie Findings पर वापस जाएं, मूल खोज तक पहुँचें, और फिर से **Reveal Sample** पर क्लिक करें। + +6. देखें कि Macie अभी भी मूल सीक्रेट को प्रकट करता है, भले ही फ़ाइल को हटा दिया गया हो और इसे **विभिन्न खातों से विभिन्न सामग्री के साथ प्रतिस्थापित किया गया हो, हमारे मामले में यह हमलावर का खाता होगा**। + +## Summary: + +यह भेद्यता एक हमलावर को पर्याप्त AWS IAM अनुमतियों के साथ पहले से पता लगाए गए सीक्रेट को पुनः प्राप्त करने की अनुमति देती है, भले ही मूल फ़ाइल S3 से हटा दी गई हो। यदि एक AWS सीक्रेट की, एक्सेस टोकन, या अन्य संवेदनशील क्रेडेंशियल उजागर हो जाता है, तो एक हमलावर इस दोष का लाभ उठाकर इसे पुनः प्राप्त कर सकता है और AWS संसाधनों तक अनधिकृत पहुँच प्राप्त कर सकता है। इससे विशेषाधिकार वृद्धि, अनधिकृत डेटा पहुँच, या क्लाउड संपत्तियों के आगे के समझौते का परिणाम हो सकता है, जिससे डेटा उल्लंघन और सेवा में व्यवधान हो सकता है। diff --git a/src/pentesting-cloud/aws-security/aws-services/aws-macie-enum.md b/src/pentesting-cloud/aws-security/aws-services/aws-macie-enum.md new file mode 100644 index 000000000..55739c1f3 --- /dev/null +++ b/src/pentesting-cloud/aws-security/aws-services/aws-macie-enum.md @@ -0,0 +1,48 @@ +# Amazon Macie + +## Introduction + +Amazon Macie एक डेटा सुरक्षा सेवा है जो मशीन लर्निंग और पैटर्न मिलान का उपयोग करके संवेदनशील डेटा की खोज करती है, डेटा सुरक्षा जोखिमों में दृश्यता प्रदान करती है, और उन जोखिमों के खिलाफ स्वचालित सुरक्षा सक्षम करती है। + +## Listing Findings with AWS Console + +एक विशिष्ट S3 बकेट को रहस्यों और संवेदनशील डेटा के लिए स्कैन करने के बाद, निष्कर्ष उत्पन्न होंगे और कंसोल में प्रदर्शित होंगे। अधिकृत उपयोगकर्ता जिनके पास पर्याप्त अनुमतियाँ हैं, वे प्रत्येक नौकरी के लिए इन निष्कर्षों को देख और सूचीबद्ध कर सकते हैं। + +Screenshot 2025-02-10 at 19 08 08 + + +## Revealing Secret + +Amazon Macie एक फीचर प्रदान करता है जो पहचानित रहस्यों को स्पष्ट-टेक्स्ट प्रारूप में प्रदर्शित करता है। यह कार्यक्षमता समझौता किए गए डेटा की पहचान में सहायता करती है। हालाँकि, स्पष्ट-टेक्स्ट में रहस्यों को प्रदर्शित करना सामान्यतः सुरक्षा चिंताओं के कारण सर्वोत्तम प्रथा नहीं माना जाता है, क्योंकि यह संवेदनशील जानकारी को संभावित रूप से उजागर कर सकता है। + +Screenshot 2025-02-10 at 19 13 53 + +Screenshot 2025-02-10 at 19 15 11 + +## Enumeration +```bash +# List and describe classification jobs +aws macie2 list-classification-jobs --region eu-west-1 +aws macie2 describe-classification-job --job-id --region eu-west-1 + +# Retrieve account details and statistics +aws macie2 get-macie-session --region eu-west-1 +aws macie2 get-usage-statistics --region eu-west-1 + +# List and manage Macie members (for organizations) +aws macie2 list-members --region eu-west-1 + +# List findings and get detailed information about specific findings +aws macie2 list-findings --region eu-west-1 +aws macie2 get-findings --finding-id --region eu-west-1 + +# Manage custom data identifiers +aws macie2 list-custom-data-identifiers --region eu-west-1 +aws macie2 get-custom-data-identifier --id --region eu-west-1 + +# List and detail findings filters +aws macie2 list-findings-filters --region eu-west-1 +aws macie2 get-findings-filter --id --region eu-west-1 + +``` + diff --git a/theme/ht_searcher.js b/theme/ht_searcher.js index 276bbfe6a..5a47c0ee3 100644 --- a/theme/ht_searcher.js +++ b/theme/ht_searcher.js @@ -471,12 +471,13 @@ window.search = window.search || {}; showResults(true); } - fetch('https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/refs/heads/master/searchindex.json') + var branch = lang === "en" ? "master" : lang + fetch(`https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/refs/heads/${branch}/searchindex.json`) .then(response => response.json()) .then(json => init(json)) .catch(error => { // Try to load searchindex.js if fetch failed var script = document.createElement('script'); - script.src = 'https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/refs/heads/master/searchindex.js'; + script.src = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/refs/heads/${branch}/searchindex.js`; script.onload = () => init(window.search); document.head.appendChild(script); }); diff --git a/theme/index.hbs b/theme/index.hbs index 683ea99c1..9c7fa3155 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -55,6 +55,7 @@