注入语句:http://xxx.xxx.xxx/abc.asp?p=YY and db_name()>0不仅可以判断服务器的后台数据库是否为SQL Server,还可以得到 (47) 。

2023-09-01

A. 当前连接数据库的用户数量
B. 当前连接数据库的用户名
C. 当前正在使用的用户口令
D. 当前正在使用的数据库名

参考答案:D

解析:SQL Server有user、db_name( )等系统变量,利用这些系统值不仅可以判断SQL-SERVER,而且还可以得到大量有用信息。如:
l语句http://xxx.xxx.xxx/abc.asp?p=YY and user>0,不仅可以判断是否是SQL-SERVER,而且还可以得到当前连接数据库的用户名。
l语句http://xxx.xxx.xxx/abc.asp?p=YY and db_name( )>0,不仅可以判断是否是SQL Server,而还可以得到当前正在使用的数据库名。

相关推荐