hacktricks/network-services-pentesting/cassandra.md

74 lines
4 KiB
Markdown
Raw Normal View History

# 9042/9160 - Pentesting Cassandra
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* 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.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}
2022-04-28 16:01:33 +00:00
2024-02-10 18:14:16 +00:00
## Temel Bilgiler
**Apache Cassandra**, **yüksek ölçeklenebilir**, **yüksek performanslı** dağıtık bir veritabanıdır ve **birçok** **ticari sunucu** üzerinde **büyük miktarda veri** işlemek için tasarlanmıştır, **tek bir arıza noktası** olmadan **yüksek kullanılabilirlik** sağlar. Bu, bir tür **NoSQL veritabanıdır**.
2024-02-08 21:36:15 +00:00
Bazı durumlarda, Cassandra'nın **herhangi bir kimlik bilgisi** kabul ettiğini görebilirsiniz (çünkü yapılandırılmış bir kimlik bilgisi yoktur) ve bu, bir saldırganın veritabanını **numaralandırmasına** olanak tanıyabilir.
2024-02-10 18:14:16 +00:00
**Varsayılan port:** 9042,9160
```
PORT STATE SERVICE REASON
9042/tcp open cassandra-native Apache Cassandra 3.10 or later (native protocol versions 3/v3, 4/v4, 5/v5-beta)
9160/tcp open cassandra syn-ack
```
## Enumeration
### Manuel
```bash
pip install cqlsh
cqlsh <IP>
#Basic info enumeration
SELECT cluster_name, thrift_version, data_center, partitioner, native_protocol_version, rack, release_version from system.local;
#Keyspace enumeration
SELECT keyspace_name FROM system.schema_keyspaces;
desc <Keyspace_name> #Decribe that DB
desc system_auth #Describe the DB called system_auth
SELECT * from system_auth.roles; #Retreive that info, can contain credential hashes
SELECT * from logdb.user_auth; #Can contain credential hashes
SELECT * from logdb.user;
SELECT * from configuration."config";
```
### Automated
Burada çok fazla seçenek yok ve nmap çok fazla bilgi elde edemiyor.
```bash
nmap -sV --script cassandra-info -p <PORT> <IP>
```
2022-05-01 13:25:53 +00:00
### [**Brute force**](../generic-methodologies-and-resources/brute-force.md#cassandra)
2022-05-01 13:25:53 +00:00
### **Shodan**
`port:9160 Cluster`\
2024-02-10 18:14:16 +00:00
`port:9042 "Geçersiz veya desteklenmeyen protokol sürümü"`
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
AWS Hacking'i öğrenin ve pratik yapın:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
GCP Hacking'i öğrenin ve pratik yapın: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>HackTricks'i Destekleyin</summary>
2022-04-28 16:01:33 +00:00
* [**abonelik planlarını**](https://github.com/sponsors/carlospolop) kontrol edin!
* **💬 [**Discord grubuna**](https://discord.gg/hRep4RUj7f) veya [**telegram grubuna**](https://t.me/peass) katılın ya da **Twitter'da** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**'i takip edin.**
* **Hacking ipuçlarını paylaşmak için** [**HackTricks**](https://github.com/carlospolop/hacktricks) ve [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github reposuna PR gönderin.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}