IT360: Applied Database Systems. Database Security. Kroenke: Ch 9, pg 309-314 PHP and MySQL: Ch 9, pg 217-227



Similar documents
Database Security. Principle of Least Privilege. DBMS Security. IT420: Database Management and Organization. Database Security.

QUANTIFY INSTALLATION GUIDE

MySQL Security: Best Practices

Setting Up Specify to use a Shared Workstation as a Database Server

WordPress Security Scan Configuration

SQL Server Hardening

Oracle Audit Vault and Database Firewall

Database Administration with MySQL

Hacking the WordpressEcosystem

Serious Threat. Targets for Attack. Characterization of Attack. SQL Injection 4/9/2010 COMP On August 17, 2009, the United States Justice

Microsoft SQL Server Security & Auditing. March 23, 2011 ISACA Chapter Meeting

Web Plus Security Features and Recommendations

Keeping Tabs on the Top 5 Critical Changes in Active Directory with Netwrix Auditor

SQL Injection January 23, 2013

ADO and SQL Server Security

SECURITY DOCUMENT. BetterTranslationTechnology

Release Notes For Versant/ODBC On Windows. Release

Access Control Policy. Document Status. Security Classification. Level 4 - PUBLIC. Version 1.0. Approval. Review By June 2012

MySQL Backup and Security. Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer <lenz@mysql.com>

What s New in MySQL 5.7 Security Georgi Joro Kodinov Team Lead MySQL Server General Team

SB 1386 / AB 1298 California State Senate Bill 1386 / Assembly Bill 1298

How to install/configure MySQL Database

Livezilla How to Install on Shared Hosting By: Jon Manning

SQL Injection Attack Lab

In This Lecture. Security and Integrity. Database Security. DBMS Security Support. Privileges in SQL. Permissions and Privilege.

Nikolay Zaynelov Annual LUG-БГ Meeting nikolay.zaynelov.com

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

Securing Data in Oracle Database 12c

Chapter 23. Database Security. Security Issues. Database Security

The Need for Real-Time Database Monitoring, Auditing and Intrusion Prevention

Intunex Oy Skillhive Service Description 1 / 6

How To Restore An Org Server With Anor Backup For Windows (Oracle)

Security It s an ecosystem thing

MySQL Quick Start Guide

Security Architecture Whitepaper

For more information on SQL injection, please refer to the Visa Data Security Alert, SQL Injection Attacks, available at

COSC344 Database Theory and Applications. Lecture 23 Security and Auditing. COSC344 Lecture 23 1

4cast Server Specification and Installation

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

Application note: Connecting the to a Database

Database Extension 1.5 ez Publish Extension Manual

Introduction to PhPCollab

Data Stored on a Windows Computer Connected to a Network

The Web Pro Miami, Inc. 615 Santander Ave, Unit C Coral Gables, FL T: info@thewebpro.com

Credit Cards and Oracle: How to Comply with PCI DSS. Stephen Kost Integrigy Corporation Session #600

DIPLOMA IN WEBDEVELOPMENT

Advanced Digital Imaging

Windows Operating Systems. Basic Security

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

SQL Injection. The ability to inject SQL commands into the database engine through an existing application

Thick Client Application Security

Client Security Risk Assessment Questionnaire

GUIDE TO SYBASE SECURITY

Website Pros Templates v1.0. Database Template Overview

Achieving PCI COMPLIANCE with the 2020 Audit & Control Suite.

An Oracle White Paper June Security and the Oracle Database Cloud Service

Overview. Edvantage Security

Database Security. Sarajane Marques Peres, Ph.D. University of São Paulo

WebCruiser Web Vulnerability Scanner User Guide

Advanced Web Technology 10) XSS, CSRF and SQL Injection 2

NNT CIS Microsoft SQL Server 2008R2 Database Engine Level 1 Benchmark Report 0514a

DATABASE SECURITY, INTEGRITY AND RECOVERY

<Insert Picture Here> MySQL Security In A Cloudy World

<COMPANY> PR11 - Log Review Procedure. Document Reference Date 30th September 2014 Document Status. Final Version 3.

Securing SQL Server. Protecting Your Database from. Second Edition. Attackers. Denny Cherry. Michael Cross. Technical Editor ELSEVIER

1. Building Testing Environment

Security and Control Issues within Relational Databases

Installation Tutorial Script: The Real Estate Script. 1. Please login to download script. On PHP Classifieds Script web site.

Data Stored on a Windows Computer Connected to a Network

Concepts Design Basics Command-line MySQL Security Loophole

SQL SERVER Anti-Forensics. Cesar Cerrudo

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com

Lucid Key Server v2 Installation Documentation.

SQL Server Hardening

Division of IT Security Best Practices for Database Management Systems

A Guide to Securing MySQL on Windows

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

Oracle Database 10g Express

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Roles: A New Security Feature in INFORMIX-OnLine Dynamic Server, Version 7.10.UD1

Database security tutorial. Part I

SECURITY CHAPTER 24 (6/E) CHAPTER 23 (5/E)

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Avatier Identity Management Suite

Using Foundstone CookieDigger to Analyze Web Session Management

Protected Trust Directory Sync Guide

Oracle Database 11g: Security Release 2. Course Topics. Introduction to Database Security. Choosing Security Solutions

Managing User Accounts

Integrating LANGuardian with Active Directory

SQL Injection Attack Lab Using Collabtive

MS SQL Server Backup - User Guide

An Introduction to SQL Injection Attacks for Oracle Developers. January 2004 INTEGRIGY. Mission Critical Applications Mission Critical Security

Server Security. Contents. Is Rumpus Secure? 2. Use Care When Creating User Accounts 2. Managing Passwords 3. Watch Out For Aliases 4

Database security issues PETRA BILIĆ ALEXANDER SPARBER

ClockWork Enterprise 5

Oracle Database Security. Paul Needham Senior Director, Product Management Database Security

BM482E Introduction to Computer Security

Data Breaches and Web Servers: The Giant Sucking Sound

Transcription:

IT360: Applied Database Systems Database Security Kroenke: Ch 9, pg 309-314 PHP and MySQL: Ch 9, pg 217-227 1 Database Security Rights Enforced Database security - only authorized users can perform authorized activities Developing database security Determine users rights and responsibilities Responsibilities Not Enforced Enforce security requirements using security features from both DBMS and application programs 2 1

DBMS Security DBMS products provide security facilities They limit certain actions on certain objects to certain users or groups (also called roles) Almost all DBMS products use some form of user name and password security Examples? 3 Principle of Least Privilege Privileges A user (or process) should have the lowest level of privilege required to perform his assigned task 4 2

GRANT and REVOKE GRANT create users / grant them privileges REVOKE remove privileges Privileges: ALL SELECT INSERT, DELETE, UPDATE CREATE, ALTER, DROP USAGE //no privileges 5 GRANT Syntax GRANT privileges [columns] ON object TO user [IDENTIFIED BY 'password'] [WITH GRANT OPTION] Example: GRANT ALL ON dbmusic.* TO dbuser IDENTIFIED BY userpass 6 3

REVOKE Syntax REVOKE priv_type ON object FROM user [, user] Example: REVOKE INSERT ON dbmusic.* FROM dbuser 7 Changing the Password Option 1 mysql database, user table, password column UPDATE user SET Password = PASSWORD( newpass ) WHERE User = dbuser ; [flush privileges;] 8 4

Changing the Password Option 2 SET PASSWORD [FOR username @ host ] = PASSWORD('newpass'); Example: While logged in as dbuser SET PASSWORD = PASSWORD( it420t ) 9 DBMS Security Guidelines Run DBMS behind a firewall, but plan as though the firewall has been breached Apply the latest operating system and DBMS service packs and fixes Use the least functionality possible Protect the computer that runs the DBMS 10 5

DBMS Security Guidelines Manage accounts and passwords Use a low privilege user account for the DBMS service Protect database accounts with strong passwords Monitor failed login attempts Frequently check group and role memberships Audit accounts with null passwords Assign accounts the lowest privileges possible Limit DBA account privileges Planning Develop a security plan for preventing and detecting security problems Create procedures for security emergencies and practice them 11 Application Security If DBMS security features are inadequate, additional security code could be written in application program Example? Use the DBMS security features first 12 6

Application Users Enforce strong passwords Never store passwords in plain text 13 SQL Injection Attacks! SQL injection attack occurs when data from the user is used to modify a SQL statement Example: users are asked to enter their alpha into a Web form textbox User input: 081234 OR TRUE SELECT * FROM STUDENT_GRADES WHERE Alpha = 081234 OR TRUE; Result? 14 7

Making your MySQL Database Secure - Server Do not run MySQL (mysqld) as root! Set up a user just for running the server Make directories accessible just to this user Run MySQL server behind a firewall 15 Making your MySQL Database Secure - Passwods Make sure all users have strong passwords Connecting from PHP: Have the user an password stored in a file my_db_connect.inc.php and include this file when required Store my_db_connect.inc.php outside web tree ($_SERVER[ DOCUMENT_ROOT ]) Store passwords only in.php files (not.inc,.txt, etc.) Do not store application passwords in plain text. Use sha1() or other one-way encryption method. 16 8

Making your MySQL Database Secure User Privileges Use principle of least privilege: Grant only the privileges actually needed to each user Grand access only from the host(s) that they will be connecting from 17 Making your MySQL Database Secure Web Issues Set up a special user just for web connections, with minimum required privileges Check all data coming from user (SQL Injection Attacks!!) addslashes() / stripslashes() doubleval() 18 9