Unfortunately, transaction logs typically aren't enabled on a database because the logging process can hurt performance. But there are other logs that can help an investigation.
After transaction logs (if available), move on to logs from other sources, including the database server, the application server, and the OS. If the server tracks authentication attempts, user actions, or file changes, it may be possible to gather evidence here. The attacker may have compromised the server before going after the database. Or he may have gone through an application--compromising a Web application is by far the most common vector for accessing data. Look for authentication attempts that appear out of place, both successful and failed.
If file-level auditing was enabled by the system admin for the server OS, check if files were created in any unusual directory. This could be evidence of a database dump or copy.
If you know whether the attack was directly against the database or via an application, you may want to bypass system-level logs initially and focus on network and application logs to gain more information faster. You can then return to the system logs later to gather additional data. Review application or server logs for anomalies, similar to how you would look for anomalies in database logs.
For application servers, look for lots of requests from the same IP address and those that came in rapid succession, which may indicate an automated attack against the application. Also look for user authentication errors or exceptions.
Finally, review logs of recent user activity. An attacker may have poked around, run commands, or set off an audit alert that will show up within OS security, network, or host intrusion-detection system, or other system logs. If the database in question uses the OS or a directory service such as Active Directory to authenticate users, then the authentication logs may provide evidence of which accounts have logged in. This can help determine if the data exposed was the result of an external attack or an inside job.
When a database breach comes to light, it's all too easy for IT to panic. A panicked response is likely to be a poor one, so create an incident response plan when you are calm and rational. It's better to have one and not need it than to need one and not have it.
Become an InformationWeek Analytics subscriber: $99 per person per month, multiseat discounts available.
Subscribe and get our full report on surviving a breach. This report includes 13 pages of action-oriented analysis. What you'll find:
- Instructions for creating an incident response plan
- Guidance on evidence collection and chain of custody
- Tips for investigating insider attacks against databases