Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Database
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 09-03-2007, 11:15 AM   #1
neta
Service Man
 
neta's Avatar
 
Join Date: Aug 2007
Location: sweden
Posts: 295
My Photos: (2)
iTrader: (0)

Banked:
MK Cash: $9.90

I am Worth:
MK Cash: $0.19
Donate


neta will become famous soon enoughneta will become famous soon enough
Exclamation Steps To Secure Your MySQL Databases

Introduction

If you're using MySQL, there are some easy things you can do to secure your systems and significantly reduce the risk of unauthorised access to your sensitive data.

The most valuable asset for technology-based organisations is usually the customer or product information in their databases.

And so, a critical part of database administration in such organisations consists of securing these databases against outside attack and hardware/software failures.

In most cases, hardware and software failures are handled through a data backup regimen.

Most databases come with built-in tools to automate the entire process, making this aspect of the job relatively painless and error-free.

What's not so simple, however, is the second half of the puzzle: making sure that outside hackers can't get into the system and either steal or damage the information contained therein.

And unfortunately, there usually isn't an automated way to solve this problem; rather, it requires you, the administrator, to manually put in place roadblocks and obstacles to trip up would-be hackers and to ensure that your company's data stays secure.

A common reason for not securing databases is that it is "difficult" and "complicated". While this is certainly true, if you're using MySQL, there are some easy things you can do to significantly reduce the risk you face.

This tutorial lists six such items, but you can find many more in the MySQL manual and discussion forums.

Step 1:

Remove wildcards in the grant tables

The MySQL access control system works through a series of so-called grant tables, which make it possible to define access levels for each user at the database, table or column level.

While these tables do allow administrators to set blanket permissions for a user or set of tables using wildcards, doing so is inherently dangerous because a hacker could use a single compromised account to gain access to other parts of the system.

For this reason, be precise when assigning users privileges and always ensure that users have only as much access as they need to perform their tasks.

In particular, be wary of assigning the SUPER privilege to individual users, as this level allows users to manipulate basic server configuration and access all databases.

Tip:

Use the SHOW PRIVILEGES command for each user account to audit your grant tables and see if the use of wildcard permissions is appropriate.


Step 2:

Require the use of secure passwords

User accounts are only as secure as the passwords used to protect them. For this reason, the very first thing you should do when you install MySQL is assign a password to the MySQL root account (empty by default).

Once you've closed this gaping hole, the next step is to require that every user account must have a password and ensure that passwords do not use easily-recognisable heuristics such as birthdays, user names or dictionary words.

Tip:
Use the MySQL --secure-auth option to prevent the use of older, less secure MySQL password formats.

Step 3:

Check the permissions of configuration files

Very often, to make server connections faster and more convenient, both individual users and server administrators store their user account passwords in their per-user MySQL options file. However, this password is stored in plain-text within the file and can easily be read.

Therefore, it's important to ensure that such per-user configuration files are not viewable by other users of the system, and are stored in non-public locations. Ideally, you'd want the per-user configuration to be stored in the user's home directory with permissions 0600.

Step 4:

Encrypt client-server transmissions

An important issue in the MySQL (and any) client-server architecture involves the security of data being transmitted over the network.

If client-server transactions take place in plaintext, it is possible for a hacker to "sniff" the data packets being transmitted and thus gain access to sensitive information.

You can close this hole either by enabling SSL in your MySQL configuration, or by using a secure shell utility like OpenSSH to create a secure encrypted "tunnel" for your data to pass through.

Encrypting your client-server connection in this manner makes it extremely hard for unauthorised users to read the data going back and forth.

Step 5:

Disable remote access

If your users don't need to access the server remotely, you can significantly reduce the risk of a network attack by forcing all MySQL connections to take place via the UNIX socket file.

This is accomplished by starting the server with the --skip-networking option. Doing this blocks TCP/IP network connections to MySQL and ensures that no user can remotely connect to the system.

Tip:

An enhancement to this would be to add the directive bind-address=127.0.0.1 in your MySQL server configuration, to force MySQL to bind to the IP address of the local machine and thus ensure that only users on the same system can connect to MySQL.


Step 6:

Actively monitor the MySQL access log

MySQL comes with a number of different log files, which keep track of client connections, queries and server errors. Of these, the most important is the general query log, which logs each client connection and disconnection with a timestamp, and also records each query executed by a client.

If you suspect unusual activity, such as that associated with a network break-in attempt, it's a good idea to monitor this log to gain an understanding of the source of the activity.

Protecting your MySQL databases is an ongoing task, and so you shouldn't rest easy once you've done the steps above.

Visit the MySQL manual and the MySQL forums for more security tips, and be proactive in monitoring and updating the security of your system.
neta is offline  
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Databases lost Stephane M Database 4 07-01-2007 7:34 PM
Using SLL to create secure connection between a servlet (using JDBC) and MySQL Ted Byers Database 0 07-01-2007 6:29 PM
[Periodic Charter Post] comp.databases.mysql - MySQL RDBMS technical discussions. Gary L. Burnore Database 0 07-01-2007 6:27 PM
Searching MySQL databases with PHP Richard Conway PHP 1 07-01-2007 3:58 PM
New web gateway to alt.comp.databases.mysql Administrator Database 0 05-31-2007 8:40 PM


Featured Websites




All times are GMT +1. The time now is 12:21 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98