xp_logininfo [ [ @acctname = ] 'sys_name' ]
[ , [ @option = ] 'all' | 'members' ]
[ , [ @privilege = ] variable_name OUTPUT]
Most common vulnerability in MS SQL server 2008 is SQL injection, which is a method by which a hacker gains access to the database server by injecting specially formatted data through the user interface input fields. As previously thought SQL injection is a SQL server problem, but in fact, it is caused by unsafe application development procedures. Dynamic queries that requires user inputs are more vulnerable to such types of attacks. Simple attack methods include text messages, while advance attack methods follow binary and ASCII coding.
Most common vulnerability in MS SQL server 2008 is SQL injection, which is a method by which a hacker gains access to the database server by injecting specially formatted data through the user interface input fields. As previously thought SQL injection is a SQL server problem, but in fact, it is caused by unsafe application development procedures. Dynamic queries that requires user inputs are more vulnerable to such types of attacks. Simple attack methods include text messages, while advance attack methods follow binary and ASCII coding.
Text attack starts with an apostrophe (') to end the string column (usually username) check, continues with malicious SQL, and then ends with the SQL comment mark (--) in order to comment out the full original SQL that was intended to be submitted.
First line of defense is to use dual login: One for window and other for SQL server. Second line of defense: Keep the error messages hidden from end user. Malicious users can extract client’s data during dynamic execution of SQL code which requires user interaction of submitting data such as user id and password by string concatenation, and then submitting it for execution. Stored procedure use in SQL server and parameterizing it for master access to the user is also susceptible to SQL injection attack. For further reading, I would suggest useful links that are helpful for users and clients [4 -7]
Note: All of these resources were accessed on October 2, 2011.
[7] http://hungryhackers.blogspot.com/2008/01/top-10-tricks-to-exploit-sql-server.html
This comment has been removed by the author.
ReplyDeleteVery informative article, I was wondering a solution at auditing our SQL 2008 server then
ReplyDeleteI found good sql server auditing software that provides an efficient data changes tracking and helps me to auditing production changes like modification, creation, deletion etc and alllows data filter options to reports which are based on objects, databases, who, where, owner name, application name et.