TMAegis
tdsql 관련 규칙 더 보기

TMA-TDSQL-4.4

Ensure `skip-grant-tables` Is Disabled

심각레벨 1자동tdsql

설명

When MySQL is started with --skip-grant-tables, the server does not load the privilege system, and any user can log in without authentication and perform arbitrary operations. Counts mysqld processes started with --skip-grant-tables and my.cnf files (/data/tdsql/mysqld/*/my.cnf, /etc/my.cnf) that enable it.

점검 방법

감사 방식: 셸 명령

shell
out=$(ps -eo args= 2>/dev/null) || exit 1; p=$(printf '%s\n' "$out" | grep mysqld | grep -ci '[s]kip.grant.tables' || true); c=$(grep -il '^[[:space:]]*[s]kip.grant.tables' /data/tdsql/mysqld/*/my.cnf /etc/my.cnf 2>/dev/null | wc -l); echo $((p + c))
예상 출력
0

조치 방법

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

Remove skip-grant-tables from my.cnf and the mysqld command line and restart the MySQL instance.

속성

운영 체제
모두
태그
tdsqlauthentication
참고 자료
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 4.4 Ensure `skip-grant-tables` Is Disabled

이 호스트 점검하기

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

shell
tmaegis scan --target tdsql