Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
chef-mysql-hardening — This chef cookbook는 mysql에 대한 보안 구성을 제공합니다. | Kitploit
도구/GitHubGitHub/dev-sec/chef-mysql-hardening
Defensive ToolsScripting & AutomationConfiguration AuditingDevSecOpsMisconfigurationDatabase Security
GitHubdev-sec/chef-mysql-hardening

chef-mysql-hardening

This chef cookbook는 mysql에 대한 보안 구성을 제공합니다.

저장소 보기
278110일 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
웹사이트

mysql-hardening (Chef cookbook)

Supermarket Build Status Code Coverage Dependencies Gitter Chat

설명

mysql을 위한 보안 구성을 제공합니다. 공격자에게 최소한의 공격 표면만 노출되도록 구성된 프로덕션 환경용 mysql 인스턴스를 설정하는 것을 목적으로 합니다.

이 cookbook은 mysql의 보안 구성에 초점을 맞추며, 설치를 위해 mysql cookbook을 재사용합니다. 따라서 Chef에서 기존 mysql 구성 위에 이 하드닝 계층을 추가할 수 있습니다.

이 cookbook은 os-hardening 및 ssh-hardening과 문제없이 작동하도록 최적화되었습니다. 이들 없이도 잘 동작하지만, apt-get update 또는 yum update와 같은 모든 사전 조건이 충족되었는지 확인해야 합니다.

요구 사항

  • Opscode chef

사용법

예시 role은 다음과 같습니다:

root@kitploit:~
{
    "name": "mysql",
    "default_attributes": { },
    "override_attributes": { },
    "json_class": "Chef::Role",
    "description": "MySql Hardened Server Test Role",
    "chef_type": "role",
    "default_attributes" : {
      "mysql": {
        "server_root_password": "iloverandompasswordsbutthiswilldo",
        "server_debian_password": "iloverandompasswordsbutthiswilldo"
      }
    },
    "run_list": [
        "recipe[chef-solo-search]",
        "recipe[apt]",
        "recipe[mysql::server]",
        "recipe[mysql-hardening]"
    ]
}

레시피

mysql-hardening::hardening (기본)

이 레시피는 mysql cookbook을 위한 오버레이 레시피이며 mysql-hardening::hardening을 적용합니다.

다음을 runlist에 추가하고 보안 옵션 속성을 사용자 정의하세요.

root@kitploit:~
  "recipe[mysql::server]",
  "recipe[mysql-hardening]"

이 하드닝 레시피는 하드닝을 설치하지만, Mysql, MariaDB 또는 Percona가 이미 설치되어 있을 것을 기대합니다. mysql cookbook을 사용하지 않는 경우 다음 속성을 조정해야 할 수 있습니다:

  • node['mysql']['service_name'] = 'default'
  • node['mysql']['data_dir'] = '/var/lib/mysql'
  • node['mysql-hardening']['conf-file'] = '/etc/mysql/conf.d/hardening.cnf'
  • node['mysql-hardening']['user'] = 'mysql'

보안 옵션

추가 정보는 Deutsche Telekom (독일어) 및 Symantec에서 이미 확인할 수 있습니다.

  • default['mysql']['security']['chroot'] - chroot
  • default['mysql']['security']['safe_user_create'] - safe-user-create
  • default['mysql']['security']['secure_auth'] - secure-auth
  • default['mysql']['security']['skip_symbolic_links'] - skip-symbolic-links
  • default['mysql']['security']['skip_show_database'] - skip-show-database
  • default['mysql']['security']['local_infile'] - local-infile
  • default['mysql']['security']['allow-suspicious-udfs'] - allow-suspicious-udfs
  • default['mysql']['security']['automatic_sp_privileges'] - automatic_sp_privileges
  • default['mysql']['security']['secure-file-priv'] - secure-file-priv

보안 구성

이 설정은 기본적으로 다음 매개변수를 설정합니다.

root@kitploit:~
user = mysql
port = 3306
bind-address = X.Y.Z.W

# via ['mysql']['security']['local_infile']
local-infile = 0

# via ['mysql']['security']['safe_user_create']
safe-user-create = 1

# via ['mysql']['security']['secure_auth']
secure-auth = 1

# via ['mysql']['security']['skip_show_database']
skip-show-database

# via ['mysql']['security']['skip_symbolic_links']
skip-symbolic-links

# via ['mysql']['security']['automatic_sp_privileges']
automatic_sp_privileges = 0

# via ['mysql']['security']['secure-file-priv']
secure-file-priv = /tmp

또한 다음 매개변수가 설정되지 않도록 보장합니다.

  • ['mysql']['security']['secure_auth']를 통한 old-passwords 비활성화
  • node['mysql']['security']['allow-suspicious-udfs']를 통한 allow-suspicious-udfs 비활성화
  • skip-grant-tables
  • chroot (대신 Ubuntu에서는 AppArmor를 선호합니다)

또한 /var/lib/mysql의 권한은 mysql 사용자로 제한됩니다.

테스트

root@kitploit:~
# Install dependencies
gem install bundler
bundle install

# Do lint checks
bundle exec rake lint

# Fetch tests
git clone https://github.com/dev-sec/tests-mysql-hardening test/integration

# fast test on one machine
bundle exec kitchen test default-ubuntu-1204

# test on all machines
bundle exec kitchen test

# for development
bundle exec kitchen create default-ubuntu-1204
bundle exec kitchen converge default-ubuntu-1204

이 cookbook은 손쉬운 개발을 위한 guard 파일과 함께 제공됩니다. 개발 중에 guard는 폴더를 감시하고 foodcritic과 robocop을 실행합니다.

root@kitploit:~
# list all plugins
bundle exec guard list

# run guard with foodcritic and robocop
bundle exec guard -P Foodcritic Rubocop

테스트된 운영 체제

  • Ubuntu 12.04
  • Ubuntu 14.04
  • CentOS 6.4
  • CentOS 6.5
  • Oracle 6.4
  • Oracle 6.5
  • Debian 7

기여자 + 감사

  • Dominik Richter
  • Christoph Hartmann
  • Patrick Meier
  • Edmund Haselwanter

라이선스 및 저자

  • Author:: Deutsche Telekom AG

Apache License, Version 2.0("라이선스")에 따라 라이선스가 부여됩니다. 라이선스를 준수하지 않는 한 이 파일을 사용할 수 없습니다. 라이선스 사본은 다음에서 확인할 수 있습니다.

root@kitploit:~
http://www.apache.org/licenses/LICENSE-2.0

관련 법률에서 요구하거나 서면으로 동의하지 않는 한, 라이선스에 따라 배포되는 소프트웨어는 명시적이든 묵시적이든 어떠한 종류의 보증이나 조건 없이 "있는 그대로" 배포됩니다. 라이선스에 따른 권한과 제한 사항에 대한 구체적인 내용은 라이선스를 참조하세요.

도구 다운로드