SQL Security Policy

Description

Mind Map on SQL Security Policy, created by seanie_32 on 13/01/2014.
seanie_32
Mind Map by seanie_32, updated more than 1 year ago
seanie_32
Created by seanie_32 over 10 years ago
65
2

Resource summary

SQL Security Policy
  1. Physical
    1. Disaster Recovery
      1. Ensure the disaster recovery plan is up to date
        1. Off-site back-up + secure
          1. Fireproof / Flood proof / Offline
          2. Physical Access
            1. Ensure physical access to server is restricted
              1. Server can't be turned off / disconnected / plug in keyboard or USB stick
            2. Software
              1. Anti - Virus
                1. Ensure that anti-virus is running
                  1. Has been tuned correctly
                    1. Unnecessary directories are excluded to improve performance
                      1. Exclusions and test loading have been completed
                      2. Configure Firewall
                        1. Open TCP 3306 for MySQL
                          1. Keep as many ports closed as possible
                            1. Use SSH tunnel for testing as this does not expose server across web
                            2. Vendor Updates
                              1. Ensue that server packs / hot fixes / patches are applied frequently
                                1. Both at server and MySQL level
                                  1. This fixes security risks and loopholes Results in less risk of intrusion
                                  2. Unwanted Services
                                    1. These added services could give side-door access, introducing something unexpected
                                      1. Linux – use “rcconf” removal tool to remove unwanted services
                                    2. Access Restrictions on Server
                                      1. Restrict remote access - SOCKET
                                        1. Socket on network layer model
                                          1. Connects two computers together
                                          2. Linux – skip-networking
                                            1. This stops it from opening socket connections
                                              1. Ties connection down to local host
                                                1. Needs to go into .ini file
                                          3. Restrict remote access – LOCALHOST
                                            1. Bind-address = 127.0.0.1
                                              1. Forces SQL to listen only to localhost
                                                1. Can’t accept connections from anywhere else
                                                  1. Preventing access from TCP3306 from outside source
                                            2. Restrict remote access – GRANT
                                              1. Defines who and where they will be hosted from
                                                1. Ties down specific database and specific user
                                                  1. GRANT SELECT, INSERT ON mydb.* TO ‘someuser’@’somehost’;
                                                2. Database Changes
                                                  1. Disable LOCAL INFILE
                                                    1. Prevents access to local files (eg. /etc/passwd) Stops some SQL injection attacks.
                                                    2. Change root directory
                                                      1. /chroot/mysql
                                                        1. socket = /chroot/mysql/tmp/mysql.sock
                                                        2. Remove test database
                                                          1. Can be test databases installed with MySQL
                                                            1. Allows anonymous access to database
                                                            2. DROP DATABASE test;
                                                              1. Drop the test and any other unwanted databases
                                                            3. Remove test accounts
                                                              1. SHOW GRANTS FOR ‘’@’localhost’;
                                                                1. DROP USER “”;
                                                                2. Delete account shipped with MySQL
                                                                  1. Make sure created accounts are tied down to relevant tables
                                                                  2. Change rootname and password
                                                                    1. Should upgrade to version 5 as privileges stay on previous versions.
                                                                      1. MySQL > RENAME USER root TO new_user;
                                                                      2. Lower privileges
                                                                        1. Version 5 and above has pre-set restrictions
                                                                          1. Set ownership to MySQL user:
                                                                            1. shell>ls -l /var/lib/mysql
                                                                              1. Only allow MySQL and root access: shell>ls -l /usr/bin/my
                                                                      Show full summary Hide full summary

                                                                      Similar

                                                                      All math revision
                                                                      katiehumphrey
                                                                      Health and Social Care
                                                                      NicoleCMB
                                                                      Models For Explaining Human Memory
                                                                      Matthew Li
                                                                      Computing Hardware - CPU and Memory
                                                                      ollietablet123
                                                                      AQA Biology 11.2 mitosis
                                                                      Charlotte Hewson
                                                                      Key policies and organisations Cold War
                                                                      E A
                                                                      Geometry Vocabulary
                                                                      patticlj
                                                                      Human Resource Management
                                                                      A Donaghy
                                                                      Treaty of Versailles
                                                                      Krista Mitchell
                                                                      Why did the Cold War begin?
                                                                      n.mcdonald
                                                                      Část 3.
                                                                      Gábi Krsková