9042/9160 - Pentesting Cassandra

htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

기본 정보

아파치 카산드라대량의 데이터를 다루기 위해 설계된 고도로 확장 가능하고 고성능의 분산 데이터베이스로, 여러 개의 일반 서버에서 고가용성을 제공하며 단일 장애점이 없습니다. 이는 NoSQL 데이터베이스의 한 종류입니다.

여러 경우에 카산드라가 모든 자격 증명을 (구성된 자격 증명이 없기 때문에) 허용한다는 것을 발견할 수 있으며, 이는 공격자가 데이터베이스를 열거할 수 있는 가능성을 가집니다.

기본 포트: 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 "잘못된 또는 지원되지 않는 프로토콜 버전"

htARTE (HackTricks AWS Red Team Expert)를 통해 제로에서 영웅까지 AWS 해킹을 배워보세요!

HackTricks를 지원하는 다른 방법:

Last updated