Cyber Risks · PortSwigger Research

Lab: SQL injection attack, querying the database type and version on Oracle

Summary: PortSwigger's lab presents a SQL injection vulnerability in a product category filter that can be exploited with a UNION attack to retrieve results from an injected query. Because Oracle requires every SELECT to name a table, the lab notes that a UNION SELECT must include FROM followed by a valid table such as the built-in dual table, and the goal is to display the database version string.

What you should know: The exercise turns on a single Oracle quirk - every SELECT needs a FROM clause, satisfied by the built-in dual table - which is enough for an attacker to pull the database version string out through a product category filter.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related