Which of the following SQL queries did Harry execute to obtain the information?

Posted by: Pdfprep Category: ECSAv10 Tags: , ,

Harry, a penetration tester in SqSac Solutions Ltd., is trying to check if his company’s SQL server database is vulnerable. He also wants to check if there are any loopholes present that can enable the perpetrators to exploit and gain access to the user account login details from the database. After performing various test attempts, finally Harry executes an SQL query that enabled him to extract all the available Windows Login Account details.

Which of the following SQL queries did Harry execute to obtain the information?
A . SELECT name FROM sys.server_principals WHERE TYPE = ‘R’
B . SELECT name FROM sys.server_principals WHERE TYPE = ‘U’
C . SELECT name FROM sys.server_principals WHERE TYPE = ‘G’
D . SELECT name FROM sys.server_principals WHERE TYPE = ‘S’

Answer: B

Leave a Reply

Your email address will not be published.