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

Analyze the working principle of Tomcat

SpringBoot is like a giant python, slowly winding...

How to install docker on Linux system and log in to docker container through ssh

Note: I use Centos to install docker Step 1: Inst...

Advantages and disadvantages of conditional comments in IE

IE's conditional comments are a proprietary (...

MySQL uses events to complete scheduled tasks

Events can specify the execution of SQL code once...

MySQL batch removes spaces in a certain field

Is there any way to remove spaces from a certain ...

Definition and usage of MySQL cursor

Creating a Cursor First, create a data table in M...

Nginx Linux installation and deployment detailed tutorial

1. Introduction to Nginx Nginx is a web server th...

Vue3.0 handwriting magnifying glass effect

The effect to be achieved is: fixed zoom in twice...

Linux configuration SSH password-free login "ssh-keygen" basic usage

Table of contents 1 What is SSH 2 Configure SSH p...

Docker installation and configuration steps for MySQL

Table of contents Preface environment Install Cre...

MySQL Optimization: Cache Optimization

I am happy that some bloggers marked my article. ...

How to filter out certain libraries during mysql full backup

Use the --all-database parameter when performing ...