Az - PostgreSQL Post Exploitation
Tip
AWS Hacking’i öğrenin ve pratik yapın:
HackTricks Training AWS Red Team Expert (ARTE)
GCP Hacking’i öğrenin ve pratik yapın:HackTricks Training GCP Red Team Expert (GRTE)
Az Hacking’i öğrenin ve pratik yapın:HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks'i Destekleyin
- Abonelik planlarını kontrol edin!
- Katılın 💬 Discord group veya telegram group veya Twitter’da bizi takip edin 🐦 @hacktricks_live.
- PR göndererek hacking tricks paylaşın: HackTricks ve HackTricks Cloud github repos.
PostgreSQL Veritabanı Post Exploitation
PostgreSQL Veritabanı hakkında daha fazla bilgi için kontrol edin:
Azure Depolama hesaplarına erişmek için pg_azure_storage uzantısını kullanın
pg_azure_storage uzantısını kullanarak Azure Depolama hesaplarına erişmek mümkündür. Bu, depolama hesabına erişmek için sunucuya atanan yönetilen kimliğin izinlerini kullanacaktır.
Daha fazla bilgi için bu tekniği ayrıcalık yükseltme bölümünde kontrol edin:
Microsoft.DBforPostgreSQL/flexibleServers/databases/write && Microsoft.DBforPostgreSQL/flexibleServers/databases/read
Bu izinle, Azure’daki bir Postgres Flexible Server örneği içinde yeni veritabanları oluşturabilirsiniz. Bu eylem kendisi mevcut kaynakları değiştirmese de, aşırı veya yetkisiz veritabanı oluşturma, kaynak tüketimine veya sunucunun potansiyel kötüye kullanımına yol açabilir.
az postgres flexible-server db create \
--server-name <server_name> \
--resource-group <resource_group_name> \
--database-name <database_name>
Microsoft.DBforPostgreSQL/flexibleServers/advancedThreatProtectionSettings/write && Microsoft.DBforPostgreSQL/flexibleServers/advancedThreatProtectionSettings/read
Bu izinle, Azure’daki bir Postgres Flexible Server örneği için Gelişmiş Tehdit Koruma (ATP) ayarlarını yapılandırabilir veya güncelleyebilirsiniz. Bu, anormal etkinlikleri ve potansiyel tehditleri tespit etmek ve yanıt vermek için tasarlanmış güvenlik özelliklerini etkinleştirmeye veya devre dışı bırakmaya olanak tanır.
az postgres flexible-server threat-protection-policy update \
--name <server_name> \
--resource-group <resource_group_name> \
--state <Enabled|Disabled>
Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/write, Microsoft.DBforPostgreSQL/flexibleServers/read && Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/read
Bu izinle, Azure’daki bir Postgres Flexible Server örneği için güvenlik duvarı kuralları oluşturabilir veya değiştirebilirsiniz. Bu, hangi IP adreslerinin veya aralıklarının sunucuya erişebileceğini kontrol etmenizi sağlar. Bu iznin yetkisiz veya yanlış kullanımı, sunucunun istenmeyen veya kötü niyetli erişime maruz kalmasına neden olabilir.
# Create Rule
az postgres flexible-server firewall-rule create \
--name <server_name> \
--resource-group <resource_group_name> \
--rule-name <rule_name> \
--start-ip-address <start_ip> \
--end-ip-address <end_ip>
# Update Rule
az postgres flexible-server firewall-rule update \
--name <server_name> \
--resource-group <resource_group_name> \
--rule-name <rule_name> \
--start-ip-address <start_ip> \
--end-ip-address <end_ip>
Microsoft.DBforPostgreSQL/flexibleServers/configurations/write && Microsoft.DBforPostgreSQL/flexibleServers/configurations/read
Bu izinle, Azure’daki bir Postgres Flexible Server örneğinin yapılandırma ayarlarını güncelleyebilirsiniz. Bu, performans ayarı, güvenlik yapılandırmaları veya operasyonel ayarlar gibi sunucu parametrelerinin özelleştirilmesine olanak tanır.
az postgres flexible-server parameter set \
--resource-group <resource_group_name> \
--server-name <server_name> \
--name <parameter_name> \
--value <parameter_value>
Microsoft.DBforPostgreSQL/flexibleServers/stop/action
Bu izinle, Azure’da bir PostgreSQL Flexible Server örneğini durdurabilirsiniz. Bir sunucunun durdurulması, veritabanına bağımlı uygulamalar ve kullanıcılar üzerinde geçici bir hizmet kesintisine yol açabilir.
az postgres flexible-server stop \
--name <server_name> \
--resource-group <resource_group_name>
Microsoft.DBforPostgreSQL/flexibleServers/start/action
With this permission, you can start a stopped PostgreSQL Flexible Server instance on Azure. Starting a server restores its availability, enabling applications and users to reconnect and access the database.
az postgres flexible-server start \
--name <server_name> \
--resource-group <resource_group_name>
Microsoft.DBforPostgreSQL/flexibleServers/read, Microsoft.DBforPostgreSQL/flexibleServers/write && Microsoft.ManagedIdentity/userAssignedIdentities/assign/action
With this permission, you can assign a user-assigned managed identity to postgres flexible servers.
az postgres flexible-server kimlik ata \
--resource-group <ResourceGroupName> \
--server-name <ServerName> \
--identity <IdentityName>
*/delete
With this permissions you can delete resources related to postgres server in Azure such as server, firewalls, managed identities or configurations
Tip
AWS Hacking’i öğrenin ve pratik yapın:
HackTricks Training AWS Red Team Expert (ARTE)
GCP Hacking’i öğrenin ve pratik yapın:HackTricks Training GCP Red Team Expert (GRTE)
Az Hacking’i öğrenin ve pratik yapın:HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks'i Destekleyin
- Abonelik planlarını kontrol edin!
- Katılın 💬 Discord group veya telegram group veya Twitter’da bizi takip edin 🐦 @hacktricks_live.
- PR göndererek hacking tricks paylaşın: HackTricks ve HackTricks Cloud github repos.
HackTricks Cloud

