TMAegis베타
mariadb 관련 규칙 더 보기

MariaDB

TMA-MARIADB-1.4

Verify That the MYSQL_PWD Environment Variable is Not in Use

보통레벨 1자동mariadb

설명

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).

점검 방법

감사 방식: 셸 명령

shell
[ "$(id -u)" -eq 0 ] || exit 1; n=$(grep -lsaz '^MYSQL_PWD=' /proc/[0-9]*/environ 2>/dev/null | wc -l); echo "$n"
예상 출력
0

조치 방법

조치 방식: 가이드 또는 인프라 패치

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.

속성

운영 체제
모두
태그
mariadbdatabasecredentials
참고 자료
CIS MariaDB 10.11 Benchmark v1.0.0 - 1.4 Verify That the MYSQL_PWD Environment Variable is Not in Use

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target mariadb