Database Crime Scene Prevention

一个好的侦探理解的犯罪心理,技术和贸易工具。为了保护您的数据库,并防止它成为一个犯罪现场,但关键是要了解攻击,数据窃取的常用方法,并掩盖技术。犯罪嫌疑人阵容可以来自外部的黑客攻击和受信任的员工,承包商和合作伙伴的行列中。一些威胁容易地防止或包含;而另一些更加难以捉摸。幸运的是,许多需要保护数据库的安全机制和工具都一应俱全。

幻灯片:最糟糕的时刻10在网络安全历史

这个已知的犯罪分子使用的攻击方法和工具本文探讨,以及新兴开发用于侵入数据库,建立控制类别,妥协的系统,窃取数据,并覆盖了轨道。我们还将介绍用于保护数据库免受这些攻击方法的最佳实践。

数据库服务器作为目标

Given the wealth of information stored in databases and its value on the open market, it is no surprise that databases are a primary target of criminals. The personal, identity, trade, and military data contained in many repositories can fetch top dollar. Meanwhile, employment instability, mergers, acquisitions, etc., can also contribute to insider data theft. In addition, data can leak out accidentally and though these acts are not criminal, they can result in severe data breaches.

It can be said that the database server provides an attacker with the perfect criminal opportunity, combining motive (the resale value of the information), means (easily available tools), and opportunity (direct access to the server through thick client-applications, lax internal network controls and ill written applications).

The Five-Step Program

试图实施有效的数据库安全之前,关键的是要明白,导致破坏的过程。这些过程可以分解为五个基本步骤:

1.贸易的工具

2.初始访问

3.滥用特权

4.特权提升

5. Covering the Tracks

1.贸易的工具

一个行为人的第一对攻击数据库服务器第一步是获取合适的工具。这些都是非常容易获得,甚至对内部用户。安全官员往往低估做出以下假设内部威胁:

* Internal users are not "hackers" with hacking tools and they are not equipped to produce "hacking tools" themselves.

*内部工作站的安全策略将拒绝最终用户软件安装。

虽然这两个假设可能是有效的,他们什么都没有做与终端用户得到他们的手对数据库的攻击工具的能力。由于是事实证明,大多数类型的攻击(SQL相关)可通过标准的数据库客户端软件,例如默认情况下从数据库供应商(例如查询分析器,SQL另外,等等)所提供的一个执行。这种软件通常是在企业任何一台工作站基本安装的一部分。

此外,几乎所有的数据库攻击所需的能力可以在典型的办公软件工具,如发现Microsoft Excel中。可以使用简单的文本编辑器如记事本,写字板或Telnet客户机可以用其它类型的攻击(如网络协议相关的攻击)。最后,在许多组织中的用户通过他们的家用电脑在没有安装软件的限制存在于内部网络的远程访问。

2.初始访问

有用于与数据库服务器初次接触需要两个元素。攻击者需要网络访问数据库服务器计算机和一组有效的访问凭证(即用户名和密码)。到数据库服务器的网络访问通常是一件容易的事考虑到宽松的内网安全在大多数企业中找到。即使在网络中存在一些内部访问限制,许多工作站被允许与数据库服务器,由于提供给用户的是胖客户端应用程序进行通信。这些应用程序包含在客户端上的所有应用程序逻辑和与数据库服务器,而不是通过中间应用服务器直接进行通信。

年代ome types of infrastructure attacks prey on database vendor-specific vulnerabilities that require no more than this initial access in order to take down a server or execute arbitrary code. However, for most attacks an attacker must provide a valid set of access credentials. These credentials can be obtained through various methods, assuming that the perpetrator was not given them rightfully. The following are some of the methods perpetrator's use to obtain access credentials.

蛮力和穷举搜索

此方法涉及猜测大量可能的用户/口令组合,直到一个组合是成功的。虽然理论上这种方法是徒劳的,不可行,由于大尺寸的搜索空间的,在实践中是可以被用来减少猜测需要找到有效的组合数量的技术。

有许多技术(通常与数据库服务器未成年漏洞),允许攻击者找到有效的帐户名,然后寻找相应的密码。查找用户帐户可以很容易,尤其是当他们在组织内部系统的方式分配,例如和John.Smith或JOHNDOE。

有迹象表明,可以应用到密码的“猜测”很多优化。这些优化依赖于所谓的“密码规则”,这是关系到人们选择密码的方式观察社会的汇编。例如,帐户“约翰”可能有密码JohnJohn,nohj,John1234等。在一个大的用户群,密码规则大大减少一个帐户/密码匹配必要猜测的数目。

默认帐户和密码

Many database servers and applications deployed over them come bundled with default accounts configured with default passwords. Unless all of the defaults are changed by the administrator upon installation, these accounts provide an easy access point for uninvited guests. Also, poor installation and configuration may allow anonymous database access to users. Even if access privileges granted to anonymous users are minimal, this is a crack an attacker may use to gain access.

Thick-Client Applications

一个安装在工作站上的胖客户端应用程序直接与数据库服务器通信。为了与数据库服务器通信的应用就必须有一组有效的凭据。运行的软件或更通常嵌入在应用程序代码中或在本地配置文件时的凭据或者由最终用户提供。在这两种情况下,用文本编辑器,攻击者可以很容易地得到这个组凭证的持有。

社会工程学

这个术语用来描述一组技术,包括电子邮件和电话,其中一个想成为攻击者诱骗个人泄露个人组凭据。采用社会工程技术肇事者已经知道,招管理员为他们提供新鲜分配的凭据。(编者注 - 见社会工程学: Eight Common Tactics。)

3.滥用特权

大量的数据库攻击都进行了使用此步骤。当攻击者向该数据库服务器的初始连接时,他们被授予了一组的访问权限。根据这些凭证的性质,它们是可以允许访问足够敏感信息或功能。如果组凭证是从一个胖客户端应用程序中获得,行为人可以绕过应用程序代码所规定的准入限制和不受数据库访问控制机制。

实际上,有没有在服务器上存在的诸多控制机制。一个例子是对可以使用单个数据库查询被检索的记录量的缺乏限制的。另一个是缺乏对可用于提取的记录的标准的限制。

Typical attack scenarios involve the use of the tools within common Office software, e.g. Microsoft Excel. These tools can be used to retrieve large amounts of information from the database which can be stored locally on the workstation and then exported to a detachable medium.

其他犯罪现场涉及使用本机数据库客户端软件,使存储在数据库中的信息进行未经授权(或不受控制)的变化。

Privilege abuse is hard to detect using traditional access control mechanisms because in these cases, perpetrators employ legitimate commands under illegitimate circumstances. For instance, perpetrators with legitimate privileges avoid detection by committing the crimes outside of normal working hours, by using a different client machine, or by using illegitimate channels, i.e., client applications.

4.特权提升

如果犯罪人不能使用在最初接触授予的基本权限完成自己的罪行,有机会他会向获得管理权限移动。在这个级别的数据库权限将允许行为人获得对服务器本身几乎无限制地访问存储在数据库服务器中的任何信息,更糟的是,总量控制。

There are a number of techniques that result in administrative privileges being granted to a non-privileged user. The most notorious (yet the toughest to exploit) is the use of the buffer overflow attack. Server software is not designed to handle long user input. When used naively, the buffer overflow vulnerability can be exploited to quickly bring down a server. However, if the attacker carefully plans this exploit, he/she will be allowed to execute arbitrary code with administrative privileges. Buffer overflow vulnerabilities are found in built-in stored procedures, SQL statements, and even built-in functions. While the first two can be mitigated using internal access control mechanisms, the third type requires access control semantics that do not exist in the database server.

The second type of privilege elevation technique perpetrators employ is the SQL injection through stored procedures attack. Stored procedures are written in a manner that uses their parameters to construct SQL statements which are then executed with the privilege of the procedure owner. As a consequence, a perpetrator that is only allowed to execute a stored procedure can actually execute any SQL statement with administrative privileges (assuming that in most scenarios, the owner of the stored procedure is an administrative user, exposing some reduced functionality to less privileged users).

A third type of privilege elevation attacks take advantage of SQL parsing vulnerabilities such as the one reported by神谕在2007年(见http://www.red-database-security.com/advisory/oracle_view_vulnerability.html)。此漏洞允许攻击者创建一个特殊的数据库视图提供未经授权的INSERT,UPDATE或数据库表的DELETE能力。所有这些特权提升技术能够使用基本的数据库客户端工具来使用,例如提供与工具Microsoft Office浴室或使用默认的数据库客户端安装。

一个较新的和不太知名的,但令人难以置信的聪明的攻击技术利用了数据库的网络通信协议的实施中固有的弱点。这些专有协议用于客户机 - 服务器通信,包括安全漏洞的攻击者可以对服务器进行控制的主机。要做到这一点,一个罪犯可以使用一个简单的文本编辑器,虽然有些需要一个标准的Telnet客户端,还有一些则需要更复杂的网络控制工具。有一个数据库服务器内没有内部机制,积极防范此类攻击。

5. Covering the Tracks

聪明的小偷知道如何打击和离开未被发现。这也适用于数据库中的罪犯,谁有多种方法来掩盖自己的踪迹。在许多情况下,行为人甚至不担心,因为内部审计机制很少激活由于性能和磁盘空间问题。在许多的攻击方法的讨论,小偷的行为不会触发警报。与审计跟踪功能的服务器激活通常设置为跟踪不成功的执行结果异常情况。然而,大多数的技术先前讨论的不调用这些条件而产生的SQL语句的成功执行。

让我们假设,虽然我们也有我们的数据库服务器上正确配置的审核机制。第一步肇事者将采取一个成功的特权提升攻击完成后,将关闭日志记录。在大多数部署,具有管理权限的罪犯也可以与现有的审计跟踪篡改,删除的那之前的权限提升攻击步骤的任何痕迹。

12 第1页
第1页of 2
IT薪资调查:结果是在