mirror of
https://github.com/carlospolop/hacktricks
synced 2025-02-17 06:28:27 +00:00
71 lines
4 KiB
Markdown
71 lines
4 KiB
Markdown
# 9042/9160 - Pentesting Cassandra
|
|
|
|
<details>
|
|
|
|
<summary><strong>Aprende hacking en AWS desde cero hasta experto con</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Experto en Red Team de AWS de HackTricks)</strong></a><strong>!</strong></summary>
|
|
|
|
Otras formas de apoyar a HackTricks:
|
|
|
|
* Si deseas ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
|
|
* Obtén el [**swag oficial de PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **sígueme** en **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/carlospolopm)**.**
|
|
* **Comparte tus trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github.
|
|
|
|
</details>
|
|
|
|
## Información Básica
|
|
|
|
**Apache Cassandra** es una base de datos distribuida **altamente escalable** y de **alto rendimiento** diseñada para manejar **grandes cantidades de datos** en muchos **servidores de baja calidad**, proporcionando **alta disponibilidad** sin **punto único de fallo**. Es un tipo de **base de datos NoSQL**.
|
|
|
|
En varios casos, puedes encontrar que Cassandra acepta **cualquier credencial** (ya que no hay ninguna configurada) y esto podría potencialmente permitir a un atacante **enumerar** la base de datos.
|
|
|
|
**Puerto predeterminado:** 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
|
|
```
|
|
## Enumeración
|
|
|
|
### Manual
|
|
```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";
|
|
```
|
|
### Automatizado
|
|
|
|
No hay muchas opciones aquí y nmap no obtiene mucha información
|
|
```bash
|
|
nmap -sV --script cassandra-info -p <PORT> <IP>
|
|
```
|
|
### [**Ataque de fuerza bruta**](../generic-methodologies-and-resources/brute-force.md#cassandra)
|
|
|
|
### **Shodan**
|
|
|
|
`port:9160 Cluster`\
|
|
`port:9042 "Versión de protocolo no válida o no compatible"`
|
|
|
|
<details>
|
|
|
|
<summary><strong>Aprende hacking en AWS desde cero hasta convertirte en un experto con</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Otras formas de apoyar a HackTricks:
|
|
|
|
* Si deseas ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
|
|
* Obtén el [**oficial PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
|
* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **sígueme** en **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/carlospolopm)**.**
|
|
* **Comparte tus trucos de hacking enviando PRs a los repositorios de** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
|
|
|
</details>
|