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

Web2: SQL Injection - Other Exploits

Learn about Sql Injection, including Through Cookies, key uses, practical steps, common issues, and answers to frequently asked questions.

Table of Contents

Through Cookies

This guide provides a clear overview of sql injection, including Through Cookies, Through Server Variables. Use it to understand the topic, compare the available options, and make a more informed decision.

Because it is stored in the client, the user can edit it at will, so if a web application uses the information stored in cookies to build queries to the database, hackers can completely insert cookies. sql scripts to perform a SQL Injection attack.

There are many tools that allow viewing, adding and editing cookies, in which the addon Cookies Manager of firefox is a quite convenient tool. You can download and install it in firefox easily.

Through Cookies - Sql Injection

Through Server Variables

The server variable may be a relatively new concept, but it's not new. Some examples of server variables are Http header, Network header. Not very common but values stored in server variables can be used by web applications such as in logging access or access statistics by user agent. These jobs all have interaction with the database, so hackers can completely use server variables in exploiting Sql Injection.

Firefox addons support these things very well, Tamper Data or Live HTTP headers (exampled above) can help us catch requests sent from the client to the web server, from which we can easily change the server variables (http header.) before sending them to the server. Mining via server variables is similar to mining via cookies.

Tamper Data:

Through Server Variables - Sql Injection

Second-Order Injection

This is a rarely used technique because it is difficult to tell if a web application has this error or not. The technique is described as follows: First, we will 'inject' into the database a piece of code. This code does not pose any danger to the system but it will be used as a springboard for the next injection. Let's see a concrete example to better understand this technique.

We will access a web application and try to register an account with the username "administrator' --". Then we will perform the password change operation. Changing the password is handled by the web application as follows:

Second-Order Injection - Sql Injection

With the username registered above, the above query becomes:

Second-Order Injection - Sql Injection

Thus, we can change the password of the administrator account and can completely log in as the administrator account.

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?

Because it is stored in the client, the user can edit it at will, so if a web application uses the information stored in cookies to build queries to the database, hackers can completely insert cookies.

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.