9042/9160 - Pentesting Cassandra

Reading time: 2 minutes

tip

AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE)

HackTricks का समर्थन करें

Basic Information

Apache Cassandra एक अत्यधिक स्केलेबल, उच्च प्रदर्शन वितरित डेटाबेस है जिसे कई कमोडिटी सर्वरों के बीच बड़ी मात्रा में डेटा को संभालने के लिए डिज़ाइन किया गया है, जो उच्च उपलब्धता प्रदान करता है बिना एकल बिंदु विफलता के। यह एक प्रकार का NoSQL डेटाबेस है।

कई मामलों में, आप पाएंगे कि Cassandra कोई भी क्रेडेंशियल स्वीकार करता है (क्योंकि कोई कॉन्फ़िगर नहीं किया गया है) और यह संभावित रूप से एक हमलावर को डेटाबेस को गणना करने की अनुमति दे सकता है।

डिफ़ॉल्ट पोर्ट: 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

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";

Automated

यहाँ ज्यादा विकल्प नहीं हैं और nmap ज्यादा जानकारी प्राप्त नहीं करता है।

bash
nmap -sV --script cassandra-info -p <PORT> <IP>

ब्रूट फोर्स

शोडन

port:9160 Cluster
port:9042 "Invalid or unsupported protocol version"

tip

AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE)

HackTricks का समर्थन करें