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

修正方法

修正方法: ガイダンスまたは IaC パッチ

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