TMA-TDSQL-4.4
Ensure `skip-grant-tables` Is Disabled
Nghiêm trọngCấp 1Tự độngtdsql
Mô tả
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.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
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))- Đầ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
Remove skip-grant-tables from my.cnf and the mysqld command line and restart the MySQL instance.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- tdsqlauthentication
- Tham chiếu
- CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 4.4 Ensure `skip-grant-tables` Is Disabled
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 tdsql