配置文件死锁报告中的“ * password ------------”是什么意思?


10

在SQL Server 2008 R2中,我得到了几个死锁报告,它们在输入缓冲区中具有“ * password ------------”。它看起来像是攻击,但在那种情况下,我不知道攻击的原因或类型。

(该日志是由专家DBA生成的,他有很多经验,并告诉我,不是我)

有谁知道它是什么?谢谢!

例:

<?xml version="1.0"?>
<blocked-process>
  <process id="process879948" taskpriority="0" logused="0" waitresource="KEY: 5:72057602473263104 (1d69201d0ba6)" waittime="5185" ownerId="88389135" transactionname="SELECT" lasttranstarted="2012-09-25T18:11:02.507" XDES="0x1f7d2a590" lockMode="S" schedulerid="2" kpid="4552" status="suspended" spid="86" sbid="2" ecid="0" priority="0" trancount="0" lastbatchstarted="2012-09-25T18:11:02.507" lastbatchcompleted="2012-09-25T18:11:02.507" lastattention="2012-09-25T18:07:35.740" clientapp=".Net SqlClient Data Provider" hostname="IP-xxxxxxxx" hostpid="4868" loginname="sa" isolationlevel="read committed (2)" xactid="88389135" currentdb="1" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
      <frame line="14" stmtstart="374" stmtend="764" sqlhandle="0x03000500dac2967f208e4000a19d00000000000000000000"/>
      <frame line="1" stmtstart="44" sqlhandle="0x02000000632f7e131f79ec7312284505961e537a61b81be7"/>
      <frame line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"/>
    </executionStack>
    <inputbuf>

*password---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   </inputbuf>
  </process>
</blocked-process>

Answers:


12

这仅表示语句的文本包含字符串“ password”,而SQL Server“ helpful”已将其屏蔽为安全功能,以防止您看到其他人的密码。

我能够如下重现

CREATE TABLE T(X varchar(1000))

连接1

BEGIN TRAN

INSERT INTO T VALUES('password1') 

WAITFOR DELAY '00:01:00'

SELECT * FROM T WHERE X = 'password2'

ROLLBACK

连接2

BEGIN TRAN

INSERT INTO T VALUES('password2') 

WAITFOR DELAY '00:01:00'

SELECT * FROM T WHERE X = 'password1'

ROLLBACK

然后从扩展事件跟踪中检索图形


2
@DiegoJancic-至于这是否是攻击,取决于您是否希望合法查询包含此字符串。如果您没有任何包含此字符串的对象名,则可能表明存在SQL注入尝试。
马丁·史密斯

感谢@MartinSmith,就我而言,这不是攻击,我有一个带密码字段的用户表。再次感谢!=)
Diego Jancic 2012年

有没有办法禁用此功能?
jlb

1
@jlb-不是我知道的。您可以在这里connect.microsoft.com/SQLServer/Feedback提出一个请求,也许您会发现有某种方法。
马丁·史密斯

@MartinSmith在MSDN论坛中进行了询问,所有答复均表明无法禁用此功能。
jlb
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.