Summary of MySQL injection bypass filtering techniques

Summary of MySQL injection bypass filtering techniques

First, let’s look at the GIF operation:

Case 1: Spaces are filtered

Use brackets () instead of spaces. Any statement that can calculate a result can be surrounded by brackets.

select * from(users)where id=1;

Use comments /**/ to bypass spaces;

select * from/**/users/**/where id=1;

Case 2: Limit from and certain character combinations

Add a dot after "from". That is, use "from." instead of "from".

select * from.users where id=1;

Then watch the GIF directly:

To put it simply, it means replacing the ' field name ' with hex ;

This reminds me of when I started learning SQL injection, I used load_file or into outfile , and often used hex to encode a sentence and then import it;

The single/double quotes are indeed omitted here, which is foolproof (we won’t mention magic_quotes_gpc() );

But at that time I was only concerned with the results. Today, when I was sorting out the previous data, I found this problem, but I was confused and didn't know why it was coded like this. Let's do it in practice:

You can clearly see the error message. The first single quote after select and the single quote before cmd in the sentence Trojan horse close the following statement and cause an error message.

Then convert it to hex , remove the quotation marks, and find that it can be written;

My machine doesn't give him permission here, so it will prompt that he can't write. It depends on the actual situation.

Summarize

The above is the full content of this article. I hope that the content of this article can be of some help to your study or work. If you have any questions, you can leave a message to communicate.

You may also be interested in:
  • MySQL complete collapse: detailed explanation of query filter conditions
  • Detailed explanation of MySQL single table query operation examples [syntax, constraints, grouping, aggregation, filtering, sorting, etc.]
  • Detailed explanation of count without filter conditions in MySQL
  • Method for implementing multi-field filtering in Mysql database
  • How to filter out certain libraries during mysql full backup
  • MYSQL Must-know Reading Notes Chapter 8: Using Wildcards for Filtering
  • MYSQL Must Know Reading Notes Chapter 7 Data Filtering
  • MYSQL Must Know Reading Notes Chapter 6 Filtering Data
  • MYSQL uses regular expressions to filter data
  • Python connects to MySQL and uses fetchall() method to filter special characters
  • Python implements MySQL single quote string filtering method
  • How to solve mysql replication filter duplication
  • How to dynamically modify the replication filter in mysql

<<:  Detailed examples of Docker-compose networks

>>:  A brief discussion on docker-compose network settings

Recommend

Detailed installation tutorial of mysql 5.7 under CentOS 6 and 7

You always need data for development. As a server...

The difference and usage of datetime and timestamp in MySQL

1. How to represent the current time in MySQL? In...

Docker automated build Automated Build implementation process diagram

Automated build means using Docker Hub to connect...

How to make a List in CocosCreator

CocosCreator version: 2.3.4 Cocos does not have a...

Understanding JSON (JavaScript Object Notation) in one article

Table of contents JSON appears Json structure Jso...

How to insert weather forecast into your website

We hope to insert the weather forecast into the w...

Vue implements login type switching

This article example shares the specific code of ...

Using zabbix to monitor the ogg process (Windows platform)

This article introduces how to monitor the ogg pr...

Mysql queries the transactions being executed and how to wait for locks

Use navicat to test and learn: First use set auto...

Handwriting implementation of new in JS

Table of contents 1 Introduction to the new opera...

JS implements a simple brick-breaking pinball game

This article shares the specific code of JS to im...

JavaScript and JQuery Framework Basics Tutorial

Table of contents 1. JS Object DOM –1, Function –...

Vue implements an Input component that gets the key display shortcut key effect

I encountered a requirement to customize shortcut...

jQuery to achieve the barrage effect case

This article shares the specific code of jQuery t...

Detailed explanation of MySQL database paradigm

Preface: I have often heard about database paradi...