Arbitrary records injected to post table

Arbitrary records injected to post table

by Kasım Burak Özdemir -
Number of replies: 0

Hi, I am a professional webmaster. I had already been In charge of a site. I received the whole backup from the previous vendor and found out that the "post" table has more than 170000 records. I truncated the records and restored the site on a clean, newly installed, firewalled cloud server a few days ago.

The Moodle version is "$release  = '3.10 (Build: 20201109)".

I have been monitoring the site and now I have encountered arbitrary records injected to post table again.

SELECT
summary.module,
DATE_FORMAT(FROM_UNIXTIME(summary.mincreated), '%e %b %Y %H:%i:%s') AS 'mincreated',
DATE_FORMAT(FROM_UNIXTIME(summary.minlastmodified), '%e %b %Y %H:%i:%s') AS 'minlastmodified',
DATE_FORMAT(FROM_UNIXTIME(summary.maxcreated), '%e %b %Y %H:%i:%s') AS 'maxcreated',
DATE_FORMAT(FROM_UNIXTIME(summary.maxlastmodified), '%e %b %Y %H:%i:%s') AS 'maxlastmodified',
summary.numberofrecords
FROM (SELECT module,
MIN(created) AS 'mincreated',
MIN(lastmodified) AS 'minlastmodified',
MAX(created) AS 'maxcreated',
MAX(lastmodified) AS 'maxlastmodified',
COUNT(*) AS numberofrecords
FROM post GROUP BY module) AS summary;

+--------+----------------------+----------------------+----------------------+----------------------+-----------+
| module | mincreated           | minlastmodified      | maxcreated           | maxlastmodified      | kayitadet |
+--------+----------------------+----------------------+----------------------+----------------------+-----------+
| blog   | 28 May 2022 02:40:49 | 28 May 2022 02:40:49 | 30 May 2022 17:17:29 | 30 May 2022 17:17:29 |        68 |
+--------+----------------------+----------------------+----------------------+----------------------+-----------+
1 row in set (0.00 sec)


Any suggestions or recommendations.

Thanks.

Average of ratings: -