Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Web3: SQL Injection - Exploit Directions

Get a clear guide to Sql Injection, including how it works, important features, practical tips, common issues, and useful answers.

Table of Contents

1. Boolean Based and Time Based Blind SQL Injection

This guide provides a clear overview of sql injection, including 1. Boolean Based and Time Based Blind SQL Injection, 2. Union Query Based. Use it to understand the topic, compare the available options, and make a more informed decision.

In the Blind SQLi technique, we also have many different methods. The difference between these methods is the optimization of time. We will learn about blind SQL injection and its methods in the following topics.

1. Boolean Based and Time Based Blind SQL Injection - Sql Injection

Time based: Like boolean based attacks, differing only in inference, it relies on the processing time of the database and then returns the results to determine whether the SQL query executed successfully.

1. Boolean Based and Time Based Blind SQL Injection - Sql Injection

2. Union Query Based

This is a common method when exploiting SQL injection. Its basis is to use the union keyword to combine the results of select clauses, thereby obtaining information from the database. You can see examples of using this method in SQL injection exploitation in the previous topics: Web1: SQL Injection - The most common exploit route and Web2: SQL Injection - Other exploits.

3. Batch Query

This is a method to apply the ability to execute multiple SQL statements at the same time of several database management systems and the support of programming languages. This method is very powerful and causes immediate danger to the system. By adding an Update, Insert or Delete command line, the data in the web application's database is no longer intact.

We can insert the following SQL statement to delete a table in the database:

3. Batch Query - Sql Injection

3. Batch Query - Sql Injection

4. Order by Clause

Unlike the above methods, the inject content is in the where clause. In this method, we will try to inject script code into the order clause. Let's take a look at the following scenario:

The programmer wants to list the company's products including the following information: Product Code, Product Name, Date. and has the function for users to customize whether they want to sort by date, according to product name or code.

The query is constructed as follows:

4. Order by Clause - Sql Injection

In this case we cannot directly add a sub select clause via the union keyword as always. One way to exploit that is to use BATCHED QUERY or you can refer to the following way:

4. Order by Clause - Sql Injection

In the above method, we were able to inject a sub select, but obviously this implementation must now be combined with the BOOLEAN BASED BLIND SQLI technique.

Conclusion

Understanding Sql Injection makes it easier to compare options, avoid common mistakes, and apply the information in this guide more effectively. Review the relevant requirements before making changes or choosing a solution.

FAQ

What is Sql Injection?

The difference between these methods is the optimization of time.

Why is Sql Injection important?

Understanding Sql Injection helps you evaluate features, compatibility, performance, and potential limitations before you choose a product or follow a procedure.

What should you consider when using or choosing Sql Injection?

Consider your specific goal, compatibility requirements, available features, cost, security, and the practical recommendations described in this guide.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.