Database Security and Privacy UNIT - IV - PPT
Database Security and Privacy UNIT - IV - PPT
Prepared by
Dr. B. Muruganantham
Assistant Professor
Department of
Computer Science and
Engineering
SRMIST, Chennai
References :
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
UNIT IV-AUDITING DATABASE ACTIVITIES
Introduction
Using Oracle Database Activities
Creating DLL Triggers with Oracle
Auditing Database Activities with Oracle Auditing
Server Activity with SQL Server 2000
Security and Auditing Project Case Study
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Introduction
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Introduction
SECURITY
AUDITING
The auditing mechanism would enable
users to trace changes to sensitive data
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Overview
Definitions
In general, an audit examines the documentation that reflects the action, practices
and conduct of business or individual.
Database auditing follows this general definitions
The list that follows contains general auditing and database auditing definitions.
Audit / Auditing - The process of examining and validating
documents, data, processes, systems, or other activities to
ensure that the audited entity complies with its
objective
Audit log – A document that contains all activities that are being audited
ordered in a chronological manner.
Audit report – A document that contains the audit findings and is generated by an
individual(s) conducting the audit
Audit trail – A chronological record of document changes, data changes, system activities, or
operational events
Data audit – A chronological record of data changes stored in a log file or a database table
object
Database auditing - A chronological record of database activities , such as shutdown, startup,
logons, and data structure changes of database objects
Internal auditing – Auditing activities conducted by the staff members of the organization.
External auditing - Auditing activities conducted by the staff members outside of the
organization.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Activities
Auditing activities are performed as a part of an audit, audit process or audit plan
The following list presents the auditing activities
(Note : Activities are not listed in any specific order)
Evaluate and apprise the effectiveness and adequacy of the audited entity
according to the auditing objectives and procedures
Ascertain and review the reliability and integrity of the audited entity
Ensures the organization being audited is in compliance with the policies,
procedures, regulations, laws, and standards of the government and the
industry.
Establish plans , policies, and procedures for conducting audits.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Activities…
Publish audit guidelines and procedures to the company itself and its partners
and clients when appropriate.
Act as liaison between the company and the external audit team.
Act as a consultant to architects, developers and business analysts to ensure
that the company being audited is structured in accordance with the audited
objectives
Organize and conduct internal audits
Ensure all the contractual items are met by the organization being audited.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Environment
Components of Auditing Environment
Objectives
An audit without objectives is useless
To conduct audit you must know what the audit you must know what the audited entity is
to be measured
Usually , the objectives are set by the organization , industry standards, or government
regulations and laws
Procedures
To conduct an audit, step-by-step instructions and tasks must be documented ahead of
time.
In the case of government conducted audit, all instructions are available public
In the case of organizational audit, specialized personal document the procedure to be
used not only for the business itself, but also for the audit
People
Every auditing environment must have an auditor , even in the case of automatic audit
Other people involved in the audit are employees, manager, and anyone being audited
Audited entities
This includes people, documents, processes, systems, activities or any operation that are
being audited
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Environment …
The following figure shows the four major components of the auditing
environment
M O
M ee BJ
rs
di y
ai t
E
EC
au rit
to
nt O
PL
rg
nd ecu
a i
or n a n TI
sa ,S
m do iz VE
PE
or e r
ee cu at
t s m io S
at ga
ys en n p
is an
in M te t o
m ac lic
tr
m ff.
go cu ie
Ad Sta
al rac s,
s y,
AUDITING
EINVIRONMENT
Em
pl
io ,
s l at s e s
ns
oy
nd s, r pro
em o
D s, cum
io ep
ES
IT an e
ct St
ED
n
ru y-
d nt
R
s t -b
ac s,
U
tiv pr In tep
a
EN
D
iti o c
S
es es
T IT s es
IE ,
O
PR
S
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Database Auditing Environment …
The following figure shows the five major components of the auditing
environment
M
O BJ
E
M ee
ai t O EC
ity rs nt TI
PL Securudito ai rga
or n d ni VE
O z
PE nagers and
m oc at
, a ee u
t s me oni S
a or ys n po
. M trat te t a lic
ff m cc ie
a s
St ini go ur s,
al ac
m s y,
Ad
laws
Database
Em
ation ses,
s and
AUDITING
plo stems
RES
ns, r p proces
AU
EINVIRONMENT
yee
sy
DIT
s, d
EDU
egul
ocu d activ
te
, an
Instr tep-by_S
ED
m en
C
PRO
uctio
E
ts, p s
NT
S
itie
roce
ITI
sses
ES
a Changes, Data
,
DB activities, Dat
es and OS
Accuracy, Data fil
DATABASE
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Process
The Quality Assurance (QA) team retested every database application function
and try to find bugs.
The purpose of QA process in software engineering to make sure that the system
is bug free and that the system is functioning according to its specification.
The auditing process ensures that the system is working and complies with the
policies, standards, regulations or laws set forth by organization, industry or
government.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Process …
Another way to distinguish between QA and Auditing Process is by examining
the timing of each
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Process …
Differences in QA , Auditing and Performance Monitoring processes
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Process …
The below figure illustrates the auditing process flow
Ensures that Identify the
auditing changes and
objectives are provide
met according feedback to the
to business system
Make sure all policies and development
objectives are specifications phase
well defined
Planning, Analysis,
Design, Development, UNDERSTAND REVIEW, VERIFY & REPORT &
PRODUCTION OBJECTIVE VALIDATE DOCUMENT
Testing, and
Implementation
Policies , Laws ,
Regulations and
Industry standards
must be
incorporated as the
part of System
requirements and
Specification
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Objectives
Auditing objectives are established as a part of the development process of the entity to be
audited
For example , when a software application is being coded, the developers include in their
software development design objectives the capability to audit the application
Auditing objectives are established and documented for the following reasons:
Complying – Identify all company policies , government regulations, laws and the
industry standards with which your company comply.
Informing – All policies, regulations, laws and standards must be published and
communicated to all parties involved in the development and
operation of the audited entity.
Planning – Knowing all the objectives enables the author to plan and document
procedures to asses the audited entity.
Data Integrity – Ensure that data is valid and in full referential integrity
Applications Users and roles – Ensures that users are assigned roles that
correspond to their responsibilities and duties
Data Confidentiality – Identify who can read data and what data can be read
Access Control – Ensures that the application records times and duration when a
user logs onto the database or application
Data changes – Create an audit trail of all data changes
Data Structure Changes – Ensures that the database logs all data structure changes
Database or application availability – Record the number of occurrences and
duration of application or database shutdowns all the startup times . Also, record
all reason for any unavailability.
Change Control – Ensure that a change control mechanism is incorporated to
track necessary and planned changes to the database or application.
Physical Access – Record the physical access to the application or the database
where the software and hardware resides.
Auditing Reports – Ensure that reports are generated on demand or
automatically , showing all auditable activities
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Classification and Types
Audit Classifications
Every industry and business sector uses different classifications of audits.
Definition of each classification can differ from business to business.
Will discuss most generic definition of audit classifications.
Internal Audit
An internal audit is an audit that is conducted by a staff member of the company
being audited
The purpose and intention of an internal audit is to :
Verify that all auditing objectives are met by conducting a well-planned and
scheduled audit
Investigate a situation that was promoted by an internal event or incident.
This audit is random , not planned or scheduled.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Classification and Types …
External Audit
An external audit is conducted by a party outside the company that is being
audited.
The purpose and intention of an External audit is to :
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Classification and Types …
Automatic Audit
Some systems that employ this type of audit to generate reports and logs.
Manual Audit
The team uses various methods to collect audit data, including interviews, document
reviews and observation.
The auditors may even perform the operational task of the audited entity.
Hybrid Audit
Audit Types
Financial Audit – Ensures that all financial transactions are accounted for an
comply with law.
Ex : Companies save all trading transactions for a period of time
to comply with government regulations
Security Audit – Evaluates if the system is as secure as it should be.
The audit identifies security gaps and vulnerabilities
Ex: Company might ask a hacker to break the company’s
network system to determine how secure or vulnerable the
network is.
Compliance Audit – Verifies that the system complies with industry standards,
government regulations, or partner and client policies
Ex: All pharmaceutical companies must keep paper trails of all
research activities to comply with industry standards as well
government regulations
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Classification and Types …
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Benefits and Side Effects of Auditing
Benefits
Enforces company policies, government regulations and laws
Develops controls that can be used for purposes other than auditing
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Benefits and Side Effects of Auditing
Side Effects
From a DB perspective
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models
Action
Start
Before auditing models, it is more Yes
Yes
Description of the action that
was performed Get Previous value and record it in
the database
Name of the user or userid who
performed the action Action
Continue with action
Completed
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Simple Auditing Model 1
The first auditing model is The given figure illustrates this SIMPLE MODEL 1
called ‘SIMPLE” because it is APP_ENTITY
APP_ACTION _TYPE
APP_AUDIT _ACTION
easy to understand and ENTITY_ID ACTION_TYPE_ID
AUDIT_ACTION_ID
develop. ENTITY_NAME ACTION_TYPE_DESC
ENTITY_TYPE ENTITY_ID (FK) CTL_REC_STAT
CTL_REC_STAT ACTION_TYPE_ID (FK)
AUDIT_START_DATE
This model registers audited AUDIT_EXPIRE_DATE
CTL_INS_DTTM
entities in the audit model CTL_UPD_DTTM
repository to CTL_UPD_USER
CTL_REC_STAT
chronologically track
activities performed on or by
these entities.
APP_AUDIT _DATA
An entity can be a user, AUDIT_DATE_ID
table, column, and an
AUDIT_ACTION_ID (FK)
activity can be a DML AUDIT_DATA
transaction and logon and AUD_INS_DTTM
AUD_UPD_DTTM
logoff times. AUD_UPD_USER
AUD_REC_STAT
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Simple Auditing Model 2
The given figure illustrates this Simple auditing
model 2
In this model , only column
value changes are stored for
APP_AUDIT_TABLE
audit purposes.
TABLE_ID
TABLE_NAME
The audit data table TABLE_DESCRIPTION
APP_AUDIT_DATA contains APP_AUDIT_DATA AUDIT
ARCHIVE
chronological data on all AUDIT_DATA_ID ARCHIVE_COUNT
changes on column that are TABLE_ID (FK) PURGE
AUDIT_DATA PURGE_COUNT
registered in CTL_INS_DTTM COLUMNS
APP_AUDIT_TABLE. CTL_UPD_DTTM COLUMNS_COUNTSR
CTL_UPD_USER START_DATE
CTL_REC_STAT END_DATE
CTL_INS_DTTM
There is a purging and archiving CTL_UPD_DTTM
mechanism is used to help CTL_UPD_USER
CTL_REC_STAT
reduce the amount of data
stored in DB.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Of course the repository for tis model is more complex than previous models
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
The following figure presents the flow of the user interface
Audit Table
Audit User
Interface
Table
Data
Table
Name
Populate
Table Request Table
4 Table Name User
Perform Data
Name Name
audit
check
3 5
Table 6 7
1 Set Set
Name View Build
Populate tables Users
Audit Audit
tables for for
Data View
audit Audit
2
Perform
Audit
Audit
Table
Data Audit
Audit Name Table
Data User
Data Table Name Table Data
Column Table Data
Name
Name Name
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Data model of the repository for an Advanced Auditing Model
APP_TABLES APP_USERS
APP_COLUMNS
ENTITY_ID ENTITY_ID
ENTITY_ID TABLE_ID USER_ID
COLUMN_NAME TABLE_NAME TABLE_NAME
TABLE_ID (FK) CTL_REC_STAT CTL_REC_STAT
CTL_REC_STAT
APP_AUDIT_ACTION
AUDIT_ACTION_ID
ENTITY_ID (FK)
ENTITY_TYPE
ACTION_TYPE_ID (FK)
AUDIT_START_DATE
AUDIT_EXPIRE_DATE
CTL_INS_DTTM APP_AUDIT_DATA
CTL_UPD_DTTM AUDIT_DATA_ID
CTL_UPD_USER
CTL_REC_STAT AUDIT_ACTION_ID
APP_ACTION_TYPE
(FK)
ACTION_TYPE_ID AUDIT_DATA
CTL_INS_DTTM
ACTION_TYPE_DESC CTL_UPD_DTTM
CTL_REC_STAT CTL_UPD_USER
CTL_REC_STA
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Historical Data Model
This model is used for applications that require a record of the whole row
when a DML transaction is performed on the table
Typically used in most financial applications
With this model , the whole row is stored in the HISTORY table, before it is
changed or deleted
The following figures illustrates this model
APP_DATA_TABLE
APP_DATA_TABLE _HISTORY
PRIMARY_KEY_COLUMN
PRIMARY_KEY_COLUMN
DATA_COLUMN_01 DATA_COLUMN_01
DATA_COLUMN_02 DATA_COLUMN_02
……………………………. …………………………….
……………………………. …………………………….
……………………………. …………………………….
DATA_COLUMN_n DATA_COLUMN_n
CTL_INS_DTTM CTL_INS_DTTM
CTL_UPD_DTTM CTL_UPD_DTTM
CTL_UPD_USER CTL_UPD_USER
CTL_REC_STAT CTL_REC_STAT
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Auditing Application Actions Model
There may be a requirement for an application to audit specific operations or
actions
The following figure represents a Data Model of a repository for auditing
application actions
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
C2 Security
C2 security is a type of security rating that evaluates the security framework for
computer products used in government and military organizations and institutes.
The standard was conceived by the U.S. National Computer Security Center (NCSC)
to create a minimum security benchmark for all computing products and applications
that process confidential government and military information.
The National Security Administration has given a C2 security rating to Microsoft SQL
Server 2000.
This means that the server passes requirements set by the Department of Defence
and is typically implemented in military and government applications
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Models …
Requirements for enabling C2 auditing in SQL Server include the following :
• SQL Mail
• English Query
• DTC
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers
It is a PL/SQL procedure
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
ORACLE trigger timings or events for DML events
Application
User
TABLE ROW
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
Trigger Syntax
Trigger Event
[INSERT | UPDATE | DELETE......]
END;
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
The given syntax shows the different optional statements that are present in trigger
creation.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
ORACLE Trigger Execution
A trigger can be in either of two distinct modes:
Enabled - An enabled trigger executes its trigger action if a triggering statement is
issued and the trigger restriction (if any) evaluates to TRUE.
Disabled - A disabled trigger does not execute its trigger action, even if a triggering
statement is issued and the trigger restriction (if any) would evaluate
to TRUE.
For enabled triggers, Oracle automatically
executes triggers of each type in a planned firing sequence when more than one
trigger is fired by a single SQL statement
performs integrity constraint checking at a set point in time with respect to the
different types of triggers and guarantees that triggers cannot compromise integrity
constraints
provides read-consistent views for queries and constraints
manages the dependencies among triggers and objects referenced in the code of the
trigger action
uses two-phase commit if a trigger updates remote tables in a distributed database
if more than one trigger of the same type for a given statement exists, Oracle fires
each of those triggers in an unspecified order
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
The following figure gives the Order of trigger execution
3 BEFORE Trigger
Row
4 AFTER Trigger level
1 BEFORE Trigger
ROW
Statement
level
2 AFTER Trigger
TABLE
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
Example : Row level Trigger
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
Example : Statement level Trigger
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Oracle Triggers …
User can view all triggers created on a table by using USER_TRIGGERS data
dictionary view.
The structure of USER_TRIGGERS view is as follows
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
SQL Server Triggers
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
SQL Server Triggers…
In this syntax:
The schema_name is the name of the schema to which the new trigger belongs.
The schema name is optional.
The event is listed in the AFTER clause. The event could be INSERT, UPDATE,
or DELETE. A single trigger can fire in response to one or more actions against
the table.
The NOT FOR REPLICATION option instructs SQL Server not to fire the trigger
when data modification is made as part of a replication process.
The sql_statements is one or more Transact-SQL used to carry out actions once
an event occurs.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE
The activities are divided into two types based on the type of SQL command
statement used :
Activities defined by DDL (Data Definition Language)
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE
Auditing DDL Activities
The following figure presents the audit syntax diagram ( ORACLE 10g)
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
Audit command syntax Where :
AUDIT Statement option – Tells ORACLE to audit the specified
{ DDL or DCL statement
{ { statement_option | ALL } DDL – CREATE, ALTER, DROP and TRUNCATE
[,{statement_option | ALL }] …… DCL – GRANT , REVOKE
|,{syetem_privilege | ALL
System privilege – Tell ORACLE to audit the specified
PRIVILEGES }
privilege such as SELECT, CREATE ANY, or ALTER ANY
}
[BY { proxy [,proxy]….. Object_option – Specifies the type of privileges for the
| user [,user]….. specified object to be audited
]
BY SESSION – Tells ORACLE to record audit data once
|
per session even if the audited statement issued multiple
{Object_option [, object_option ] …… | times in session
ALL }
ON { [ schema. ] object BY ACCESS - Tells ORACLE to record audit data every
|DIRECTORY directory_name time audited statement is issued.
|DEFAULT
WHENEVER SUCCESSFUL – Tells ORACLE to capture
} audit data only when the audited command is successful
}
[ BY {SESSION | ACCESS } } WHENEVER NOT SUCCESSFUL- Tells ORACLE to
[WHENEVER [NOT] SUCESSFUL ] ; capture audit data only when the audited command fails
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
DDL activities Example :
Suppose you want to audit a table named CUSTOMER every time it is altered or
every time a record from a table deleted.
The following steps show you how to do this.
Before perform , drop are disable all triggers associated with CUSTOMER table.
Step 1 : Use any user other than SYS or SYSTEM to create the CUSTOMER
Table created
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
Step 2 : Add three rows into the CUSTOMER table and commit changes
1 row created
1 row created
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
Step 3 : Log on as SYS or SYSTEM to enable auditing , as specified in this example
the first statement for ALTER and the next is for DELETE
Audit succeeded.
Audit succeeded.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
Step 4 : Login as the owner of CUSTOMER table, DBSEC delete a row and modify
the structure of the table, as specified in the following code
1 row deleted.
Table altered
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
In this step you will see the audit records stored in the auditing tables caused by the DELETE
and ALTER statements issued in step 4.
Step 5 : Login in as SYSTEM and view the DBA_AUDIT_TRAIL
Two records will be available as shown in the figure below
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
When audit process got over of a specific object or command, you may turn it
off by using the NO AUDIT statement.
The following step turns off auditing on the two statements issued in step 3.
Noaudit succeeded.
Noaudit succeeded.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
DCL Activities Example:
You are auditing the GRANT privilege issued on a TEMP table owned by DBSEC.
The following steps shows how to audit the DCL statements audited.
The same steps to be followed for all DCL Commands.
SQL> COMMIT;
Commit complete.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Database Activities with ORACLE …
Step 2: Log on as DBSEC and grant SELECT and UPDATE privileges to SYSTEM on
TEMP table
SQL> CONN DBSEC
Enter password : *****
Connected.
2 rows selected
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server 2000
Microsoft SQL Server 2000 provides auditing as a way to track and log activity for
each SQL Server occurrence
User must be a member of the sysadmin fixed server role to enable or modify
auditing
Every modification of an audit is an auditable event
Auditing
C2Auditing
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
Implementing SQL Profiler
One of the tools that accompanies SQL Server 2000 is SQL Profiler
This tool provides the user interface for auditing events.
You can audit several types of events using SQL Profiler
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
SQL Server configuration
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
After the audit level is set, you can then use SQL Profiler to monitor security
events.
The following events can be audited
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
You can start SQL Profiler by selecting it from the program group on the Start menu or from the
tools menu in Enterprise.
To start a new Audit Trace from the file menu, Click New , then Trace
It is shown in the below figure
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
The new trace dialog box appears,
as shown in the figure
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
On the events tab, you specify
events to be audited and in which
category they belong
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
Add the Login Change Password
security event to the trace by
performing following steps
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Auditing Server Activity with SQL Server
2000 …
Dr.B.Muruganantham
10/25/2023 AP / CSE /SRMIST
Security and Auditing Project Case Study
Introduction
DBA are often asked to provide an effective data security and auditing design
The case studies follow require you to use these concepts, methods, and
techniques to solve data accessibility
This cases can be implemented in either ORACLE or SQL Server
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
A new dot-com has decided to launch an affiliated Web site, specifically for
individuals interested in database issues.
The main mission of the Web site is to provide a forum for database
technical tips, issues, and scripts.
The CIO and his technical team held a meeting to draft the requirements
for the new web site and decided that it would include the following.
Technical documents
A forum where members can exchange ideas and share experiences
Online access
A tips section
Technical support for error messages
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
Immediately after the meeting, the newly appointed project manager asks you to
implement security for the site.
The manager mentions that the security of a public database is so important that
the CIO himself / herself has outlined the security requirements, as follows
The online DB will have 10 public host database accounts that allow multiple
sessions
The password of a public host account must be reset to its original setting whenever
disconnects or logoffs occur
The maximum duration for a session is 45 minutes
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
The public host accounts will have privileges to create the most common
database objects
All newly created database objects must be removed before logoff
The database must have the default human resources user account enabled.
When number of logs onto the database, all session information, such as IP
address, terminal , user session information must be recorded for future
analysis.
Note : You may add other security auditing features, as long as you do not
overlook any of the requirements in this list
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
The given figure represents the payroll application model for case 2
EMPLOYEE COMPANY PAYROLL_PERIOD
EMPLOYEE_ID COMPANY_ID PP_ID
COMPANY_ID (FK) PP_ID (FK) PP_DESCRIPTION
TAX_ID CONTACT_NAME
FIRST_NAME STREET_NAME
LAST_NAME CITY
HOURLY_SALARY STATE
FED_CODE ZIPCODE COMPANY_ADMINISTRATORS
STATE_CODE PHONE CA_ID
MEDICAL_ELECTION FAX
FOUR01_ELECTION EMAIL COMPANY_ID (FK)
MEDICAL_DEDUCTION URL FIRST_NAME
OTHER_DEDUCTION STATUS LAST_NAME
SICK_DAYS SYSTEM_USERNAME
VACATION_DAYS
TIMESHEET
TS_ID DAILY_WORK_HOURS
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
Your job is to develop a new database application to keep track of the jobs
awarded to different contractors
After several interviews with clerks and managers , you found out that a prior
attempt at application development by a consulting company resulted in a
draft of an entity – relationship ( ER ) diagram
The ER diagram depicts all the required information about the contractors and
the awarded jobs.
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
The given figure presents Contractor job data model for case 3
CONTRACTOR JOB
CONTRACTOR_ID JOB_ID
TAX_ID
CONTRACTOR_ID ( FK )
CONTRACTOR_TYPE_ID ( FK )
JOB_TYPE_ID ( FK )
CONTRACTOR_NAME
JOB_DESRIPTION
STREET_ADDRESS_01 JOB_CLASSIFICATION
STREET_ADDRESS_02 JOB_RATE
CITY START_DATE
STATE
COMPLETION_DATE
ZIPCODE
DAILY_PENALTY
CONTACT_NAME
PAYMENT_AGREEMENT
PHONE
FAX
MOBILE_PHONE
EMAIL
URL
CONTRACTOR_STATUS
CONTRACTOR JOB_TYPE
CONTRACTOR_TYPE_ID JOB_TYPE_ID
CONTRACTOR_TYPE_DESCRIPTION JOB_TYPE_DESCRIPTION
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
During your meeting with the project manager for this application , you are
asked to design an application with the following capabilities
Obtain the approval of project manager before accepting any contract job
for more than $10,000
Alert the project manager whenever an awarded job is modified to a value
greater than $10,000
Implement three levels of security
The DEPARTMENT CLERK level allows clerks to add and update records
The need your help to solve a series of database and application violations
When you meet with the hiring manager, he/she explains that there has been
a series of inexplicable, suspicious activities on the applications and
production databases
The company wants to know
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
Also the company want to have an audit trail for all these activities but that
company was not interested in historical changes trail
As a consultant, your job is to design an audit model to meet these
requirements
The following is the summary of the project requirements
Audit trail of users that are modifying structures of the application schema
tables
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
Sample data model for case 4
You may use two tables illustrated in the given figure as sample of application
schema tables.
PHYSICIAN ALERT_SCHEDULE
PHYSICIAN_ID ALERT_ID
FIRST_NAME PHYSICIAN_ID ( FK )
LAST_NAME ALERT_TIMESTAMP
MOBILE_NUMBER ALERT_STATUS
PAGER_NUMBER ALERT_COUNT
RESPONSE
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
Application users
Roles
Applications
Application Modules
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
Your mission is to create an authorization data model with a relevant auditing repository
The following is a summary of the project security requirements
There must be one database user account for the application schema owner
Database – assigned roles are not followed
There must be application roles only
Each application use is assigned to application modules
Each application user is assigned a security level that indicates the type of operations the
user can perform within the application.
Operations are READ,WRITE, DELETE and ADMINISTER
Passwords must be stored within the designed security module
Each user has a logon identification number to the application
The security model should have the flexibility to logically lock, disable and remove
accounts
Application accounts must have an activation date and expiry date
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST
Security and Auditing Project Case Study
The security module must be coupled with an auditing module that meets these
auditing requirements
It must have an audit trail of the date and time a user connects and
disconnects from application
It must have an audit trail of application operations that includes the date
and time operations were performed by the application user
It must have an audit trail of all activities and operations performed on the
security module
The auditing module must be coupled with the security module
10/25/2023 Dr.B.Muruganantham
AP / CSE /SRMIST