TMAegisБета
Више правила за mariadb

MariaDB

TMA-MARIADB-7.3

Ensure strong authentication is utilized for all accounts

КритичнаНиво 1Аутоматскаmariadb

Опис

The mysql_native_password and mysql_old_password plugins utilize weak cryptography and/or weak password routines. In particular, the mysql_old_password plugin utilizes cracked password routines and is subject to Pass-the-Hash attacks. The mysql_native_password plugin relies on the Secure Hash Algorithm 1 (SHA-1) algorithm. Counts accounts still using mysql_native_password/mysql_old_password/no plugin, apart from root and mysql with an invalid password string. Runs mariadb -NBe with the client defaults: as root on the server the unix_socket plugin usually authenticates; otherwise put an administrative account in ~/.my.cnf (mode 0600), not MYSQL_PWD (see 1.4/1.6).

Како се проверава

Метод провере: SQL упит

sql_query
out=$(mariadb -NBe "SELECT COUNT(*) FROM mysql.user WHERE plugin IN ('mysql_native_password', 'mysql_old_password', '') AND NOT (User = 'root' AND authentication_string = 'invalid') AND NOT (User = 'mysql' AND authentication_string = 'invalid')" 2>/dev/null) || exit 1; printf '%s\n' "$out"
Очекивани излаз
0

Како се исправља

Метод исправке: Смерница или закрпа инфраструктуре

ALTER USER 'root'@'localhost' IDENTIFIED VIA unix_socket; SET PASSWORD FOR 'mysql'@'localhost' = 'invalid'; SET PASSWORD FOR 'mariadb.sys'@'localhost' = 'invalid'; and move every other listed account to ed25519, gssapi, pam or unix_socket (ALTER USER ... IDENTIFIED VIA ed25519 USING PASSWORD('...')).

Својства

Оперативни системи
Било који
Ознаке
mariadbdatabaseauthentication
Референца
CIS MariaDB 10.11 Benchmark v1.0.0 - 7.3 Ensure strong authentication is utilized for all accounts

Проверите овај рачунар

Покрените ово на рачунару за који имате дозволу за проверу. Скенирање ради у режиму само за читање.

shell
tmaegis scan --target mariadb