TMAegis
Thêm quy tắc cho mysql

TMA-MYSQL-4.3

Ensure 'allow-suspicious-udfs' is Set to 'OFF'

Trung bìnhCấp 2Tự độngmysql

Mô tả

This option prevents attaching arbitrary shared library functions as user-defined functions by checking for at least one corresponding method named _init, _deinit, _reset, _clear, or _add. Counts allow-suspicious-udfs settings in the server option groups (my_print_defaults mysqld) and on the running server command line.

Cách kiểm tra

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

shell
c=$(my_print_defaults mysqld 2>/dev/null) || exit 1; p=$(ps -eo comm=,args= 2>/dev/null) || exit 1; n=$( { printf '%s\n' "$c"; printf '%s\n' "$p" | awk '$1=="mysqld"||$1=="mariadbd"' | tr ' ' '\n'; } | grep -Eic '^--allow[-_]suspicious[-_]udfs(=(1|on|true|yes))?$' ); 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

Remove allow-suspicious-udfs from the MySQL option files and from the server start-up command line, then restart.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
mysqldatabaseconfiguration
Tham chiếu
CIS Oracle MySQL Community Server 8.4 Benchmark v1.1.0 - 4.3 Ensure 'allow-suspicious-udfs' is Set to 'OFF'

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 mysql --level 2