Home >Backend Development >PHP Tutorial >Mysql is injected with malicious code, how to prevent it from executing?
There is a loophole in the database, that is, I have a table, and a piece of data is inserted every two seconds, but I cannot find where the SQL is executed. How can I find this?
-------------------------------Supplement------------------ -------
To be precise, for this vulnerability, as soon as I start mysql, it will always execute this statement. It's like it's bound to something.
Then I show processlist
came out with something like this. I don’t know what’s going on
Then query the database, this is the result
The value of the parent_id
field inserted by this sql
statement is fixed. I don’t know how to get the content
field.
————————————————Supplement————————————————
Thank you for your answers. The problem has been solved. I'm ready to run away.
There is a loophole in the database, that is, I have a table, and a piece of data is inserted every two seconds, but I cannot find where the SQL is executed. How can I find this?
-------------------------------Supplement------------------ -------
To be precise, for this vulnerability, as soon as I start mysql, it will always execute this statement. It's like it's bound to something.
Then I show processlist
came out with something like this. I don’t know what’s going on
Then query the database, this is the result
The value of the parent_id
field inserted by this sql
statement is fixed. I don’t know how to get the content
field.
————————————————Supplement————————————————
Thank you for your answers. The problem has been solved. I'm ready to run away.
Is your interface being timed by someone?=. =, search for the place where the insertion is performed in this table.
Look for it slowly, see which sql sentence it is, where it will be used, and the user ip linking to mysql
Check if there is something wrong in the planned task
Go through the mysqlbinlog log and record all insertion and update records