πDeath Single Row Injection
What is Death row?
While injecting a Web application you will usually face it, this is the scenario when the whole array output of the Query do not gets printed. The web application only prints the first.
For Example:
The query "Select username,password from users;" Will output the complete list of users. but now it depends on how the web application is giving you output. So normally in 70% cases you may have to face "Death Row Injection"
To overcome such situation we use Limit or if we are intelligent enough to make a condition through which we can output the data which we actually need. Here we will discuss both of these ways.
Let us First understand the Internal Queries.
Select username from users;This will output all the usernames...but our target web application is outputting only 1. So in order to iterate through the situation we will user limit.
Syntax : Limit "From Row Number", "Number of Rows"
I hope its very clear to understand that the first parameter takes the row number from which you want to start, and the second one takes number of rows you want to output.
Now let us try it with the above Query
Select Username from users limit 0,1;Example from the injection Point of view
If you have read the basic injection then i don't need to tell you how to get the error and then comment out the rest part and then find the number of columns. After doing all that let us assume the injection is:
As you can see single Quote is missing after 43 that means i am injecting in a integer Input Query. So now when we try to get the usernames and password using the above Query.
----------------------------------------------------------------
Method 1
The above query will output all rows as once but the web application may just return one. So to get all using Limit we will go one by one.
----------------------------------------------------------------
Method 2
We can use Sub Query to extract particular number of rows from the Database and then concat them into the output. Herez an example to do this one:
Query:
So the above query got 100 rows conctenated into the output. Lets see how the Injection:
----------------------------------------------------------------
Method 3
Well Now the process is enough faster. Let us check our Injection:
Last updated