PT0-002 Exam QuestionsBrowse all questions from this exam

PT0-002 Exam - Question 225


A penetration tester examines a web-based shopping catalog and discovers the following URL when viewing a product in the catalog:

http://company.com/catalog.asp?productid=22

The penetration tester alters the URL in the browser to the following and notices a delay when the page refreshes:

http://company.com/catalog.asp?productid=22;WAITFOR DELAY'00:00:05'

Which of the following should the penetration tester attempt NEXT?

Show Answer
Correct Answer: BC

The application seems vulnerable to SQL injection if a delay is noticeable after adding the WAITFOR DELAY statement in the URL. The next logical step is to confirm this vulnerability using a simple SQL injection test like 'OR 1=1 --. This payload will always evaluate to true, which can quickly reveal if the application is susceptible to SQL injection. More complex SQL injection attempts, like a UNION SELECT, require prior knowledge of the database structure and may not be the most efficient immediate next step for a penetration tester.

Discussion

8 comments
Sign in to comment
TKW36Option: B
Jan 29, 2023

the application is vulnerable to SQL injection by observing the delay when the URL was altered to include a "WAITFOR DELAY" statement. It could either be B or C because both are SQL injection attacks. B is a more common SQL injection attack though so I think a penetration tester would use that one first. I choose B.

2Fish
Feb 10, 2023

Agreed

Vikt0rOption: B
Feb 10, 2023

I chose option B over option C because option B is a simpler and more straightforward SQL injection payload that can quickly test for the presence of SQL injection vulnerability. The payload "OR 1=1" will always evaluate to true, which makes it a useful payload for identifying SQL injection vulnerabilities. Option C is also a valid SQL injection payload, but it includes a UNION statement that is used to combine the results of multiple SELECT statements into a single result. While this payload can be used to extract data from the database, it requires a deeper understanding of the database structure and may take more time to craft a successful attack. In general, when testing for SQL injection vulnerabilities, it is a good practice to start with simple payloads like "OR 1=1" or "';--" to quickly identify potential issues, and then progress to more complex payloads if necessary.

nickwen007Option: B
Mar 9, 2023

B. http://company.com/catalog.asp?productid=22' OR 1=1 -- is the next attempt the penetration tester should make. By using the OR clause with a value of '1=1', it forces the application to return every record in the database. This technique can be used to check for a vulnerable SQL injection so that the tester can further explore the application to gain more insight into the system. C. http://company.com/catalog.asp?productid=22' UNION SELECT 1,2,3 -- is not the appropriate next step for the penetration tester. This command will attempt to combine multiple sets of query results into one data set, however, this technique is only effective when an attacker knows the exact number of columns in the query and the types of data that it contains. In this instance, the penetration tester only knows that there is a delay when the page refreshes, and does not have the required knowledge to use the UNION SELECT command effectively.

WANDOOCHOCOOption: C
Jan 17, 2024

' OR 1=1 just returns true. It is used when an attacker wants to login in login page. It has nothing to do with the product page. C returns info of the DB. so C

[Removed]Option: B
Feb 17, 2023

B is corrrrrrrect answer

cy_analystOption: D
Mar 23, 2023

D attempts to use netcat to establish a reverse shell to the attacker's machine. This is a common technique used in post-exploitation and can provide the attacker with a foothold on the server. Option B attempts to inject a Boolean condition that will always evaluate to true, which may not be useful in this case since it does not provide access to additional data or functionality.

cy_analyst
Mar 23, 2023

I'm so wrong. C is a logical next step to take advantage of the SQL injection vulnerability identified by the penetration tester. The delay introduced by the injected SQL code suggests that the database is processing the query, and injecting additional SQL code can allow the penetration tester to extract sensitive data from the database.

KingIT_ENG
Mar 24, 2023

B is correct answer

solutionzOption: C
Aug 8, 2023

The observed delay after altering the URL with a "WAITFOR DELAY" command indicates that the input might be processed as a part of an SQL query. This behavior can be indicative of an SQL injection vulnerability. Given this observation, the penetration tester might want to continue testing for SQL injection. Among the options provided, the next logical step to explore would be a UNION-based SQL injection, which can be used to retrieve data from other tables in the database. So, the correct option is: C. http://company.com/catalog.asp?productid=22' UNION SELECT 1,2,3 --

CCSXoraboveOption: C
Jul 18, 2024

The statement is not refer to a login page, so the next step is execute the UNION