AWS - RDS Unauthenticated Enum
HackTricks को समर्थन दें
सदस्यता योजनाओं की जाँच करें!
💬 Discord समूह या telegram समूह में शामिल हों या हमें Twitter 🐦 पर फॉलो करें @hacktricks_live.**
हैकिंग ट्रिक्स साझा करें HackTricks और HackTricks Cloud गिटहब रिपोज़िटरी में PRs सबमिट करके।
RDS
अधिक जानकारी के लिए देखें:
AWS - Relational Database (RDS) EnumPublic Port
इंटरनेट से डेटाबेस को सार्वजनिक एक्सेस देना संभव है। हमलावर को अभी भी यूज़रनेम और पासवर्ड, IAM एक्सेस, या डेटाबेस में प्रवेश करने के लिए एक एक्सप्लॉइट जानने की आवश्यकता होगी।
Public RDS Snapshots
AWS किसी को भी RDS स्नैपशॉट डाउनलोड करने की अनुमति देता है। आप अपने खाते से इन सार्वजनिक RDS स्नैपशॉट्स को बहुत आसानी से सूचीबद्ध कर सकते हैं:
# Public RDS snapshots
aws rds describe-db-snapshots --include-public
## Search by account ID
aws rds describe-db-snapshots --include-public --query 'DBSnapshots[?contains(DBSnapshotIdentifier, `284546856933:`) == `true`]'
## To share a RDS snapshot with everybody the RDS DB cannot be encrypted (so the snapshot won't be encryted)
## To share a RDS encrypted snapshot you need to share the KMS key also with the account
# From the own account you can check if there is any public snapshot with:
aws rds describe-db-snapshots --snapshot-type public [--region us-west-2]
## Even if in the console appear as there are public snapshot it might be public
## snapshots from other accounts used by the current account
Public URL template
सार्वजनिक URL टेम्पलेट
https://rds.amazonaws.com/
?Action=DescribeDBInstances
&Version=2014-10-31
Example Request
उदाहरण अनुरोध
$ curl "https://rds.amazonaws.com/?Action=DescribeDBInstances&Version=2014-10-31"
Response
प्रतिक्रिया
<DescribeDBInstancesResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/">
<DescribeDBInstancesResult>
<DBInstances>
<DBInstance>
<DBInstanceIdentifier>mydbinstance</DBInstanceIdentifier>
<DBInstanceClass>db.t2.micro</DBInstanceClass>
<Engine>mysql</Engine>
<DBInstanceStatus>available</DBInstanceStatus>
<MasterUsername>admin</MasterUsername>
<Endpoint>
<Address>mydbinstance.123456789012.us-east-1.rds.amazonaws.com</Address>
<Port>3306</Port>
</Endpoint>
<AllocatedStorage>20</AllocatedStorage>
<InstanceCreateTime>2021-01-01T12:00:00Z</InstanceCreateTime>
<PreferredBackupWindow>07:00-09:00</PreferredBackupWindow>
<BackupRetentionPeriod>7</BackupRetentionPeriod>
<DBSecurityGroups/>
<VpcSecurityGroups>
<VpcSecurityGroupMembership>
<VpcSecurityGroupId>sg-12345678</VpcSecurityGroupId>
<Status>active</Status>
</VpcSecurityGroupMembership>
</VpcSecurityGroups>
<DBParameterGroups>
<DBParameterGroup>
<DBParameterGroupName>default.mysql5.7</DBParameterGroupName>
<ParameterApplyStatus>in-sync</ParameterApplyStatus>
</DBParameterGroup>
</DBParameterGroups>
<AvailabilityZone>us-east-1a</AvailabilityZone>
<DBSubnetGroup>
<DBSubnetGroupName>default</DBSubnetGroupName>
<DBSubnetGroupDescription>default</DBSubnetGroupDescription>
<VpcId>vpc-12345678</VpcId>
<SubnetGroupStatus>Complete</SubnetGroupStatus>
<Subnets>
<Subnet>
<SubnetIdentifier>subnet-12345678</SubnetIdentifier>
<SubnetAvailabilityZone>
<Name>us-east-1a</Name>
</SubnetAvailabilityZone>
<SubnetStatus>Active</SubnetStatus>
</Subnet>
</Subnets>
</DBSubnetGroup>
<PreferredMaintenanceWindow>mon:03:00-mon:04:00</PreferredMaintenanceWindow>
<PendingModifiedValues/>
<MultiAZ>false</MultiAZ>
<EngineVersion>5.7.22</EngineVersion>
<AutoMinorVersionUpgrade>true</AutoMinorVersionUpgrade>
<ReadReplicaDBInstanceIdentifiers/>
<LicenseModel>general-public-license</LicenseModel>
<OptionGroupMemberships>
<OptionGroupMembership>
<OptionGroupName>default:mysql-5-7</OptionGroupName>
<Status>in-sync</Status>
</OptionGroupMembership>
</OptionGroupMemberships>
<PubliclyAccessible>true</PubliclyAccessible>
<StorageType>gp2</StorageType>
<StorageEncrypted>false</StorageEncrypted>
<DbiResourceId>db-ABCDEFGHIJKLMNOPQRSTU1VWZ</DbiResourceId>
<CACertificateIdentifier>rds-ca-2019</CACertificateIdentifier>
<DomainMemberships/>
<CopyTagsToSnapshot>false</CopyTagsToSnapshot>
<MonitoringInterval>0</MonitoringInterval>
<EnhancedMonitoringResourceArn/>
<IAMDatabaseAuthenticationEnabled>false</IAMDatabaseAuthenticationEnabled>
<PerformanceInsightsEnabled>false</PerformanceInsightsEnabled>
<DeletionProtection>false</DeletionProtection>
<AssociatedRoles/>
<TagList/>
<CustomerOwnedIpEnabled>false</CustomerOwnedIpEnabled>
<AwsBackupRecoveryPointArn/>
<ActivityStreamStatus>stopped</ActivityStreamStatus>
<ActivityStreamKmsKeyId/>
<ActivityStreamMode/>
<ActivityStreamEngineNativeAuditFieldsIncluded>false</ActivityStreamEngineNativeAuditFieldsIncluded>
<AutomationMode>full</AutomationMode>
<ResumeFullAutomationModeTime/>
<CustomIamInstanceProfile/>
<BackupTarget/>
<NetworkType>IPV4</NetworkType>
<ActivityStreamPolicyStatus>locked</ActivityStreamPolicyStatus>
<StorageThroughput>0</StorageThroughput>
<DBSystemId/>
<MasterUserSecret>
<SecretArn/>
<KmsKeyId/>
<SecretStatus>rotating</SecretStatus>
</MasterUserSecret>
<CertificateDetails>
<CaIdentifier>rds-ca-2019</CaIdentifier>
<ValidTill>2024-08-22T00:00:00Z</ValidTill>
</CertificateDetails>
</DBInstance>
</DBInstances>
</DescribeDBInstancesResult>
<ResponseMetadata>
<RequestId>12345678-1234-1234-1234-123456789012</RequestId>
</ResponseMetadata>
</DescribeDBInstancesResponse>
mysql://{user_provided}.{random_id}.{region}.rds.amazonaws.com:3306
postgres://{user_provided}.{random_id}.{region}.rds.amazonaws.com:5432
HackTricks को समर्थन दें
सदस्यता योजनाओं की जाँच करें!
💬 Discord समूह या telegram समूह में शामिल हों या हमें Twitter 🐦 पर फॉलो करें @hacktricks_live.
PRs सबमिट करके हैकिंग ट्रिक्स साझा करें HackTricks और HackTricks Cloud github repos में।
Last updated