9042/9160 - Pentesting Cassandra
基本信息
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
枚举
手动
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";
自动化
这里并没有太多选项,nmap 无法获取太多信息。
nmap -sV --script cassandra-info -p <PORT> <IP>
Shodan
port:9160 Cluster
port:9042 "Invalid or unsupported protocol version"
最后更新于