Thursday, March 31, 2011

Opinions about ActiveBase webcast

I attended the ActiveBase webcast just now. The brief introduction of their product can be found here: link. Here's a quick summary of their product,

ActiveBase, currently support oracle and sql server, provides sql proxies based on query rewriting to dynamiclly anonymize data. There's no need of change to application and db. The product can be installed 1. on each database server. 2. dedicated app servers as proxies/firewall.

The protection solutions they provide: masks, scrambles, hides, audits, blocks fields. They adopt Role Based Access Aontrol to determine the anonymization methods and results returned to user.

Major concerns I have about their product:

- It seems the query rewritting technique needs a lot of manual effort, for each type of query. It is hard to automate for ad hoc queries. So there's big maintaince cost.

- They don't have any privacy guarantee on their solution. Specificly, they use the query proxy technique and dynamiclly rewrite each query and return answers. Will the attacker be able to design queries carefully, and get multi versions of the anonymized data, make comparisons and thus lead to information leakage?

- What's the usability of the anonymized dataset? For simple masking, the data doesn't have much usability after anonymization.

Anyway, I'm still glad to see privacy and anonymization are getting more and more attention, and new products being developed. An interesting future work would be: what are the special techniques needed to provide anonymity to no-sql databases and cloud db?

Labels: , ,

Monday, March 14, 2011

Data Protection general practices

Data Protection Layers:
- Application
- Database
- File System

Operation Cost Factors:
- Performance
- Storage: data storage requirements
- Security
- Transparency: change to applications, and supports to utilities.

Data Protection options:
- Clear: actual value

- Hash: unreadable, not reversible
keyed hash(HMAC) provides strong protection
Considerations: key rotation

- Encryption: unreadable, reversible
Considerations: storage type, transparency to applications, key rotation

- Format controlling encryption: unreadable, reversible
Considerations: key rotation.

- Replacement(tokens): unreadable, reversible
Proxy value created to replace original data.
Considertations: transparency for applications needing original data.

Continuous data protection:
- Automatically save a copy of every change made to the data. It allows the user or administrator to restore data to any point in time.

- Advantage: Most continuous data protection solutions save byte or block-level differences rather than file-level differences. So if the portion of write data is small, save only the write changes will require less space on backup media.

- Cost: introduce extra disk write operations and continuous network usage.

Labels: ,

Failure Protection in Teradata

let's first look at Data Allocation in Teradata: Bacisally, OS recognize logical units(LUN), which is composed of slices(UNIX) or partitions(Windows/Linux) from each of the disk drives of a disk rank. Then the PDE translates the LUN into one or more pdisks. psdisks are then assigned to AMPs. All the logical disk spaces an AMP manages is called a vdisk. In general all pdisks from a rank will be assigned to the same AMP.

Failure protection in Teradata falls in the several different levels:

Disk drive level: RAID
RAID: Redundant Array of Independent(or Inexpensive) Disks.
The various designs of RAID systems involve two key goals: increase data reliability and increase input/output performance. There are six different designs RAID 1 to RAID 6 that provides fault tolerance (There's also so called RAID 0 which has no fault tolerance, and RAID 10 TBD.)

Teradata supports RAID 1 and RAID 5.
- RAID 1(mirroring without parity): Data is fully replicated in mirror disk(s). Read blocks from the 1st available disk. Besides failure protection it also provides great performance benefit.

- RAID 5(block-level striping with distributed parity): Data is striped across a rank of disks one segment at a time. Parity is also striped all disk drives, interleaved with data. When a disk fails, data is reconstructed on the fly using existing data and parity.

RAID 1 is faster than RAID 5, as the two(or more) disks are read parallelly, and no parity computation.

AMP level: Fallback tables
Storing a 2nd copy of each row of a table on a different AMP in the same cluster. Specified during table creation. Fallback will cause twict I/O on data modifications.

Obviously the highest level of protection is RAID 1 with Fallback protection.

Componenet/Process Level: Journal
Journals are used for specific types of data or process recovery.
Recovery Journals: maintained by system automatically. Two different types:
- transient journal: keeps "before image" of changed rows so data can be restored to previous state in case of an interrupted transaction. Happens in each AMP.
- down AMP recovery journal: log write changes to data on the failed AMP by other AMPs in the cluster. Then applying changes to the recovered AMP.

Permanet Journals: optional, user specifies at table level, and can store before images or after images to provide full-table recovery to a specific point in time.

Database Object Level: Locks
Applied at 3 different levels: Database/Table/Row Hash
4 types:
- Exclusive: at db/table level, used for DDL, blocks all other locks
- Write: ensures data consistency while writing, only allow access locks
- Read: ensures data consistency while reading, allows read/access locks
- Access: allows table update only for small single-row changes, blocks exclusive locks.
Local deadlocks are checked at AMP level, and global deadlocks are coordinated by PE on a timed basis.

Labels: ,

Thursday, March 10, 2011

Top 10 Database Security Threats

Here's a brief digest of the docs from Imperva Inc. Due to copy right I won't post the original pdf here, but can easily search for it online.

- Threat 1 - Excessive Privilege Abuse:
When users (or applications) are granted database access privileges that exceed the requirements of their job function, these privileges may be abused for malicious purpose.
> Prevension - Query-Level Access Control
* restricts database privileges to minimum-required SQL operations (SELECT, UPDATE, etc.) and data.
* most database has some level of query-level access control (triggers, row-level security, etc), but too time consuming to do manually.

- Threat 2 - Legitimate Privilege Abuse
Users may also abuse legitimate database privileges for unauthorized purposes.
> Prevension: Understanding the Context of Database Access
Enforcing policy for client applications, time of day, location, etc., identify users access in a suspicious manner.

- Threat 3 - Privilege Elevation
Attackers may take advantage of database platform software vulnerabilities to convert access privileges from those of an ordinary user to those of an administrator. Vulnerabilities may be found in stored procedures, built-in functions, protocol implementations, and even SQL statements.
> Prevension: Intrusion prevention systems(IPS) and Query Level Access Control
IPS inspects database traffic to identify patterns which correspond to known vulnerabilities.
(pls report back to DB venders and get patched if you find such)

- Threat 4 - Platform Vulnerabilities
Vulnerabilities in underlying operating systems (Windows 2000, UNIX, etc.) and additional services installed on a database server may lead to unauthorized access, data corruption, or denial of service.
> Prevension: Software Updates and Intrusion Prevention

- Threat 5 - SQL Injection
When a perpetrator inserts (or injects) unauthorized database statements into a vulnerable SQL data channel.
> prevention: Three techniques can be combined to effectively combat SQL injection: intrusion prevention (IPS), query-level access control, and event correlation.

- Threat 6 - Weak Audit Trail
Weakness may come from several aspects:
Lack of User Accountability when users access via web apps; degrading system performance; limited granularity etc.
> prevension: Increase performance; Separation of duty, audit duties should ideally be separate from both database administrators and the database server platform; Cross-platform auditing. Network-based audit appliances can help all these.

- Threat 7 - Denial of Service
Access to network applications or data is denied to intended users. Resource overload is particularly common in database environments.
> Prevension:requires protections at multiple levels. In this database-specific context, deployment of connection rate control, IPS, query access control, and response timing control are recommended.

- Threat 8 - Database Communications Protocol Vulnerabilities
> prevention: Protocol validation: parses (disassembles) database traffic and compares it to expectations. In

- Threat 9 - Weak Authentication
Stealing or otherwise obtaining login credentials by means of: brute force, social engineering, credential theft.
> prevention: strong authentication (in practice strong password); directory integration, use single set of login across enterprise.

- Threat 10 - Backup Data Exposure
> prevention: database backups should be encrypted.(addition: should apply the same security constraints as the original data)

In short, I will classify them into 4 categories:
- Bugs in access control(privilege design/assignment)
- software/hardware/network vulnerabilities and attacks
- User Accountability
- Backup data explosure

Labels: ,

Wednesday, January 12, 2011

Verizon's 2010 Data Breach Report

Went through the Verizon 2010 Data Breach Investigation Report these days. Made a digest of things which are of interests to me:

Their classification of types of breach:
misuse, hacking, malware, social tactics, physical attacks.

Harm done by external agents far outweighs that done by insiders and partners. External breaches are largely the work of organized criminals. Overall, insiders were not responsible for a large share of compromised records but system and network administrators nabbed most of those that were. This finding is not surprising since higher privileges offer greater opportunity for abuse. In general, we find that employees are granted more privileges than they need to perform their job duties and the activities of those that do require higher privileges are usually not monitored in any real way.

Top 3 industries affected by data breach: Financial Services, Hospitality, and Retail. And the most popular data compromised are:
- Payment card data
- Personal information
- Bank account
- Authentication credentials

Malware and hacking composed of more than 95% of all compromised records. Cases involving the use of social tactics more than doubled. Physical attacks like theft, tampering, and surveillance ticked up several notches.

Malware factored into 38% of 2009 breach cases and 94% of all data lost. The most frequent malware infection vector is installation or injection by a remote attacker. This is often accomplished through SQL injection or after the attacker has root access to a system.

Malware functionality by percent of records:
- Backdoor 85%
- send data to external site/entity 81%
- capture data resident on system 84%
- system/network utilities(PsTools, Netcat) 83%
- Packet sniffer 80%

97% of the 140+ million records were compromised through customized malware. Some are simply repackaged versions of existing malware in order to avoid AV detection. More often they altered the code of existing malware or created something entirely new.

Two hacking types that resulted in the largest percent of data breach:
- Use of stolen credentials: 86%
Mostly obtained by malware. Ration 2:1 to other attacks including phishing, SQL injection.
- SQL injection: 89%
It is almost always an input validation failure. Main uses are for query data, modify data, and deliver malware.

Most used path of intrusion is web applications.

Nearly all data were breached from servers and applications. Breaches involving end-user devices nearly doubled in 2009. Much of this growth can be attributed to credential-capturing malware.

15% attacks are of high difficulty: Advanced skills, significant customization, and/or extensive resources required. And they contribute to 87% of data breach.

In 2009, targeted attacks accounted for 89% of records compromised.

In over 60% of breaches investigated in 2009, it took days or longer for the attacker to successfully compromise data, but 31% only takes minutes. More than 37% takes months to discover the compromises. An 29% also takes months to contain the compromise after it is discovered.

Third party fraud detection is still the most common way breach victims come to know of their predicament.

Event monitoring and log analysis successfully alerted only 6% of breach victims. This year that figure has dropped to 4%. The reason IDS doesn't work usually due to the poor configuration and monitoring. Actually 86% of the breaches have log evidence. Ways to study log: 1) abnormal increase in log data, 2) abnormal length of lines within logs, 3) absence of (or abnormal decrease in) log data.

Anti-forensics consist of actions taken by the attacker to remove, hide, and corrupt evidence or otherwise foil post-incident investigations. Data wiping, which includes removal and deletion, is still the most common but declined slightly. Data hiding rose by over 50%, and data corruption tripled. The use of encryption for the purposes of hiding data contributed most significantly to the increase in that technique while the most common use of data corruptions remains log tampering.

Labels: ,

Saturday, November 06, 2010

Access Control

After a user is authenticated and logon to a system, its access to resources on a computer or network system are controlled by access control modules.

Discretionary Access Control(DAC)
In a DAC model, a subject has complete control over the objects that it owns and the programs that it executes. Owner associates each of its objects with an access control list (ACL), containing a list of users and their level of access to this object. DAC is based on the owner's granting and revoking of privileges. Access to an resource is denied by default unless explicitly authorized. Most of today's OS are using DAC model.

The key weakness of DAC is that it suffers from Trojan horse attacks.

Mandatory Access Control(MAC)
MAC is the most strict of all levels of control. The MAC model targeted for systems in which confidentiality has the highest priority, such as military or government agencies. In a MAC enforced system, both subjects and objects will get assigned clearance levels(security labels). The administrator takes control of security label defintion and assignment. Access to objects are constrained by policies on the security clearance, which are also defined by administrator. The general access rule is no read up, no write down following the Bell-Lapadula Model, but it's also possible to exptend and define dedicate rules depending on the practical security requirements. MAC is fine-grained and can provide row or column level access control.

Often seen as the most secure access control environment, MAC also requires extra effort in pre-planning in order to be effectively and securely implemented. It also calls for continuous system management overhead to control new users, objects, and changes of security label defintions.

Oracle 9i has implemented label security to meet the MAC requirements and provide row level access control, and hierarchy labels are coded as numeric values. DB2 also provides LBAC to provide MAC for both row and column. The security label is composed of one or more security label components of three types: arrays(hierarchy), sets and trees.

Role Based Access Control (RBAC)
In a RBAC system, user also doesn't have discretionary access to objects. Instead, administrator create roles with a collection of permissions for different job functions or responsibilities. Each user will be assigned to one or more roles, and delegated all the privileges associated with that role. RBAC greatly simplifies the management of individual user rights and authorizations.

Many database systems have some implementation of RBAC, including Teradata, Oracle, DB2, SQL Server.

Labels: ,