OceanBase
TMA-OCEANBASE-4.1.1
Ensure Passwords are Set for All OceanBase Accounts
Mô tả
If any account exists without a password (i.e., a null-password account), it reduces the attack cost-attackers only need to guess the username correctly to gain access without requiring a password. Therefore, it is essential to ensure that all OceanBase accounts are configured with passwords to prevent unauthorized malicious users from accessing the database. Runs obclient with the connection options in OB_CONN (default "-h127.0.0.1 -P2881 -uroot@sys"); point it at the MySQL-mode tenant being assessed and supply the password via OB_CONN (-p...) or a [client] section in ~/.my.cnf. Passes when neither mysql.user nor oceanbase.__all_user contains an account with an empty password.
Cách kiểm tra
Phương pháp kiểm tra: Truy vấn SQL
out=$(obclient ${OB_CONN:--h127.0.0.1 -P2881 -uroot@sys} -N -B -e "SELECT (SELECT COUNT(*) FROM mysql.user WHERE LENGTH(password) = 0) + (SELECT COUNT(*) FROM oceanbase.__all_user WHERE LENGTH(passwd) = 0)" 2>/dev/null) || exit 1; printf '%s\n' "$out"- Đầu ra mong đợi
0
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
SET PASSWORD FOR <user> = PASSWORD('<strong password>'); for every account returned.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- oceanbaseauthentication
- Tham chiếu
- CIS OceanBase Enterprise Edition V4 Benchmark v1.0.0 - 4.1.1 Ensure Passwords are Set for All OceanBase Accounts
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
tmaegis scan --target oceanbase