TMAegisBeta
Thêm quy tắc cho mariadb

MariaDB

TMA-MARIADB-1.4

Verify That the MYSQL_PWD Environment Variable is Not in Use

Trung bìnhCấp 1Tự độngmariadb

Mô tả

MariaDB can read a default database password from an environment variable called MYSQL_PWD. Avoiding use of this environment variable can better safeguard the confidentiality of MariaDB credentials. Run as root; counts processes whose environment contains MYSQL_PWD (including the scanner itself if it was given MYSQL_PWD).

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
[ "$(id -u)" -eq 0 ] || exit 1; n=$(grep -lsaz '^MYSQL_PWD=' /proc/[0-9]*/environ 2>/dev/null | wc -l); echo "$n"
Đầ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

Find the processes (grep -lsaz ^MYSQL_PWD= /proc/*/environ) and change the users/scripts that export MYSQL_PWD to use an option file readable only by the user or certificate-based authentication.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
mariadbdatabasecredentials
Tham chiếu
CIS MariaDB 10.11 Benchmark v1.0.0 - 1.4 Verify That the MYSQL_PWD Environment Variable is Not in Use

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.

shell
tmaegis scan --target mariadb